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

Moment-KV: 基于动量的解码时KV缓存压缩用于长文本生成

Moment-KV: Momentum-Based Decode-Time KV Cache Compression for Long Generation

Indian Institute of Technology Guwahati(印度理工学院瓜哇蒂)

Soumyadeep Jana, Sagar Nishad, Sanasam Ranbir Singh

AI总结:

提出Moment-KV方法,利用动量驱动的时序注意力聚合在解码阶段压缩KV缓存,以提升长文本生成质量并保持解码延迟。

摘要:

键值(KV)缓存仍然是大型语言模型(LLM)在长文本生成任务中部署的主要瓶颈。先前的工作通常对预填充和解码缓存应用均匀压缩,但压缩预填充缓存会破坏关键上下文从而降低性能。虽然保留预填充缓存至关重要,但解码阶段的压缩仍未被充分探索,现有方法依赖于固定的近期窗口或瞬时注意力。我们对注意力动态的分析揭示了强时间模式:关键标记在长时间范围内获得持续注意力,而局部推理涉及短暂的爆发。静态启发式方法无法捕捉这种行为,导致重要标记被过早驱逐或陈旧标记被保留。我们提出Moment-KV,一种基于动量驱动的时序注意力聚合的解码时KV缓存压缩方法。我们的方法将标记重要性建模为连续演化的状态,其中注意力通过衰减进行聚合,捕捉长期影响和近期相关性。实验表明,Moment-KV在长文本生成任务中显著提高了生成保真度(2.3-3.2%),同时保持了解码延迟。

英文摘要:

Key-Value (KV) cache remains a major bottleneck for deploying Large Language Models (LLMs) in long-generation tasks. Prior work often applies uniform compression across both prefill and decoding caches, but compressing the prefill cache degrades performance by corrupting critical context. While preserving the prefill cache is essential, decoding-phase compression remains underexplored, with existing methods relying on rigid recency windows or instantaneous attention. Our analysis of attention dynamics reveals strong temporal patterns: critical tokens receive sustained attention over long horizons, while local reasoning involves short-lived bursts. Static heuristics fail to capture this behavior, leading to premature eviction of important tokens or retention of stale ones. We propose Moment-KV, a decoding-time KV cache compression method based on momentum-driven temporal attention aggregation. Our method models token importance as a continuously evolving state, where attention is aggregated with decay, capturing both long-term influence and recent relevance. Experiments show that Moment-KV significantly improves generation fidelity in long-generation tasks (2.3-3.2 %) while maintaining decoding latency.

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

↑