Every Cache Entry Earns Its Place: Global Allocation of Resolution and Coverage for KV Cache Compression

📄 arXiv: 2608.07001v1 📥 PDF

作者: Haolin Tian, Yuzhe Liu, Tonghan Wang

分类: cs.LG

发布日期: 2026-08-07


💡 一句话要点

提出GraceKV以解决KV缓存压缩中的资源分配问题

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

关键词: KV缓存 压缩算法 资源分配 大型语言模型 信息覆盖 局部分辨率 原型树 全局优化

📋 核心要点

  1. 现有KV缓存压缩方法依赖固定规则,无法灵活分配资源,导致性能瓶颈。
  2. GraceKV提出全局资源分配方法,将压缩过程视为资源分配问题,优化分辨率与覆盖。
  3. 实验显示GraceKV在32个设置中有24个排名第一,支持高达128倍的压缩比,表现优异。

📝 摘要(中文)

随着大型语言模型(LLMs)处理越来越长的上下文,KV缓存存储和重复访问成为主要瓶颈。现有的KV缓存压缩方法依赖于预定义的固定压缩规则,通常围绕令牌驱逐或合并展开,导致缓存资源无法在层、头和上下文槽之间自由流动,也无法共同分配以平衡局部分辨率和信息覆盖。因此,本文提出了GraceKV,一种用于KV缓存压缩中分配分辨率和覆盖的全局方法,将压缩过程形式化为在固定缓存预算下的全局资源分配问题。GraceKV将每个层-KV头-槽组合视为一个原子单元,并构建原型树。实验结果表明,GraceKV在32个设置中有24个排名第一,且在高达128倍压缩下保持稳健,验证了全局预算分配在协调信息覆盖和局部分辨率方面的有效性。

🔬 方法详解

问题定义:本文解决KV缓存压缩中的资源分配问题,现有方法无法灵活适应不同层、头和上下文槽的需求,导致信息覆盖和局部分辨率的平衡不足。

核心思路:GraceKV通过将每个层-KV头-槽组合视为原子单元,构建原型树来实现全局资源分配,优化信息覆盖与局部分辨率的平衡。

技术框架:整体架构包括原型树的构建,叶节点对应令牌级KV条目,内部节点使用单一原型压缩其子节点覆盖的KV空间。通过添加新树的根节点扩展信息覆盖,分裂选定节点提高局部分辨率。

关键创新:GraceKV的创新在于将压缩过程形式化为全局资源分配问题,允许所有候选操作在共享缓存预算下进行竞争,突破了现有方法的局限。

关键设计:该方法无需额外训练,整个压缩和推理过程在GPU上执行,设计上关注于节点的非重叠性和原子单元的表示,确保高效的缓存资源利用。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,GraceKV在32个设置中有24个排名第一,且在高达128倍的压缩比下保持稳健,显著优于现有方法,验证了全局预算分配的有效性。

🎯 应用场景

GraceKV可广泛应用于需要处理长上下文的自然语言处理任务,如文本生成、对话系统和信息检索等领域。其高效的缓存压缩方法能够显著提升模型的推理速度和资源利用率,具有重要的实际价值和未来影响。

📄 摘要(原文)

As large language models (LLMs) process increasingly long contexts, KV cache storage and repeated access have become a major bottleneck. Existing KV cache compression methods rely on predefined, fixed compression rules and are typically developed around either token eviction or merging. As a result, cache resources can neither flow freely across layers, heads, and context slots, nor be jointly allocated to balance local resolution and information coverage. Therefore, we propose GraceKV, a global approach for the allocation of resolution and coverage in KV cache compression, and formulate the compression process as a global resource allocation problem under a fixed cache budget. GraceKV treats each layer-KV head-slot combination as an atomic unit and builds a prototype tree. Leaf nodes correspond to token-level KV entries, while each internal node uses a single prototype to compress the KV space covered by its children. A set of non-overlapping nodes in the tree forms the representation of an atomic unit. Adding the root of a new tree expands information coverage, whereas splitting a selected node improves local resolution. All candidate actions compete globally for a shared cache budget. Finally, the nodes retained across all trees form the compressed KV cache. This process adaptively determines the allocation of cache resources among atomic units globally and the balance between resolution and coverage. GraceKV requires no additional training, and the entire compression and inference process is performed on the GPU. Systematic experiments across diverse long-context tasks and compression ratios show that GraceKV ranks first in 24 of 32 settings and remains robust up to 128-fold compression. These results validate the effectiveness of global budget allocation in coordinating information coverage and local resolution.