BeaconKV:由信标查询引导的键值缓存压缩,用于高效大型推理模型推理
研究论文 · 2026/09/09
大型推理模型(LRM)通过扩展思维链(CoT)生成实现卓越的问题解决能力,但由此产生的键值(KV)缓存随序列长度线性增长,造成严重的内存瓶颈,长推理轨迹常超出GPU容量。现有KV缓存压缩方法依赖近期查询来估计未来令牌的重要性,隐含假设这些查询是未来注意力模式的可靠代理。我们证明该假设在长程推理中失效:某些解码步骤生成思维回访令牌(TRT),重新关注早期形成的远距离上下文(如任务解决计划)。通过系统分析,我们发现TRT对应的查询在嵌入空间中聚集成少量相似性组。基于此洞察,我们提出BeaconKV,一种免训练的KV缓存压缩方法,维护信标查询(每个全局查询聚类的紧凑代表)以预测哪些KV对将被回访,而无需存储完整查询历史。在四个开源LRM和多种推理基准上,BeaconKV普遍优于现有压缩方法,实现高达5.8倍的内存缩减,同时几乎保持完整缓存的准确性,吞吐量提升超过4.3倍。
本文针对大型推理模型推理时KV缓存内存瓶颈问题,提出新颖的免训练压缩方法BeaconKV。通过揭示现有方法的假设缺陷并利用查询聚类特性,实现了显著的内存和吞吐量提升,实验验证广泛有效,对高效推理系统设计具有重要参考价值。
Large Reasoning Models (LRMs) achieve superior problem-solving through extended Chain-of-Thought (CoT) generation, but the resulting key-value (KV) cache grows linearly with sequence length and creates severe memory bottlenecks, often exceeding GPU capacity for long reasoning traces. Existing KV cache compression methods rely on recent queries to estimate future token importance, implicitly assuming these serve as reliable proxies for future attention patterns. We demonstrate that this assumption fails in long-horizon reasoning: certain decoding steps generate Thought Revisiting Tokens (TRT) that re-attend to distant previous context, such as task-solving plans formulated early in the trace. Through systematic analysis, we discover that queries corresponding to the TRT cluster into a small number of similarity groups in the embedding space. Based on this insight, we propose BeaconKV, a training-free KV cache compression method that maintains beacon queries, compact representatives for each global query cluster, to anticipate which KV pairs will be revisited without storing the entire query history. Across four open-source LRMs and diverse reasoning benchmarks, BeaconKV generally outperforms existing compression methods, achieving up to 5.8times memory reduction while nearly preserving full cache accuracy and improving throughput by over 4.3times.