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

📄 arXiv: 2607.15498 📥 PDF

作者: Shahrzad Esmat, Dhawal Shah, Ali Jannesari

分类: cs.CL, cs.LG

发布日期: 2026-07-20


💡 一句话要点

提出VarRate以解决长上下文LLM推理中的KV缓存瓶颈问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 长上下文 KV缓存 低秩编码 训练无关 大语言模型 推理性能 内存优化

📋 核心要点

  1. 现有的KV缓存方法在长上下文LLM推理中存在显著的准确性下降和内存浪费问题。
  2. VarRate通过为每个令牌分配可变的低秩预算,避免了令牌的驱逐,从而保持了更高的准确性。
  3. 在LongBench的实验中,VarRate在20%预算下与未压缩模型的准确性差异仅为0.8个百分点,显示出其优越性。

📝 摘要(中文)

关键值(KV)缓存是长上下文大型语言模型(LLM)推理中的主要内存瓶颈。现有的训练无关方法在结构上存在局限性:令牌选择方法(如SnapKV、Ada-KV)通过观察窗口评估重要性并驱逐低分令牌,但驱逐是不可逆的,导致准确性在查询无关重用时下降11-15个百分点;而均匀低秩编码则保持每个令牌,但在各处花费相同的秩,浪费预算。我们提出VarRate,这是一种训练无关的KV编码器,通过查询显著性为每个令牌分配可变的低秩预算,保持每个令牌的非零秩。与需要训练的自适应秩编码器相比,VarRate无需训练,且在匹配的20%预算下,准确性仅下降3.5-5.5个百分点。

🔬 方法详解

问题定义:论文要解决的具体问题是长上下文LLM推理中的KV缓存瓶颈,现有方法如令牌选择和均匀低秩编码在准确性和内存利用上存在不足。

核心思路:VarRate的核心思路是为每个令牌分配可变的低秩预算,而不是驱逐低分令牌,从而保持每个令牌的非零秩,提升了模型的准确性。

技术框架:VarRate的整体架构包括输入令牌的查询显著性评估、低秩预算分配和KV缓存的编码与解码模块,确保每个令牌都能得到适当的资源分配。

关键创新:VarRate的最重要技术创新在于其训练无关的特性,能够在不需要训练的情况下实现动态的低秩分配,这与现有的自适应秩编码器形成了鲜明对比。

关键设计:在设计中,VarRate采用了基于查询显著性的动态预算分配策略,确保在不同的上下文中能够灵活调整每个令牌的秩,同时保持整体的准确性和效率。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

在LongBench的实验中,VarRate在20%预算下的准确性与未压缩模型相差仅0.8个百分点,且在与KVzip的对比中,VarRate在大多数设置下表现出相当的准确性,同时预填充开销仅为其八分之一,显示出显著的性能优势。

🎯 应用场景

该研究的潜在应用领域包括自然语言处理、对话系统和文本生成等,能够有效提升长上下文模型的推理性能,降低内存消耗,具有重要的实际价值和广泛的应用前景。

📄 摘要(原文)

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.