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

超越令牌驱逐:面向高效KV缓存压缩的混合维度预算分配

Beyond Token Eviction: Mixed-Dimension Budget Allocation for Efficient KV Cache Compression

Peking University(北京大学)

Ruijie Miao, Zhiming Wang, Wang Li, Shiwei Wu, Shufan Liu, Yanbing Jiang, Tong Yang

AI总结:

本文提出混合维度KV缓存压缩方法,通过更细粒度的维度分配提升效率,实验显示其在长上下文任务中表现优于现有方法,仅用6.25%的缓存即可达到全注意力性能。

摘要:

键值(KV)缓存广泛用于加速Transformer推理,但其内存成本随输入长度线性增长,限制了长上下文部署。现有令牌驱逐方法通过丢弃不重要令牌减少内存,可视为粗粒度的维度缩减,将每个令牌分配零或全维度。我们提出混合维度KV缓存压缩方法MixedDimKV,通过更细粒度的维度分配分配维度给令牌,并提出MixedDimKV-H,进一步整合头部级重要性信息。在长上下文基准测试中,MixedDimKV优于不依赖头部级重要性分析的现有KV缓存压缩方法。当配备相同头部级重要性信息时,MixedDimKV-H始终优于HeadKV。值得注意的是,我们的方法在LongBench上仅使用6.25%的KV缓存即可达到全注意力性能。此外,在Needle-in-a-Haystack测试中,我们的解决方案在50K上下文长度时保持100%准确性,仅使用0.26%的缓存。

英文摘要:

Key-value (KV) caching is widely used to accelerate transformer inference, but its memory cost grows linearly with input length, limiting long-context deployment. Existing token eviction methods reduce memory by discarding less important tokens, which can be viewed as a coarse form of dimensionality reduction that assigns each token either zero or full dimension. We propose MixedDimKV, a mixed-dimension KV cache compression method that allocates dimensions to tokens at a more granular level, and MixedDimKV-H, which further integrates head-level importance information. Experiments on long-context benchmarks show that MixedDimKV outperforms prior KV cache compression methods that do not rely on head-level importance profiling. When equipped with the same head-level importance information, MixedDimKV-H consistently outperforms HeadKV. Notably, our approach achieves comparable performance to full attention on LongBench with only 6.25% of the KV cache. Furthermore, in the Needle-in-a-Haystack test, our solution maintains 100% accuracy at a 50K context length while using as little as 0.26% of the cache.

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

↑