KVarN: 方差归一化的KV缓存量化减轻推理任务中的误差累积
KVarN: Variance-Normalized KV-Cache Quantization Mitigates Error Accumulation in Reasoning Tasks
AI总结:
提出KVarN,一种无校准的KV缓存量化方法,通过Hadamard旋转和双尺度方差归一化减少自回归解码中的量化误差累积,在2位精度下达到生成基准测试的最新水平。
摘要:
测试时扩展是一种在大语言模型中获取更好推理能力的强大方法,但在长时域解码过程中,由于KV缓存增长,它会成为内存瓶颈。KV缓存量化有助于改善这一问题,但当前方法在预填充设置下进行评估,而误差在自回归解码下表现不同。我们表明,在后一种情况下,量化误差随时间步累积,主要由不正确的token尺度驱动。我们引入KVarN,一种无校准的KV缓存量化器,它应用Hadamard旋转,随后对K和V矩阵的两个轴进行双尺度方差归一化。我们发现,这种组合修复了异常的token尺度误差,并显著减少了现有基线的误差累积。KVarN在生成基准测试(包括MATH500、AIME24和HumanEval)上以2位精度建立了KV缓存量化的最新技术水平。KVarN方法的vLLM实现可在此https URL获取。
英文摘要:
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
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。