KV Cache Quantization for Diffusion Language Models
Organizations: Shanghai Jiao Tong University · Ningbo Institute of Digital Twin, Eastern Institute of Technology, Ningbo, China · The Hong Kong Polytechnic University · Shanghai Innovation Institute
Abstract
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.
Figures & tables
| Method | GSM8K | HumanEval | MATH | MBPP | Avg. |
|---|---|---|---|---|---|
| LLaDA full attention | 78.62 | 42.07 | 33.36 | 29.80 | 45.96 |
| Prefix cache | |||||
| Cache only | 78.47 | 42.07 | 33.18 | 26.60 | 45.08 |
| KIVI | 77.33 | 42.68 | 32.40 | 25.60 | 44.50 |
| KVQuant | 77.48 | 42.07 | 32.68 | 24.60 | 44.21 |
| dLLM-KVQ | 77.94 | 43.90 | 32.92 | 26.60 | 45.34 |
| Method | GSM8K | HumanEval | MATH | MBPP | Avg. |
|---|---|---|---|---|---|
| Dream full attention | 74.15 | 39.63 | 34.18 | 54.40 | 50.59 |
| Prefix cache | |||||
| Cache only | 74.60 | 43.29 | 34.20 | 55.20 | 51.82 |
| KIVI | 73.69 | 40.85 | 33.74 | 54.20 | 50.62 |
| KVQuant | 74.83 | 37.80 | 33.86 | 54.60 | 50.27 |
| dLLM-KVQ | 74.53 | 41.46 | 34.28 | 56.20 | 51.62 |
| Method | K high-precision rule | MBPP |
|---|---|---|
| KIVI K/V | None; all low-bit | 26.60 |
| Fixed K rule | Attention, | 25.60 |
| Fixed K rule | Attention, | 25.20 |
| dLLM-KVQ | Selected per layer | 26.60 |
| Win rate (%) | |||||
|---|---|---|---|---|---|
| Mode | L2 | KL | Top-1 | Top- | Eff. bits |
| Prefix | 96.4 | 88.9 | 72.9 | 85.9 | 4.77 |
| Dual | 94.9 | 90.0 | 71.7 | 82.5 | 4.60 |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
KV-Cache Quantization
Key-value cache quantization compresses transformer attention state to reduce memory use and bandwidth during long-context inference.
See all 104 papers