arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2512.12008cs.CLcs.AIcs.PF
收藏

Hold Onto That Thought: 评估KV缓存压缩在推理中的表现

Hold Onto That Thought: Assessing KV Cache Compression On Reasoning

University of Maryland(马里兰大学);University of Chicago(芝加哥大学);University of Utah(犹他大学)

Minghui Liu, Aadi Palnitkar, Tahseen Rabbani, Hyunwoo Jae, Kyle Rui Sang, Dixi Yao, Shayan Shabihi, Fuheng Zhao, Tian Li, Ce Zhang, Furong Huang, Kunpeng Zhang

AI总结:

本研究评估了多种KV缓存压缩策略在长推理任务中的表现,发现H2O和改进的SnapKV在推理模型中表现优异,揭示了重 hitter 跟踪的有效性及缓存大小与推理成本的权衡。

摘要:

大型语言模型(LLMs)在长上下文任务上表现出色,但常常受到内存限制的制约。具体来说,用于显著加速注意力计算的KV缓存随着上下文长度线性增长。一系列压缩算法被引入以通过删除不重要令牌来减轻缓存增长。然而,几种流行的策略针对的是预填充阶段,即处理长提示上下文,其性能很少在需要长解码的推理任务上得到评估。特别是短但复杂的提示,如GSM8K和MATH500等基准中的提示,往往受益于多步推理和自我反思,导致数以千计的令牌序列。在本工作中,我们对几种流行的压缩策略在长推理任务上的性能进行了基准测试。对于非推理的Llama-3.1-8B-Instruct,我们确定没有单一策略适用于所有情况,性能严重受数据集类型影响。然而,我们发现H2O和我们改进的SnapKV变体是推理模型中的主导策略,表明了重 hitter 跟踪在推理轨迹中的实用性。我们还发现,在低预算的擦除策略下,可以生成更长的推理轨迹,揭示了缓存大小与推理成本之间的权衡。

英文摘要:

Large language models (LLMs) have demonstrated remarkable performance on long-context tasks, but are often bottlenecked by memory constraints. Namely, the KV cache, which is used to significantly speed up attention computations, grows linearly with context length. A suite of compression algorithms has been introduced to alleviate cache growth by evicting unimportant tokens. However, several popular strategies are targeted towards the prefill phase, i.e., processing long prompt context, and their performance is rarely assessed on reasoning tasks requiring long decoding. In particular, short but complex prompts, such as those in benchmarks like GSM8K and MATH500, often benefit from multi-step reasoning and self-reflection, resulting in thinking sequences thousands of tokens long. In this work, we benchmark the performance of several popular compression strategies on long-reasoning tasks. For the non-reasoning Llama-3.1-8B-Instruct, we determine that no singular strategy fits all, and that performance is heavily influenced by dataset type. However, we discover that H2O and our decoding-enabled variant of SnapKV are dominant strategies for reasoning models, indicating the utility of heavy-hitter tracking for reasoning traces. We also find that eviction strategies at low budgets can produce longer reasoning traces, revealing a tradeoff between cache size and inference costs.

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

↑