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

KQ-SVD:通过可证明的注意力保真度保障压缩KV缓存

KQ-SVD: Compressing the KV Cache with Provable Guarantees on Attention Fidelity

ENS de Lyon(里昂高等师范学院);DIRO, Université de Montréal(蒙特利尔大学DIRO中心);Mila(Mila人工智能研究所);CIFAR AI Chair(CIFAR人工智能主席)

Damien Lesens, Beheshteh T. Rakhshan, Guillaume Rabusseau

AI总结:

KQ-SVD通过最优低秩分解提升KV缓存压缩的注意力保真度,实验证明其在LLaMA和Mistral模型中表现优异。

摘要:

键值(KV)缓存是变压器大规模语言模型(LLMs)效率的核心,用于存储先前计算的向量以加速推理。然而,随着序列长度和批量大小的增长,缓存成为主要的内存瓶颈。先前的压缩方法通常仅对键进行低秩分解或尝试联合嵌入查询和键,但这两种方法都忽视了注意力本质上依赖于它们的内积。在本工作中,我们证明了这些策略在近似注意力矩阵时是次优的。我们引入了KQ-SVD,一种简单且计算高效的 方法,通过闭合形式解直接对注意力矩阵进行最优低秩分解。通过针对冗余的真正来源,KQ-SVD在压缩下保持更高的保真度。在LLaMA和Mistral模型上的广泛评估表明,我们的方法一致地提供了优越的投影质量。

英文摘要:

The Key-Value (KV) cache is central to the efficiency of transformer-based large language models (LLMs), storing previously computed vectors to accelerate inference. Yet, as sequence length and batch size grow, the cache becomes a major memory bottleneck. Prior compression methods typically apply low-rank decomposition to keys alone or attempt to jointly embed queries and keys, but both approaches neglect that attention fundamentally depends on their inner products. In this work, we prove that such strategies are suboptimal for approximating the attention matrix. We introduce KQ-SVD, a simple and computationally efficient method that directly performs an optimal low-rank decomposition of the attention matrix via a closed-form solution. By targeting the true source of redundancy, KQ-SVD preserves attention outputs with higher fidelity under compression. Extensive evaluations on LLaMA and Mistral models demonstrate that our approach consistently delivers superior projection quality.

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

↑