Source-linked AI summary
Diffusion LLMs Can Do Faster-Than-AR Inference via Discrete Diffusion Forcing
Xu Wang, Chenkai Xu, Yijie Jin, Jiachun Jin, Hao Zhang, Zhijie Deng
TL;DR
Open-source dLLMs had not surpassed similarly sized AR LLMs in inference speed, despite their potential for parallel generation. The paper introduces D2F, which combines KV-cache-compatible block-wise generation with inter-block parallel decoding, and reports faster-than-AR inference alongside large speedups over vanilla dLLMs.
Problem
Existing open-source dLLMs had not achieved superior inference speed over similarly sized AR LLMs, despite their potential to generate multiple tokens in parallel.
Source: §1 · p. 2Method
D2F trains dLLMs to predict later token blocks from partially predicted preceding blocks, combining block-wise causal KV caching with pipelined inter-block parallel decoding.
Source: §1 · p. 2, §4.1 · p. 5, §4.2 · p. 5Results
D2F achieves up to 2.5× faster inference than LLaMA3 and Qwen2.5 and more than 50× acceleration over vanilla LLaDA and Dream while maintaining comparable average benchmark performance.
Source: §1 · pp. 2–3, §5.2 · p. 8Takeaways & Limitations
D2F establishes an open-source dLLM approach that supports faster-than-AR inference while retaining the parallel decoding advantages of diffusion models.
Source: §1 · p. 3, §6 · p. 10
Abstract
from arXiv · showhide
Diffusion Large Language Models (dLLMs) have emerged as a promising alternative to autoregressive (AR) LLMs for text generation, with the potential to decode multiple tokens in a single iteration. However, none of the existing open-source dLLMs have achieved superior inference speed over AR LLMs of similar size. This paper breaks this barrier based on a simple and effective strategy named discrete diffusion forcing (D2F). D2F equips dLLMs with two key capabilities: (1) block-wise autoregressive generation to enable KV cache utilization; (2) prediction of following tokens without requiring completion of prior blocks for inter-block parallel decoding. In this way, the vanilla dLLMs are refurbished into an AR-diffusion hybrid paradigm for efficient inference. D2F can be implemented with an asymmetric distillation process based on pre-trained dLLMs. We further propose a pipelined parallel decoding algorithm, which enables a trade-off between efficiency and efficacy. Empirically, D2F dLLMs achieve more than $\mathbf{2.5\times}$ inference speed than LLaMA3 and Qwen2.5 on GSM8K. Compared to vanilla dLLMs like LLaDA and Dream, the acceleration can be more than $\mathbf{50\times}$ while maintaining comparable output quality. The code is available at https://github.com/zhijie-group/Discrete-Diffusion-Forcing.
1 INTRODUCTION
D2F addresses the open-source dLLM speed gap by combining block-wise KV-cache-compatible generation with inter-block parallel decoding. This hybrid design yields faster-than-AR inference while preserving comparable benchmark performance.
Motivation
- Open-source dLLMs had not demonstrated faster inference than similarly sized AR LLMs, despite their potential for parallel token generation.Existing approaches pursued KV-cache strategies or parallel sampling, but block-wise sequential generation could eliminate inter-block parallelism.Source: §1 · p. 2
Discrete diffusion forcing
- D2F extends diffusion forcing to discrete text, allowing subsequent blocks to be predicted before preceding blocks are fully denoised.The resulting paradigm combines block-wise sequential generation with inter-block parallelism instead of requiring complete preceding blocks.Source: §1 · p. 2
Method
- D2F dLLMs denoise token blocks with increasing mask ratios, use block-wise causal attention for accurate KV caching, and learn through asymmetric distillation.Inference uses a pipelined parallel decoding algorithm that trades off efficiency and performance.Source: §1 · p. 2, Figure 3 · p. 3
Results
- More than 50× acceleration was achieved over LLaDA-Instruct-8B and Dream-Base-7B without compromising average performance across mathematical and programming benchmarks.The evaluated benchmarks included GSM8K, MATH, HumanEval, and MBPP.Source: §1 · p. 2
- Up to 2.5× faster inference than prevalent AR LLMs such as LLaMA3 and Qwen2.5 establishes D2F as a faster-than-AR open-source dLLM approach.The contribution is presented as the first faster-than-AR dLLMs.Source: §1 · pp. 2–3
2 RELATED WORK
Related work addresses dLLM speed through caching, sampling optimization, and hybrid architectures. D2F's pipelined decoding combines parallel block processing with dynamic block activation.
Diffusion language models
- dLLMs seek to reduce AR decoding latency by iteratively denoising masked sequences rather than generating tokens sequentially.This parallel denoising paradigm motivates diffusion-based language generation.Source: §2 · p. 3
Acceleration methods
- Existing dLLM acceleration methods use approximate caching schemes or sampling optimizations to reduce redundant computation and decoding steps.Bidirectional attention makes standard KV caching incompatible, while confidence-aware strategies reduce iterations.Source: §2 · p. 3
Pipelined decoding
- D2F dynamically adds blocks when the latest block exceeds a completion threshold, while fully activated blocks decode multiple tokens more aggressively.The illustrated threshold is τadd = 1/6.Source: Figure 4 · p. 4
AR-diffusion hybrids
- AR-diffusion hybrids apply autoregressive dependencies across units while retaining diffusion denoising within units, a design previously explored in video generation.This architecture separates temporal dependency modeling from within-unit denoising.Source: §2 · p. 4
3 PRELIMINARY: DIFFUSION LARGE LANGUAGE MODELS (DLLMS)
Masked dLLMs corrupt text into progressively noisier sequences and learn to reverse that process. Their practical speed is limited by bidirectional-attention caching conflicts and the difficulty of parallelizing dependent tokens.
Forward process
- Masked diffusion progressively replaces tokens in an L-token sequence with [MASK] across a continuous time schedule t ∈ [0, 1].At the endpoint, the sequence is fully masked.Source: §3 · p. 4
Reverse process
- dLLMs learn pθ(Y 0|Y t) to denoise a fully masked sequence into language samples while predicting all masked tokens simultaneously at each step.This simultaneous prediction provides the theoretical basis for parallel generation.Source: §3 · p. 4
Inference bottlenecks
- Bidirectional attention conflicts with standard KV caching, causing redundant computation across denoising steps.This is a central practical inference bottleneck for masked dLLMs.Source: §3 · p. 4
- Conditional independence assumptions make interdependent-token generation difficult, requiring more iterative steps for high-quality outputs.Prior methods do not simultaneously provide precise KV caching and efficient parallel decoding.Source: §3 · p. 4
D2F setup
- D2F training divides sequences into blocks, applies a monotonically increasing noise schedule, and updates a D2F model through asymmetric distillation from a pretrained dLLM.The supplied training procedure samples blocks and noise levels before predicting block distributions.Source: §3 · p. 5
4 METHOD
D2F refurbishes dLLMs into an AR-diffusion hybrid by combining block-wise causal generation, inter-block parallel decoding, asymmetric distillation, and pipelined inference.
Discrete Diffusion Forcing
- D2F provides block-level AR generation for standard KV-cache reuse and inter-block parallel decoding from incomplete predecessors.These capabilities reduce redundant computation while increasing the number of tokens decoded per inference step.Source: §4.1 · p. 5
- D2F partitions sequences into equal-sized blocks and applies monotonically increasing noise levels so earlier blocks are more complete than later blocks.The reverse process can finalize preceding blocks while advancing denoising in subsequent blocks.Source: §4.1 · p. 5
- Block-wise causal attention preserves exact KV reuse across completed blocks while retaining bidirectional attention within each block.This attention structure supports cached computation without requiring fully denoised preceding blocks before later-block decoding advances.Source: §4.1 · p. 5, §4.2 · p. 6
Asymmetric Distillation
- D2F is distilled from a pre-trained bidirectional dLLM using an asymmetric KL-divergence objective under the student's causally restricted view.The teacher uses a global view of noisy blocks, while the student learns to reproduce its mask predictions with block-wise causal attention.Source: §4.2 · pp. 5–6
Pipelined Parallel Decoding
- Algorithm 2 updates the KV cache after blocks are completed during pipelined D2F inference.The procedure appends blocks according to decoding progress and confidence thresholds while operating on cached forward passes.Source: §4.2 · p. 6
- Pipelined parallel decoding maintains a sliding window, dynamically appends masked blocks, and uses dual-state activation to balance efficiency against decoding quality.New blocks begin semi-activated and become fully activated after their predecessors accumulate sufficient decoding progress.Source: §4.3 · p. 6
5 EXPERIMENTS
D2F is evaluated on mathematical reasoning and code-generation benchmarks against accelerated dLLMs and comparable AR LLMs. It improves inference speed while preserving performance, with results depending on pipeline and block-size settings.
Experimental Setup
- D2F is evaluated on GSM8K, GSM8K-CoT, MATH, HumanEval, and MBPP using LLaDA-Instruct-8B and Dream-Base-7B.Comparisons include Fast-dLLM, dLLM-Cache, LLaMA3-Instruct-8B, and Qwen2.5-Base-7B.Source: §5.2 · pp. 7–8, §5.1 · p. 7
Main Results
- 119.9 tokens/s on GSM8K gives D2F-Dream-Base-7B a 2.5× speedup over LLaMA3-Instruct-8B and 2.3× over Qwen2.5-Base-7B.The maximum generation length is 512 for all methods.Source: §5.2 · p. 8
- 52.9× speedup on LLaDA-Instruct-8B preserves comparable performance, while D2F reaches 90.2 tokens/s on MATH, 2.1× Fast-dLLM’s Dual-Cache.The LLaDA comparison reports 47.6 versus 0.9 tokens/s and scores of 38.0 versus 39.0.Source: §5.2 · p. 8
- 91.2 tokens/s on GSM8K-CoT yields a 9.6× speedup over Dream-Base-7B and a 1.8× speedup over Fast-dLLM, with slight performance improvement.A unified maximum length of 256 is used for this comparison because the base model struggles with the stop token.Source: §5.2 · p. 8
Throughput-Performance Trade-off
- 150.9 tokens/sec with a score of 71.2 on GSM8K gives D2F 3.1× LLaMA3’s throughput while exceeding its score of 70.1.Dream-Base-7B instead drops from 71.4 to 42.8 when sampling steps decrease from 512 to 128.Source: §5.3 · p. 9
Ablations and Analysis
- Increasing inference block size reduces throughput and first improves then worsens performance; block size 48 peaks at 77.5 versus 75.9 for size 16.The ablation tests integer multiples of the training block size, which is 16.Source: §5.3 · p. 9, Figure 5 · p. 9
- With τact = 0.85, the dual-state setting τadd = 0.7 raises score from 72.6 to 74.2 and throughput from 136.8 to 139.0 TPS.Further reducing τadd improves score while marginally reducing throughput.Source: §5.3 · p. 10
- On MBPP, structured D2F noise scheduling improves score by 5.0 points and throughput by 24.0 TPS over independent random schedules.The comparison uses τact = 0.95, maximum length 512, block size 32, τconf = 0.9, and τadd = 0.1.Source: §5.3 · p. 10, Table 4 · p. 10
6 CONCLUSION
The paper introduces D2F as a training paradigm that conditions next-block prediction on partially predicted preceding blocks. This supports KV caching and parallel generation, enabling faster-than-AR dLLM inference.
6 CONCLUSION
- D2F conditions next-block prediction on partially predicted tokens from previous blocks, supporting KV cache and parallel generation.The paper reports D2F as the first dLLM to support faster-than-AR inference.Source: §6 · p. 10
A.1 ABLATION STUDIES ON D2F COMPONENTS
The ablation separates D2F’s cache and parallel-decoding contributions. KV caching provides substantial speedup, while the pipelined parallel decoder adds further acceleration.
D2F Components
- Cache-only enables standard KV caching but generates blocks serially, whereas Cache + Para combines caching with pipelined parallel decoding.The two configurations isolate cache use from asynchronous block generation.Source: §A.1 · p. 14
- Adding the parallel pipeline increases GSM8K speedup for LLaDA from 2.4x to 7.3x beyond the cache-only configuration.The result highlights the contribution of asynchronous generation.Source: §A.1 · p. 14
A.2 CONTROL EXPERIMENT FOR DATA CONTRIBUTION
The control experiment separates D2F’s methodology from the contribution of distillation data by fine-tuning Dream-Base on the same dataset with identical LoRA parameters. Direct fine-tuning yields minor task-score gains but significantly reduces inference speed, supporting D2F as the key source of acceleration.
- Dream-Base* was created by directly fine-tuning Dream-Base on the same distillation dataset used for D2F.The control model used LoRA with exactly the same parameters as D2F training.Source: §A.2 · p. 14
- Dream-Base* shows minor score improvements on some tasks but suffers a significant inference-speed drop.The speed degradation is attributed to computational overhead from the added LoRA layers.Source: §A.2 · p. 14
- The control experiment identifies D2F methodology, rather than the training data, as the key driver of the exceptional inference acceleration.Source: §A.2 · p. 14
A.3 HYPERPARAMETER DETAILS
The experiments specify separate sampling configurations for baseline and D2F models, including generation limits, block size, and pipelined-decoding thresholds. Several tables document ablations, baseline-relative performance ratios, and fairness-oriented hyperparameter choices.
Sampling hyperparameters
- Table 8 specifies maximum generation length, inference block size, and pipelined-decoding thresholds for D2F models.The listed thresholds include token addition, block activation, and token confirmation thresholds.Source: §A.3 · p. 14, Table 8 · p. 16
- Baseline hyperparameters are adopted from prior work to ensure fair comparison with D2F configurations.Source: §A.3 · p. 14, Table 8 · p. 16
Ablation and control tables
- Tables 5, 6, and 7 report ablations and baseline-relative performance ratios for D2F-LLaDA, Dream-Base*, and D2F-Dream.Table 6 compares Dream-Base with its directly fine-tuned version, Dream-Base*; Tables 5 and 7 study proposed-method variants.Source: Table 5 · p. 14, Table 6 · p. 15, Table 7 · p. 15
Sampling hyperparameters
- For D2F, the length parameter sets only a maximum generation limit and does not affect the sampling distribution because generation is block-wise.For Dream-based models, D2F’s maximum length matches the baseline because the base model often fails to generate proper termination tokens.Source: Table 8 · p. 16
Related papers
This paper cites
Cited by
- Learning When to Commit: Schedule Distillation for Fast Diffusion Language Models2026
- JetSpec++: Foresight Parallel Drafting with Self Refinements2026
- One Block Ahead: Promoting Sampler State in Diffusion Language Models2026
- Diffusion Language Models for Mobile Edge Agentic AI: Foundations, Applications, and Challenges2026
- Prefix-Denoising Consistency: Test-Time Verification for Diffusion Language Models2026
- Serving Masked Diffusion LLMs: Characterization and Design Principles from Real Hardware2026