Diffusion language models (DLMs) accelerate generation by decoding multiple tokens in parallel, but pushing them to fast decoding often sacrifices accuracy. We attribute this to a static-to-dynamic mismatch: training optimizes local denoising under fixed schedules, while fast inference skips steps and encounters irregular mask patterns. Existing accelerators largely address only one side of this problem. Training-free inference methods speed up decoding without changing the model, leaving the mismatch unresolved; training-side distillation methods adapt the model, but often tie the student to a specific decoding trajectory, limiting composability and still suffering accuracy loss. We propose CD4LM, a composable framework for accurate DLM acceleration. Its core training component, Discrete-Space Consistency Distillation (DSCD) trains a trajectory-invariant student on diverse masked states, reducing the mismatch without fixing a decoding policy. We pair DSCD with a lightweight ConfidenceAdaptive Decoder, while keeping the trained student compatible with external inference-side accelerators. On GSM8K, CD4LM preserves accuracy while achieving a 5.18x speedup; stacking CD4LM with per-step cache accelerators further pushes speedup to 9.73x at teacher-level accuracy, suggesting a scalable path for combining training-side robustness with future decoding advances. Code is available at https://github.com/yihao-liang/CDLM.
Figures & tables
Figure 1: Overview of the DSCD pipeline. Teacher-subset masking ( MT⊆MS ) lets the teacher condition on a superset of the student’s context, which is typically strict before integer rounding. The student is trained jointly under Lrecon (ground-truth anchor) and Lcons (alignment with the teacher’s soft targets), with curriculum weight λ(g) governing the transition from distillation to refinement.
Figure 2: Accuracy–compute trade-off under different decoding budgets. We plot performance (%) versus the average NFE across benchmarks. The dashed gray curve denotes the LLaDA-8B-Instruct baseline evaluated under increasing NFE budgets, while the solid orange curve denotes our CAD with the given threshold ( γconf=0.95 ). Each marker corresponds to one decoding budget. Across all four benchmarks, our method yields a consistently better trade-off, achieving comparable or higher performance at substantially lower NFE.
Table 1: GSM8K (zero-shot) accuracy-efficiency across acceleration paradigms ( Lgen=256 , block size b=32 ). Methods are grouped by acceleration paradigm. The tps next to a method denotes the preset tokens per step; methods without a annotation use adaptive or method-specific scheduling. Speedup is wall-clock relative to the LLaDA tps=1 baseline. Methods marked † are taken directly from the original papers under their reported settings; their tokens/s and speedup are extrapolated from the reported NFE relative to the LLaDA baseline. The remaining baselines are reproduced under the same harness as our method. Sequential ( b=1 ) and pure-diffusion ( b=Lgen ) variants of LLaDA and our method are reported in Appendix G.1 .
Task
Benchmark
LLaDA-8B-Ins
Ours
Speedup
Code
HumanEval (pass@1 %)
38.7 256
40.9 113.2
3.30 ×
HumanEval (pass@5 %)
51.2 256
52.4 113.9
3.26 ×
HumanEval-plus (pass@1 %)
31.7 256
32.9 115.0
3.25 ×
HumanEval-plus (pass@5 %)
42.7 256
43.9 113.3
3.27 ×
MBPP-plus (pass@1 %)
48.7 256
47.9 108.0
3.51 ×
MBPP-plus (pass@5 %)
68.8 256
67.7 108.8
3.41 ×
Table 2: Overall performance on code and mathematics benchmarks. We report pass@1/5 on code benchmarks and accuracy on MATH500. The nfe next to each score denotes the Avg. NFE for that setting. Speedup is measured by wall-clock time relative to LLaDA-8B-Instruct under the same evaluation protocol. Avg. denotes the unweighted mean across the listed benchmarks.
Configuration
Acc (%)
NFE
Speedup
DSCD composes with inference accelerators
DSCD only (fixed)
78.3
256.0
1.00 ×
DSCD + CAD (Ours)
77.6
76.3
5.18 ×
DSCD + Fast-dLLM
77.2
70.5
5.60 ×
SFT-based training is constrained
SFT only (fixed)
77.6
256.0
1.00 ×
Table 3: Decoding flexibility and training effectiveness on GSM8K ( Lgen=256 , b=32 ). Group 1 shows that the same DSCD student operates with both CAD (training-aware decoding) and Fast-dLLM (KV caching) without retraining. Group 2 replaces DSCD with plain supervised fine-tuning (SFT) while holding the decoder fixed. Under both compared decoders, DSCD achieves a higher speedup than SFT at similar accuracy (CAD: 5.18 × vs. 4.15 × ; Fast-dLLM: 5.60 × vs. 4.73 × ).
Metric
LLaDA fixed
DSCD+CAD
Avg. NFE
256.0
76.3
Avg. output length to EOS
141
138
Processed target canvas
256
256
Model forward / step
128 ms
83 ms
Total latency / step
133 ms
87 ms
CAD controller / step
–
0.6 ms ( <1% )
Table 4: GSM8K latency decomposition (batch size 1; identical prompts, hardware, full canvas, and harness). Similar output lengths rule out EOS length as the main source of the gap between NFE reduction and end-to-end speedup.
Knob
Value
Acc. (%)
NFE
γconf
0.95
77.6
76.3
0.80
61.3
31.2
0.60
42.1
15.8
kmax
8
77.7
117
16
77.6
88
32
77.6
76
Table 5: One-factor CAD sweeps on GSM8K. Lower confidence thresholds reach more aggressive budgets but expose an accuracy–NFE boundary; kmax is comparatively stable in accuracy.
Target
ECE ↓
Prec. ↑
Acc.
NFE ↓
SFT + CAD
0.064
98.0
77.6
95.4
DSCD ( MT )
–
98.4
77.3
84.2
DSCD ( MS )
0.042
98.9
77.6
76.3
Table 6: Calibration and KL-support analysis on GSM8K. Precision is measured on committed tokens at γconf=0.95 .
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
Figure E.1: Illustration of CAD. In each step, the model predicts token distributions for all masked positions in parallel. We compute the confidence score ci(s) based on the maximum probability and selectively unmask tokens that satisfy the threshold ci(s)≥γconf . Low-confidence tokens remain masked for subsequent iterations. (Moved from main paper to appendix.)
Figure E.2: Overview of different decoding paradigms. (a) Standard Autoregressive decoding. (b) Fixed-schedule Block Diffusion (adopted by the LLaDA backbone ( Nie et al., 2025 ) ), which decodes a preset number of masked tokens per step. (c) Block diffusion with our Confidence-Adaptive Decoding (CAD) : Within each block, we adaptively select a high-confidence set of masked positions to unmask (implementation detailed in Algorithm 2 ), enabling variable token counts across steps. (d) The same CAD rule applied to pure diffusion, iteratively denoising the entire sequence starting from all <mask> tokens.
Hyperparameter
Symbol
Code
Math
Optimization:
Optimizer
–
AdamW
AdamW
Learning rate
η
5×10−6
5×10−6
LR Schedule
–
cosine
cosine
Weight decay
–
0.01
0.01
Betas
(β1,β2)
(0.9, 0.999)
(0.9, 0.999)
Appendix
Table E.1: Training hyperparameters and notation.
Hyperparameter
Symbol
Value
CAD Decoding:
Confidence threshold
γconf
0.95
Min tokens per step
kmin
1
Max tokens per step
kmax
32
EOS blocking ratio
βEOS
0.3
Max generation budget
Lgen
256
Appendix
Table E.2: Inference hyperparameters for CAD decoding.
Configuration
Block Size
Acc (%)
Avg. NFE ↓
Speedup ↑
LLaDA-8B-Instruct (Teacher)
32
77.4
256.0
1.00 ×
LLaDA-8B-Instruct (Teacher)
256
13.8
256.0
1.00 ×
Component Analysis:
+ SFT only (fixed decode)
32
77.6
256.0
1.00 ×
+ DSCD only (fixed decode)
32
78.3
256.0
1.00 ×
+ CAD only (no distill)
32
77.4
98.8
4.01 ×
Appendix
Table F.1: Comprehensive ablation study on GSM8K ( Lgen=256 ). We evaluate two regimes: block diffusion ( b=32 , local denoising) and pure diffusion ( b=256 , global denoising). Pure-diffusion rows in this ablation are diagnostic runs without permanent EOS suppression, used to isolate premature-termination behavior; the fair comparison applying permanent EOS suppression to both LLaDA and CD 4 LM is reported in Table G.1 . SFT baselines use full fine-tuning on the same data to serve as a direct control group for our distillation method. Unless otherwise stated, fixed decoding uses NFE =256 .
Regime
Method
Acc. (%) ↑
Avg. NFE ↓
Tokens/s (Speedup) ↑
Sequential ( b=1 )
LLaDA tps=1
76.4
256
7.5 (1.00 × )
Pure Diffusion ( b=Lgen=256 )
LLaDA † (EOS-suppr.) tps=1
73.2
256
7.5 (1.00 × )
LLaDA (diagnostic) tps=1
13.8
256
7.5 (1.00 × )
LLaDA (diagnostic) tps=2
13.0
128
14.9 (1.99 × )
CD 4 LM † (EOS-suppr.)
77.4
80.6
36.7 (4.91 × )
Appendix
Table G.1: Sequential and pure-diffusion variants of the GSM8K experiment ( Lgen=256 ). These rows extend the main-text Table 1 , which focuses on the block-diffusion ( b=32 ) regime. The tps next to a method denotes its preset tokens per step; methods without a annotation use adaptive or method-specific scheduling. † marks pure-diffusion results using permanent p(<EOS>)=0 suppression; without it, LLaDA and DSCD+CAD obtain 13.8% and 54.7% accuracy, respectively, as reported in Table F.1 . Speedup is wall-clock relative to the sequential baseline.
Generation
Model
pass@1 (%)
pass@5 (%)
Avg. NFE
Tokens/s (Speedup)
↑
↑
↓
↑
Sequential ( b=1 )
LLaDA tps=1
36.8
49.2
256
3.6 (1.00 × )
Block Diffusion ( b=32 )
LLaDA tps=1
36.9
51.4
256
3.6 (1.00 × )
LLaDA tps=2
33.2
44.8
128
7.3 (2.00 × )
Fast-dLLM
33.8
46.0
82.8
11.1 (3.07 × )
Ours
39.0
52.6
97.7
10.9 (2.96 × )
Appendix
Table G.2: MBPP (three-shot) pass@k and efficiency across generation paradigms (LLaDA-8B-Instruct). We report pass@1/pass@5 under sequential, block diffusion ( b=32 ), and pure diffusion ( b=256 ) decoding. The tps next to a method denotes its preset tokens per step; methods without a annotation use adaptive or method-specific scheduling. Avg. NFE, Tokens/s and Speedup are defined as in Table 1 . All runs use a maximum sequence length of Lgen=256 . Rows in red show the inference-side cache baseline and the DSCD+Fast-dLLM composition; the composition Pareto-improves over the standalone cache in accuracy (pass@1: 33.8% → 38.7%, +4.9; pass@5: 46.0% → 50.5%, +4.5) and speedup (3.07 ×→ 3.29 × ), confirming that DSCD’s composability extends beyond GSM8K.
Method
MBPP pass@1 (%) ↑
Speedup ↑
DiffuCoder-Instruct
73.1
1.00 ×
DiffuCoder-Instruct + CD 4 LM
73.7
3.25 ×
Appendix
Table G.3: Transfer to DiffuCoder-Instruct on MBPP. The same CD 4 LM pipeline is applied without architecture-specific modification; speedup is measured relative to the DiffuCoder-Instruct baseline.
Figure G.1: Accuracy-compute Pareto frontier on GSM8K. The dashed gray curve represents the LLaDA baseline. Strict Dominance: Our method (solid curves) consistently pushes the frontier upwards and leftwards. The orange arrow highlights our selected operating point ( γconf=0.95 , dark blue curve), which achieves a 3.4 × speedup while maintaining accuracy comparable to the baseline. While a higher threshold ( γconf=0.99 ) prioritizes quality, γconf=0.95 strikes an optimal efficiency-quality balance.
Figure G.2: Per-sample compute allocation under adaptive decoding. Histograms show the NFE distribution across test instances for GSM8K, MATH500, MBPP, and HumanEval using our adaptive decoding approach. The dashed vertical line marks the mean NFE ( μ ), while the solid vertical line indicates the fixed NFE used by the baseline decoder (256 for GSM8K/MBPP/HumanEval and 512 for MATH500). Most samples terminate far earlier than the fixed-budget baseline, explaining the large reductions in average NFE reported in Tables 1 , G.2 , and 2 .
Dimension
LLaDA-8B-Ins
Ours
Fluency (1-5)
3.96 ( ± 1.28)
4.56 ( ± 0.79)
Repetition (1-5)
3.68 ( ± 1.51)
4.44 ( ± 0.98)
Structure (1-5)
4.04 ( ± 1.22)
4.64 ( ± 0.67)
Avg.
3.90 ( ± 1.32)
4.54 ( ± 0.48)
Appendix
Table G.4: Quantitative evaluation of generation quality on GSM8K.
Figure G.3: Visualization of hierarchical generation dynamics. Unlike autoregressive models that generate sequentially, CD 4 LM exhibits a “skeleton-first” strategy: Syntactic structures (blue, early steps) are established first to form a global plan, while complex logical details (red, late steps) are refined later within the established context.