Diffusion-based large language models (dLLMs) rely on bidirectional attention, which prevents lossless KV caching and requires a full forward pass at every denoising step. Existing approximate KV caching methods reduce this cost by selectively updating cached states, but their decision overhead scales with context length or model depth. We propose EntropyCache, a training-free KV caching method that uses the maximum entropy of newly decoded token distributions as a constant-cost signal for deciding when to recompute. Our design is grounded in two empirical observations: (1) decoded token entropy correlates with KV cache drift, providing a cheap proxy for cache staleness, and (2) feature volatility of decoded tokens persists for multiple steps after unmasking, motivating recomputation of the k most recently decoded tokens. The skip-or-recompute decision requires only O(V) computation per step, independent of context length and model scale. Experiments on LLaDA-8B-Instruct and Dream-7B-Instruct show that EntropyCache achieves 15.2×-26.4× speedup on standard benchmarks and 22.4×-24.1× on chain-of-thought benchmarks, with competitive accuracy and decision overhead accounting for only 0.5% of inference time. Code is available at https://github.com/mscheong01/EntropyCache.
Figures & tables
Figure 1: (a) Entropy and cosine distance metrics per decoding step experimented on single gsm8k sample using LLADA-8B-Instruct model. (b) Max decoded token entropy vs. avg. value vector cosine distance, plotted on log–log axes.
Figure 2: (a)–(b) PCA projections (PC 1 vs. PC 2) of the last-layer value vectors for two mask tokens over 256 denoising steps in LLADA-8B-Instruct on a single GSM8K sample. Color encodes step progression (dark → light); the red star marks the decoding step.
Figure 3: Overview of EntropyCache at a single denoising step t . Phase 1 : a full or partial forward pass is executed depending on the recompute flag; in the partial case, only mask tokens and recently decoded tokens are recomputed while the rest are read from cache. Phase 2 : new tokens are decoded from the model logits and the maximum entropy Et+1 of the decoded distributions is computed. Phase 3 : the entropy is compared against threshold τ to set the recompute flag for the next step, and the k most recently decoded tokens Rt+1 are selected for partial recomputation.
Figure 4: Accuracy–throughput tradeoff on GSM8K (LLaDA-8B-Instruct) for three candidate skipping metrics across varying thresholds τ .
Figure 5: Grid search over entropy threshold τ and recent-token budget krecent on GSM8K. (a, d) Accuracy. (b, e) Throughput. (c, f) Accuracy vs. throughput. Top: LLaDA; bottom: Dream.
Method
Computation
Memory
Bottleneck
d2Cache Jiang et al. (2025)
O(ℓ⋅L⋅H)
O(H⋅L2)
Quadratic in L
Elastic-Cache Nguyen-Tri et al. (2025)
O(ℓ⋅L⋅d)
O(ℓ⋅L⋅d)
Scales with ℓ , L , d
EntropyCache (Ours)
O(V)
O(k)
Constant
Table 3: Complexity comparison of dynamic KV cache methods. EntropyCache achieves constant overhead, decoupling decision overhead from both context length and model scale. Notation: ℓ = number of layers; L = context length; H = number of attention heads; d = hidden dimension; V = vocabulary size. d2Cache and Elastic-Cache overhead grows with L and model scale ( ℓ , d ), respectively, whereas EntropyCache remains constant regardless of both.
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 6: Per-step decoded token entropy vs. average value-vector cosine distance for each benchmark (LLaDA-8B-Instruct, 64 samples per dataset). Gray points denote EOS-filling steps; colored points denote non-EOS content steps. Spearman ρ is computed on non-EOS steps only.
Figure 7: Distribution of per-sample Spearman ρ (log–log, non-EOS only) across 64 samples for each benchmark (LLaDA-8B-Instruct). Diamonds indicate means; horizontal bars indicate medians; shaded regions show kernel density estimates.
Table 5: EntropyCache ablation on GSM8K (LLaDA-Inst, w=32 ). Each cell: Accuracy (%) / Throughput (tok/s).
τ=0.5
τ=1.0
τ=1.5
τ=2.0
τ=2.5
k=16
41.20 / 17.66
41.40 / 30.81
41.00 / 42.03
39.60 / 47.40
39.20 / 50.49
k=32
40.80 / 17.65
41.40 / 30.44
42.20 / 40.40
43.00 / 46.13
40.60 / 47.90
k=64
41.40 / 17.65
41.20 / 30.64
42.80 / 39.83
43.40 / 45.04
39.80 / 46.96
k=128
41.20 / 17.48
41.20 / 30.18
43.00 / 37.78
43.20 / 40.82
41.00 / 42.44
k=256
41.20 / 17.26
41.00 / 29.61
42.80 / 35.45
43.60 / 36.18
40.20 / 35.06
Appendix
Table 6: EntropyCache ablation on MATH500 (LLaDA-Inst, w=32 ). Each cell: Accuracy (%) / Throughput (tok/s).
τ=0.5
τ=1.0
τ=1.5
τ=2.0
τ=2.5
k=16
42.40 / 33.16
41.80 / 53.91
38.80 / 65.32
40.60 / 70.36
38.60 / 72.36
k=32
42.60 / 32.79
41.80 / 53.75
38.80 / 65.19
41.20 / 68.88
40.60 / 71.97
k=64
42.60 / 32.80
41.40 / 53.03
38.80 / 63.78
40.00 / 68.68
40.00 / 69.34
k=128
42.60 / 32.20
41.60 / 50.95
38.80 / 60.85
40.60 / 65.73
40.80 / 65.63
k=256
42.60 / 31.75
41.60 / 50.00
38.60 / 59.14
40.40 / 61.82
41.20 / 61.60
Appendix
Table 7: EntropyCache ablation on MBPP (LLaDA-Inst, w=32 ). Each cell: Accuracy (%) / Throughput (tok/s).
τ=0.5
τ=1.0
τ=1.5
τ=2.0
τ=2.5
k=16
45.73 / 24.55
45.73 / 33.87
47.56 / 38.97
46.34 / 41.73
42.07 / 43.91
k=32
45.73 / 24.32
48.78 / 33.13
46.34 / 37.91
44.51 / 40.64
41.46 / 41.00
k=64
45.73 / 24.34
48.17 / 33.54
48.78 / 38.10
49.39 / 39.45
42.07 / 39.46
k=128
45.73 / 24.30
46.95 / 32.95
48.78 / 36.85
45.12 / 37.41
43.90 / 36.29
k=256
45.73 / 24.02
47.56 / 31.85
49.39 / 35.73
47.56 / 33.45
46.34 / 29.19
Appendix
Table 8: EntropyCache ablation on HumanEval (LLaDA-Inst, w=32 ). Each cell: Accuracy (%) / Throughput (tok/s).
Elastic-Cache
d2Cache
Ours
Benchmark
RR
T-put
RR
T-put
RR
T-put
LLaDA-Inst
GSM8K
0.140
23.49
0.147
29.96
0.114
38.49
MATH500
0.148
24.43
0.146
32.18
0.134
39.64
MBPP
0.243
32.24
0.164
52.77
0.178
64.91
HumanEval
0.168
27.73
0.160
41.36
0.172
38.41
Appendix
Table 9: Recompute ratio (RR) and throughput (T-put, tok/s) for dynamic KV caching methods. Lower RR indicates more cache reuse. Bold: best per benchmark.
Figure 8: Wall-clock time breakdown on a single GSM8K sample (LLaDA-Inst, w=32 , generation length =256 ). Left: stacked bar chart of inference components. Right: decision overhead decomposition per method. EntropyCache’s decision cost is 71 ms (0.5%), roughly 20× and 38× cheaper than d2Cache and Elastic-Cache respectively.
Figure 9: GPU memory usage over time on a single GSM8K sample (LLaDA-Inst, w=32 , generation length =256 ). Elastic-Cache requires ∼ 1 GB more due to extra query and hidden-state caching; d2Cache and EntropyCache are nearly identical.
Figure 10: Sample responses on GSM8K (ID: 546, ground truth: 130). Highlighted tokens in the EntropyCache response denote decoded tokens with entropy ≥τ that triggered full KV recomputation at the next denoising step.
Figure 11: Sample responses on HumanEval (ID: 127). Highlighted tokens in the EntropyCache response denote decoded tokens with entropy ≥τ that triggered full KV recomputation at the next denoising step.
Diffusion Large Language Models (DLLMs) enable non-autoregressive decoding, but efficient inference support remains immature: unlike autoregressive models, whose requests reuse a shared prefix key-value (KV) cache, DLLMs use bidirectional attention, so a shared context's KV states depend on the tokens still being decoded, leaving directly reused caches stale and full recomputation necessary. We present ACache, a cross-request cache reuse mechanism for shared spans, or affixes, at any position: prefix, infix, or suffix. ACache measures the influence of affix tokens on the masked generation region to identify a small request-specific subset as Anchor Tokens, and recomputes only their KV states while reusing the remaining affix cache. Built on state-of-the-art intra-request caching mechanisms, ACache recovers most of the accuracy lost to direct affix-cache reuse on average when recomputing around 20% of affix tokens, and at that budget preserves more accuracy than selection criteria adapted from prior cross-request cache-reuse systems. We co-design ACache with a modern inference engine, whose attention reads each request's recomputed Anchor KV states alongside one affix cache shared across concurrent requests. Against the same system with only intra-request caching, ACache cuts recompute latency by up to 56.7%, translating to as much as 1.71× end-to-end throughput, while reducing peak KV cache memory by up to 45.8%.
Diffusion language models decode tokens in parallel, but their bidirectional denoiser rules out the naive key--value (KV) cache behind fast autoregressive inference. Block diffusion restores caching by decoding block-by-block, and the block caches deployed on it so far are tied to attention: O(L)in memory and, if used as training-free retrofits, only an approximation of the model's computation. Both constraints can be overcome: sequence mixers that summarize finalized blocks into a reusable state support block caching, and the corresponding block-causal training objective makes the cache exact. We study this recipe at scale, pretraining three 3B block-diffusion denoisers (attention, mamba, and hybrid) on 300B tokens under one single-frontier objective and decoding all three through a single cached interface. Only the state-space cache is O(1) in sequence length: its memory and per-step latency stay constant at any context length, while an attention cache remains O(L). At 256k tokens (where attention has grown to 82GB and 29 ms/step), the Mamba cache delivers 4.3x lower latency, 11x less memory, and 2.6x higher single-stream throughput; and because that footprint is constant it scales with batch as well, reaching 14x the aggregate throughput, where attention cannot run beyond a single stream. The same linear-state bias lets the Mamba and hybrid backbones keep retrieving out to 8-16x their training length, whereas attention's retrieval collapses at 2x, at no measured quality cost.
Large Language Models (LLMs) rely heavily on Key-Value (KV) caching to minimize inference latency. However, standard KV caches are context-dependent: reusing a cached document in a new context requires recomputing KV states to account for shifts in attention distribution. Existing solutions such as CacheBlend, EPIC, and SAM-KV mitigate this issue by selectively recomputing a subset of tokens; however, they still incur non-negligible computational overhead (FLOPs) and increased Time-to-First-Token (TTFT) latency. In this paper, we propose KV Packet, a recomputation-free cache reuse framework that treats cached documents as immutable ``packets'' wrapped in light-weight trainable soft-token adapters, which are trained via self-supervised distillation to bridge context discontinuities. Experiments on Llama-3.1 and Qwen2.5 demonstrate that the proposed KV Packet method achieves near-zero FLOPs and lower TTFT than recomputation-based baselines, while retaining F1 scores comparable to those of the full recomputation baseline.
Chuangtao Chen, Grace Li Zhang, Xunzhao Yin +3
Technical University of Munich Munich, Germany · Technical University of Darmstadt Darmstadt, Germany · Zhejiang University Hangzhou, China +1