arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.39853cs.CL
收藏

扩散语言模型的KV缓存量化

KV Cache Quantization for Diffusion Language Models

Shanghai Jiao Tong University(上海交通大学);Ningbo Institute of Digital Twin, Eastern Institute of Technology(宁波职业技术学院数字孪生研究院);The Hong Kong Polytechnic University(香港理工大学);Shanghai Innovation Institute(上海创新研究院)

Yan Tai, Yunan Ding, Guangzhao Li, Siqi Luo, Chaoyang Zhang, Guangtao Zhai, Guodong Guo, Xiaohong Liu

AI总结:

针对扩散语言模型的KV缓存重用误差问题,提出dLLM-KVQ方法,结合TRACE轨迹校准,在4位、2位缓存设置下,于多基准测试中取得量化方法的最高平均分数。

摘要:

KV缓存量化在自回归语言模型中已得到充分研究,其中缓存的前缀状态在因果注意力下是精确的,量化主要是缓存重建问题。扩散语言模型(dLLMs)打破了这一假设。快速dLLM推理会在去噪步骤中重复使用KV状态,但双向token表示会随着掩码token的揭示而变化,因此在应用量化之前,重复使用的缓存可能已经与完全重新计算的结果不同。我们研究了这种缓存重用误差下的KV缓存量化。我们将KIVI和KVQuant适配到Fast-dLLM风格的前缀和双重缓存重用中,并引入了TRACE和dLLM-KVQ。TRACE从提示-答案对中重建可行的dLLM揭示轨迹,提供与迭代掩码解码匹配的校准状态。dLLM-KVQ利用这些轨迹,根据输出级和注意力级行为指标选择保持高精度的每层K缓存条目,同时应用标准低位值量化。在LLaDA和Dream在GSM8K、HumanEval、MATH和MBPP上的评估中,dLLM-KVQ在报告的4位和2位前缀/双重缓存设置中,在量化方法中实现了最高的平均分数。

英文摘要:

KV cache quantization is well studied for autoregressive language models, where cached prefix states are exact under causal attention and quantization is mainly a cache reconstruction problem. Diffusion language models (dLLMs) break this assumption. Fast dLLM inference reuses KV states across denoising steps, but bidirectional token representations can change as masked tokens are revealed, so the reused cache may already differ from full recomputation before quantization is applied. We study KV cache quantization under this cache-reuse error. We adapt KIVI and KVQuant to Fast-dLLM-style prefix and dual cache reuse, and introduce TRACE and dLLM-KVQ. TRACE reconstructs feasible dLLM reveal trajectories from prompt-answer pairs, providing calibration states that match iterative masked decoding. dLLM-KVQ uses these trajectories to choose per-layer K-cache entries that remain in high precision according to output- and attention-level behavior metrics, while applying standard low-bit value quantization. Across LLaDA and Dream evaluations on GSM8K, HumanEval, MATH, and MBPP, dLLM-KVQ achieves the highest average score among quantized methods across the reported 4-bit and 2-bit prefix/dual cache settings.

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

↑