arXiv:2607.15498cs.CLcs.LG2026-07

不训练的可变秩压缩,让长文本推理更省显存且不丢精度。

VarRate: Training-Free Variable-Rate KV Cache Compression for Long-Context LLMs

  • 按查询重要性动态分配每条记忆的压缩秩,不丢弃任何内容
  • 在20%压缩率下,比未压缩模型误差仅增3.5-5.5分
  • 适合追求高精度与低开销的长文本生成应用

键值(KV)缓存是长上下文大语言模型推理的主要内存瓶颈。现有两种主流无训练方法各有局限:基于选词的方法(SnapKV、Ada-KV)从观察窗口评分并淘汰低分内容,但淘汰不可逆——在查询无关复用时准确率下降11-15点;均匀低秩编码保留所有内容但均摊秩预算,造成浪费。我们发现两者失败根源相同:应分配秩而非淘汰内容。提出VarRate,一种无训练的KV编码器,根据查询显著性为每条令牌分配可变低秩预算,保持每条记录非零秩。相比需训练的自适应秩编码器才能实现此分配,VarRate无需训练。因不丢弃任何令牌,其在查询感知选择失效场景中仅下降3.5-5.5点,优于对比方法。在LongBench(16任务)上匹配20%预算时,对Llama-3.1-8B和Qwen2.5-7B均保持与未压缩模型相差不足0.8点。平均来看,它是当前最强的等内存压缩方案。显著优于其均匀秩对照组,并在三个设置中与专为查询无关复用设计的KVzip精度相当,总体仅差1点,且预填充开销约为其八分之一。

原文摘要 · Abstract (English)

The key-value (KV) cache is the main memory bottleneck in long-context large language model (LLM) inference. Two leading training-free families are both structurally limited: token-selection methods (SnapKV, Ada-KV) score importance from an observation window and evict low-scoring tokens, but eviction is irreversible -- so when the importance signal degrades under query-agnostic reuse, accuracy collapses by 11-15 points; uniform low-rank coding keeps every token but spends equal rank everywhere, wasting budget. We observe that both failures share one cure: rank should be allocated, not evicted. We present VarRate, a training-free KV codec that assigns each token a variable low-rank budget by its query salience, keeping every token at a nonzero rank. Comparable adaptive-rank codecs reach this allocation only through training; VarRate requires none. Because no token is dropped, it degrades by only 3.5-5.5 points where query-aware selection collapses. At a matched 20% budget on LongBench (16 tasks), VarRate stays within 0.8 points of the uncompressed model on both Llama-3.1-8B and Qwen2.5-7B. Averaged over the two, it is the strongest matched-memory compressor. It significantly beats its uniform-rank ablation on both models. Against KVzip, a method purpose-built for query-agnostic reuse, it is accuracy-equivalent in three of four settings and within a point overall, at about one-eighth the prefill overhead.

KV缓存压缩长文本生成无训练优化大模型推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。