arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2611.07025cs.LGcs.CL
收藏

LowRAM:用于测试时可组合KV缓存压缩的低秩键与摊销值

LowRAM: Low-Rank Keys and Amortised Values for Composable KV Cache Compression at Test-Time

University College London(伦敦大学学院)

Teresa Delgado, Hugo Hazard, Martin Benfeghoul, Jun Wang, Zafeirios Fountas

AI总结:

提出LowRAM,通过测试时的低秩键压缩与值缓存摊销组合,在近无损性能下实现KV缓存的高效压缩,提升解码吞吐量,且可与量化、驱逐进一步组合以获得更高压缩比。

摘要:

自回归解码依赖于KV缓存,其内存占用随上下文长度线性增长,限制了批量大小和吞吐量。现有训练后方法利用token、层和特征维度间的冗余,或降低数值精度。本文识别出一个互补维度:在每个注意力头内,值在很大程度上可从对应键预测。我们通过值缓存摊销利用这一点,该方法在测试时为每个注意力头拟合轻量级预测器,仅存储其重建效果最差的token的残差,实现了4倍的近无损值压缩。该预测器可通过元学习初始化,以大幅减少预填充开销,或在允许一次性成本的场景(如多查询推理)中从头拟合。我们将值摊销与跨层低秩键压缩结合,得到LowRAM,这是一种非对称压缩流水线,在三种模型系列中保持接近无损的性能。通过在每个解码步骤仅重建选定的KV对子集,LowRAM可保持解码开销最小,并在4倍压缩下实现高达5倍的峰值解码吞吐量。LowRAM还可与量化和驱逐组合,在长上下文下实现26.9倍压缩,同时达到基线性能的94.5%。这些结果表明,将键和值视为结构上不同的实体,可实现高效、激进且可组合的KV缓存压缩。

英文摘要:

Autoregressive decoding relies on the KV cache, whose memory footprint grows linearly with context length and caps batch size and throughput. Existing post-training methods exploit redundancy across tokens, layers, and feature dimensions, or lower numerical precision. We identify a complementary axis: within each attention head, values are largely predictable from their corresponding keys. We exploit this with value cache amortisation, which fits a lightweight per-head predictor at test time and stores residuals only for the tokens it reconstructs worst, giving $4\times$ near-lossless value compression. The predictor can be initialised by meta-learning for substantially reduced prefill overhead, or fitted from scratch in settings that allow a one-off cost, such as multi-query inference. We pair value amortisation with cross-layer low-rank key compression to produce LowRAM, an asymmetric compression pipeline that stays close to lossless across three model families. By reconstructing only a selected subset of KV pairs at each decoding step, LowRAM can keep decoding overhead minimal and achieve up to $5\times$ higher peak decode throughput at $4\times$ compression. LowRAM further composes with quantisation and eviction, reaching $26.9\times$ compression at $94.5\%$ of baseline performance on long contexts. These results show that treating keys and values as structurally distinct enables efficient, aggressive, and composable KV cache compression.

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

↑