arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.11501cs.LGcs.AIcs.CL
收藏

量化优于KV缓存压缩的秩缩减

Attention-Weighted Value Projection for KV-Cache Compression

fraQtl AI Research

Samuel Salfati

AI总结:

本文比较了Transformer推理中KV缓存压缩的两种策略:秩缩减和量化,发现量化在存储预算下表现更优,且在混合基线中仍保持优势,主要贡献在于证明保留维度优于坐标系统。

摘要:

我们比较了两种压缩Transformer推理中KV缓存的策略:秩缩减(丢弃维度)和量化(保留所有维度,降低精度)。在五个模型(124M-14B,MHA和GQA)的匹配存储预算下,我们发现量化在4-364 PPL范围内始终优于秩缩减。即使在混合基线中结合秩缩减和量化,差距依然存在,且随着GQA的激进性增加而扩大。在LAMBADA上,INT4精度与FP16相当(在Mistral 7B上+0.23 PPL,GPT-2上+0.58 PPL),而相同存储下的秩-32崩溃至0.4%。我们追溯这一差距到结构不对称:在softmax注意力路由下,移除一个维度可能导致关注的token翻转(离散失败),而量化噪声受限制且通常保持分数顺序。我们通过扰动结果正式证明:在softmax Fisher度量下,投影损伤超过量化损伤3 x 2^(2b)每方向。基底消融确认该发现与基底无关(扩散<0.4 PPL),证明优势来自保留维度而非更好的坐标系统。联合K+V INT4量化在Mistral 7B上仅+0.18 PPL实现75%的总KV压缩。

英文摘要:

Rank reduction discards dimensions; quantization keeps them at lower precision. Comparing the two requires a choice of what compression should preserve. For attention values, we study reconstruction of the attention output rather than reconstruction of the values alone. With fixed attention weights, the optimal orthogonal rank-$r$ projection uses the leading eigenvectors of $V^\topα^\topαV$, and its error is exactly the discarded eigenvalue sum. We extend this objective to calibration datasets and grouped query attention, and describe rank allocation under an additive local error budget. We also examine the limits of using local error to predict downstream loss. Historical weight-perturbation experiments favor coefficient rounding over the value projections tested, but do not establish a comparison at equal cache storage. The resulting distinction is practical: the projection objective has an exact solution, while a comparison with cache quantization requires separate activation-level experiments.

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

↑