Manuscript Offprint

arXiv:2610.39853

KV Cache Quantization for Diffusion Language Models

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

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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.

1 Introduction

Diffusion language models (dLLMs) generate text by iteratively refining partially masked sequences rather than by strict left-to-right next-token prediction (Austin et al., 2021a; Lou et al., 2023; Sahoo et al., 2024; Shi et al., 2024; Nie et al., 2026; Ye et al., 2025). Efficient dLLM inference therefore often reuses KV states across denoising steps, as in the prefix and dual cache modes of Fast-dLLM (Wu et al., 2025) and adaptive cache updates in dLLM-Cache (Liu et al., 2025). This makes KV cache compression a natural next step, but it also changes the assumptions behind standard autoregressive (AR) KV cache quantization.

In AR decoding, cached prefix states are exact under causal self-attention (Vaswani et al., 2017): future generated tokens do not change the key and value states of previous tokens. In dLLM decoding, layers use bidirectional self-attention over the current masked sequence. When tokens inside the active block are revealed, prefix or suffix token states can also change under full recomputation. Cache reuse avoids this recomputation by keeping selected regions fixed, so the reused cache is an approximation to the full-recompute cache. Figure 1(b) illustrates this difference.

This difference makes direct AR-to-dLLM transfer unreliable. AR KV quantizers such as KIVI (Liu et al., 2024) and KVQuant (Hooper et al., 2024) are usually motivated as approximating an unquantized reference cache with fewer bits. In a dLLM cache-reuse path, quantization is applied to a cache that may already differ from full recomputation. The deployed cache therefore contains both cache-reuse error and quantization error. Reducing reconstruction error of the reused cache alone may not preserve attention patterns, token scores, or final task decisions.

This setting creates two practical challenges. First, calibration data must reflect masked denoising states rather than only complete prompt-answer sequences, because the same final answer can be reached through different reveal orders. Second, the quantization objective should be tied to model behavior. This is especially important for K caches, where a small numerical perturbation can shift attention mass among reused and recomputed tokens.

To our knowledge, this is the first systematic study of KV cache quantization for dLLMs. We adapt KIVI and KVQuant to a unified Fast-dLLM cache interface and evaluate them under prefix and dual cache reuse. We then introduce TRACE, a trajectory reconstruction procedure that assigns each answer token in a prompt-answer pair to a legal reveal step under the dLLM block schedule.

Figure

(a) Process of block diffusion with Fast-dLLM

Figure

V.

Full Recompute

Figure

V.

Full Recompute

(b) Mismatch between cache and recompute state

Figure 1: Fast-dLLM cache reuse and cache-reuse error. (a) Dual cache reuses prefix and suffix KV states from a block-initial forward pass while recomputing only the active block. (b) The reused cache can differ from the corresponding full-recompute cache after masked tokens inside the block are revealed.

These reconstructed denoising states provide calibration data that matches masked iterative decoding without storing full multi-step logits or KV caches. Figure 2 summarizes how this trajectory construction supports offline policy fitting and online cache quantization.

Building on this calibration, dLLM-KVQ selects a small set of K-cache entries to keep in high precision. The policy is chosen per model, cache mode, bit-width, and layer using output-and attention-level metrics measured on reconstructed trajectories. At inference time, it uses only information available from the block-initial forward pass, while the V cache follows a standard low-bit quantize-dequantize path. Across LLaDA-Instruct and Dream-Base-7B on GSM8K, HumanEval, MATH, and MBPP, dLLM-KVQ obtains the highest average score among the evaluated quantized methods in the reported 4-bit and 2-bit prefix/dual settings.

The paper makes four contributions:

• We formulate dLLM KV cache quantization under cache reuse and separate cache-reuse error from quantization error.

• We propose TRACE to reconstruct dLLM reveal trajectories from prompt-answer pairs for calibration.

• We propose dLLM-KVQ to select per-layer high-precision K-token budgets from behavior metrics and apply them using only block-initial information.

• We show that dLLM-KVQ obtains the best four-task average among quantized methods across all reported models, cache modes, and bit-widths.

References (28)