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

G-KV:基于全局注意力的解码时间KV缓存淘汰

G-KV: Decoding-Time KV Cache Eviction with Global Attention

School of Computer Science and Technology, Beijing Jiaotong University(计算机科学与技术学院,北京交通大学);MicroSoft(微软);Beijing Key Laboratory of Traffic Data Mining and Embodied Intelligence(北京交通数据挖掘与具身智能重点实验室)

Mengqi Liao, Lu Wang, Chaoyun Zhang, Zekai Shen, Xiaowei Mao, Si Qin, Qingwei Lin, Saravan Rajmohan, Dongmei Zhang, Huaiyu Wan

AI总结:

G-KV通过结合局部和历史注意力分数的全局评分机制,改进KV缓存淘汰,提升大语言模型的推理效率。

摘要:

近期,大型语言模型(LLMs)在复杂任务中表现出色,但长序列长度导致显著的计算和内存挑战。KV缓存压缩已成为提高推理效率的有效方法。然而,现有方法往往侧重于提示压缩或使用局部注意力分数进行标记淘汰,忽略了令牌的长期重要性。我们提出G-KV,一种KV缓存淘汰方法,采用全局评分机制,结合局部和历史注意力分数,更准确地评估令牌重要性。此外,我们引入了后训练技术,包括强化学习和蒸馏,以优化压缩KV缓存设置的模型。本文代码可在:https://github.com/microsoft/G-KV 上获取。

英文摘要:

Recent reasoning large language models (LLMs) excel in complex tasks but encounter significant computational and memory challenges due to long sequence lengths. KV cache compression has emerged as an effective approach to greatly enhance the efficiency of reasoning. However, existing methods often focus on prompt compression or token eviction with local attention score, overlooking the long-term importance of tokens. We propose G-KV, a KV cache eviction method that employs a global scoring mechanism, combining local and historical attention scores to more accurately assess token importance. Additionally, we introduce post-training techniques, including reinforcement learning and distillation, to optimize models for compressed KV cache settings. The code of this paper is available on: https://github.com/microsoft/G-KV.

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

↑