Attention Score is not All You Need for Token Importance Indicator in KV Cache Reduction: Value Also Matters

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Guo, Zhiyu, Kamigaito, Hidetaka, Watanabe, Taro
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866917792974897152
author Guo, Zhiyu
Kamigaito, Hidetaka
Watanabe, Taro
author_facet Guo, Zhiyu
Kamigaito, Hidetaka
Watanabe, Taro
contents Scaling the context size of large language models (LLMs) enables them to perform various new tasks, e.g., book summarization. However, the memory cost of the Key and Value (KV) cache in attention significantly limits the practical applications of LLMs. Recent works have explored token pruning for KV cache reduction in LLMs, relying solely on attention scores as a token importance indicator. However, our investigation into value vector norms revealed a notably non-uniform pattern questioning their reliance only on attention scores. Inspired by this, we propose a new method: Value-Aware Token Pruning (VATP) which uses both attention scores and the $ \ell_{1} $ norm of value vectors to evaluate token importance. Extensive experiments on LLaMA2-7B-chat and Vicuna-v1.5-7B across 16 LongBench tasks demonstrate that VATP outperforms attention-score-only baselines in over 12 tasks, confirming the effectiveness of incorporating value vector norms into token importance evaluation of LLMs.
format Preprint
id arxiv_https___arxiv_org_abs_2406_12335
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Attention Score is not All You Need for Token Importance Indicator in KV Cache Reduction: Value Also Matters
Guo, Zhiyu
Kamigaito, Hidetaka
Watanabe, Taro
Computation and Language
Machine Learning
Scaling the context size of large language models (LLMs) enables them to perform various new tasks, e.g., book summarization. However, the memory cost of the Key and Value (KV) cache in attention significantly limits the practical applications of LLMs. Recent works have explored token pruning for KV cache reduction in LLMs, relying solely on attention scores as a token importance indicator. However, our investigation into value vector norms revealed a notably non-uniform pattern questioning their reliance only on attention scores. Inspired by this, we propose a new method: Value-Aware Token Pruning (VATP) which uses both attention scores and the $ \ell_{1} $ norm of value vectors to evaluate token importance. Extensive experiments on LLaMA2-7B-chat and Vicuna-v1.5-7B across 16 LongBench tasks demonstrate that VATP outperforms attention-score-only baselines in over 12 tasks, confirming the effectiveness of incorporating value vector norms into token importance evaluation of LLMs.
title Attention Score is not All You Need for Token Importance Indicator in KV Cache Reduction: Value Also Matters
topic Computation and Language
Machine Learning
url https://arxiv.org/abs/2406.12335