2025-06-06 · 专家 · 机器学习 · 自然语言处理

Inference-Time Hyper-Scaling with KV Cache Compression

该论文提出了一种名为动态内存稀疏化(DMS)的新方法,通过压缩Transformer语言模型的键值缓存(KV cache),在相同的计算预算下生成更多标记,从而提高推理的准确性。

更新于 2026-01-04。作者:Adrian Łańcucki、Konrad Staniszewski、Piotr Nawrot、Edoardo M. Ponti。

中文摘要

推理时缩放通过生成更长的或更多并行的序列来以效率换取推理准确性的提高。然而,在Transformer LLMs中,生成成本受到键值(KV)缓存大小的限制,而不是生成标记数的限制。因此,我们探索了推理时超缩放:通过压缩KV缓存,我们可以在相同的计算预算内生成更多标记,并进一步提高缩放推理的准确性。然而,这种方法的成功取决于压缩方法即使在高压缩比下也能保持准确性的能力。为了使超缩放变得实用,我们引入了动态内存稀疏化(DMS),这是一种新型方法,用于稀疏化KV缓存,只需1K个训练步骤即可实现8倍的压缩,同时保持比无训练稀疏注意力更好的准确性。DMS不是提前丢弃缓存的标记,而是延迟标记移除,隐式地合并表示并保留关键信息。我们通过在多个LLM家族上展示DMS推理时超缩放的有效性,表明它可以在可比的推理运行时间和内存负载下提高准确性。例如,我们在AIME 24、GPQA上分别提升了Qwen-R1 32B的平均9.1分和7.6分,在LiveCodeBench上提升了9.6分,这些都是在计算预算内的提升。

英文摘要

Inference-time scaling trades efficiency for increased reasoning accuracy by generating longer or more parallel sequences. However, in Transformer LLMs, generation cost is bottlenecked by the size of the key-value (KV) cache, rather than the number of generated tokens. Hence, we explore inference-time hyper-scaling: by compressing the KV cache, we can generate more tokens within the same compute budget and further improve the accuracy of scaled inference. The success of this approach, however, hinges on the ability of compression methods to preserve accuracy even at high compression ratios. To make hyper-scaling practical, we introduce Dynamic Memory Sparsification (DMS), a novel method for sparsifying KV caches that only requires 1K training steps to achieve 8times compression, while maintaining better accuracy than training-free sparse attention. Instead of prematurely discarding cached tokens, DMS delays token eviction, implicitly merging representations and preserving critical information. We demonstrate the effectiveness of inference-time hyper-scaling with DMS on multiple families of LLMs, showing that it boosts accuracy for comparable inference runtime and memory load. For instance, we enhance Qwen-R1 32B by an average of 9.1 points on AIME 24, 7.6 on GPQA, and 9.6 on LiveCodeBench across compute budgets.

解读

一句话总结

该论文提出了一种名为动态内存稀疏化(DMS)的新方法,通过压缩Transformer语言模型的键值缓存(KV cache),在相同的计算预算下生成更多标记,从而提高推理的准确性。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt