arXiv:2606.03458cs.LG2026-06被引 4

2bit量化缓解推理时误差累积,提升长文本生成质量

KVarN: Variance-Normalized KV-Cache Quantization Mitigates Error Accumulation in Reasoning Tasks

论文配图:KVarN: Variance-Normalized KV-Cache Quantization Mitigates Error Accumulation in Reasoning Tasks
图 1 · 摘自论文原文
  • 用哈达玛旋转+双轴方差归一化,无需校准
  • 在MATH500等任务上2bit量化性能超现有方法
  • 适合需要低内存推理的长序列生成场景

推理阶段的测试时缩放能显著提升大模型的推理能力,但在长序列生成过程中因KV缓存持续增长而面临内存瓶颈。虽然KV缓存量化可缓解此问题,但现有方法多在预填充场景下评估,其误差行为在自回归解码中截然不同。我们发现,在自回归解码中,量化误差随时间步累积,主要由错误的标记尺度导致。为此提出KVarN,一种免校准的量化方法,通过哈达玛旋转并沿K和V矩阵的两个维度进行双尺度方差归一化,有效修正异常标记尺度,大幅减少误差累积。在2比特精度下,KVarN在MATH500、AIME24和HumanEval等生成基准上达到新最佳性能。相关vLLM实现已开源于https://github.com/huawei-csl/KVarN。

原文摘要 · Abstract (English)

Test-time scaling is a powerful approach to obtain better reasoning in large language models, but it becomes memory-bottlenecked during long-horizon decoding, as the KV-cache grows. KV-cache quantization can help improve this, but current methods are evaluated under prefill-like settings and errors behave differently under autoregressive decoding. We show that in the latter regime, quantization errors accumulate across timesteps, driven primarily by incorrect token scales. We introduce KVarN, a calibration-free KV-cache quantizer that applies a Hadamard rotation followed by a dual-scaling variance normalization across both axes of the K and V matrices. We find that this combination fixes outlying token-scale errors and substantially reduces error accumulation over existing baselines. KVarN establishes a new state-of-theart for KV-cache quantization on generative benchmarks, including MATH500, AIME24 and HumanEval, at 2-bit precision. A vLLM implementation of the KVarN method is available at https://github.com/huawei-csl/KVarN

KV缓存量化推理优化2比特长序列生成

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。