arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.12335cs.CLcs.LG
收藏

在 KV 缓存缩减中,注意力分数并非 Token 重要性指标的全部:Value 同样重要

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

Nara Institute of Science and Technology(奈良科学技术研究所)

Zhiyu Guo, Hidetaka Kamigaito, Taro Watanabe

AI总结:

针对 KV 缓存 token 剪枝仅依赖注意力分数的问题,本文提出 VATP,联合注意力分数与 value 向量 $\ell_1$ 范数评估重要性,并在 16 项 LongBench 任务中验证其优势。

摘要:

扩增大语言模型(LLM)的上下文长度,使其能够执行书籍摘要等各种新任务。然而,注意力机制中 Key 与 Value(KV)缓存的内存成本显著限制了 LLM 的实际应用。近期工作探索了通过 token 剪枝来缩减 LLM 中的 KV 缓存,并且仅依赖注意力分数作为 token 重要性指标。但是,我们对 value 向量范数的研究揭示出一种明显不均匀的模式,这对其仅依赖注意力分数的做法提出了质疑。受此启发,我们提出了一种新方法:Value-Aware Token Pruning(VATP,值感知 token 剪枝),该方法同时使用注意力分数和 value 向量的 $\ell_{1}$ 范数来评估 token 重要性。在 LLaMA2-7B-chat 和 Vicuna-v1.5-7B 上跨 16 项 LongBench 任务进行的大量实验表明,VATP 在超过 12 项任务中优于仅使用注意力分数的基线方法,证实了将 value 向量范数纳入 LLM 的 token 重要性评估的有效性。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑