20.6 Diffusion-based LLMs
An autoregressive decoder commits to tokens from left to right. A diffusion-style language model instead learns to reconstruct corrupted text and can revise multiple positions over successive steps. The important difference is the generation schedule, not the disappearance of Transformers: a denoiser can still use a Transformer backbone.
This connects to image diffusion in Chapter 11.4, with a crucial change. Images can be corrupted in continuous pixel or latent space; text requires a continuous relaxation or a discrete token corruption process. Neither route guarantees faster serving or better reasoning.
1. Continuous and Discrete Routes
Embedding diffusion adds noise to continuous token representations and learns to denoise them. Diffusion-LM is an early example [1]. Mapping the resulting vector back to a token can involve a learned vocabulary decoder or rounding; these are not interchangeable operations.
Discrete diffusion directly changes token identities, often replacing them with a mask token. A denoiser predicts missing identities from the partially visible sequence [2]. This is different from adding Gaussian noise to token IDs. The corruption schedule and reverse sampler define which positions can be changed and when they become committed.
For a vocabulary of size , a uniform categorical transition can be written
where is step- corruption probability, the identity, and the all-ones vector. For this particular transition family,
A clean one-hot row vector has corrupted distribution . An absorbing-mask process has a different transition matrix, including its mask state. Do not apply the uniform-token formula to every masked language diffusion model.
2. What the Evidence Adds
Research and release snapshot as of 2026-10-13. LLaDA trains a masked diffusion model from scratch and applies SFT, demonstrating language-model and instruction-following capabilities at 8B scale against its reported baselines [3]. This moves the discussion beyond small controllable-generation prototypes. It does not establish that every diffusion objective beats an equally resourced autoregressive model.
Mercury 2.5’s release brings diffusion-style decoding into a hosted commercial serving comparison [4]. Treat the provider’s latency and throughput claims as workload-specific claims. The cited release is not a complete disclosure of the architecture, training mixture, or sampling implementation. Product access and an independently reproducible open-weight recipe are different evidence categories.
The practical opportunity is flexible generation: infilling, constraints on already visible positions, and block or arbitrary-order refinement. The risks are repeated full-block work, premature commitment, errors that survive refinement, and awkward interaction with streaming tools or prefix caches.
3. Samplers Are Part of Model Quality
Training a denoiser does not specify a complete decoder. The sampler decides:
- output or block length and number of refinement steps;
- which positions to mask, reveal, or remask;
- confidence thresholds, temperature, and token-selection order;
- how prompts and immutable user constraints remain visible;
- when EOS is honored and when a block is safe to stream.
A full-sequence sampler may need an output-length assumption. A block sampler can progressively extend a response, but then “the whole answer is generated in parallel” is inaccurate. Reveal-by-confidence can commit to an early error; remasking may improve a solution or destabilize it. Evaluate schedule changes as system changes, with the same budget and output policy.
4. A Cost Model Without Universal Speed Claims
Let be generated length, refinement steps, and the cost of a denoising pass over that block. A rough diffusion bill is plus conditioning, decoding, and scheduling. Autoregressive serving pays the sum of incremental steps and can reuse cached prefix state. Comparing with alone ignores the difference between a full block pass and one cached token step.
Measure time to the first usable output, total completion time, p95 latency, tokens or tasks per accelerator-second, peak memory, and quality at a fixed total budget. Count remasked/recomputed positions, not just final output tokens. Include concurrency, long prompts, short answers, code infill, exact constraints, and tool-boundary latency. A model that finishes a block quickly can still be unsuitable for an application requiring immediate token streaming.
5. Training and Artifact Contract
This section describes contracts, not executable training code. A mock forward pass or projecting random embeddings into vocabulary logits is not an implementation of a reverse diffusion sampler.
Pin the input checkpoint or from-scratch initialization, tokenizer including mask/special tokens, native chat template, dataset manifest, denoising objective and noise weighting, corruption schedule, output/sequence caps, optimizer, learning rate, token batch, seeds, precision, sharding, and recomputation. State reference-checkpoint identity or explicit absence; an RL extension needs its own reward and reference contract.
For instruction tuning, identify assistant spans before corruption. Keep prompt and external tool context uncorrupted according to the declared conditioning objective. Use explicit masks to exclude padding, user/tool targets, and post-terminal positions from supervised loss. Verify BOS/EOS, add_generation_prompt, truncation and train/serve template parity. Noise-rate weighting, zero-masked-token cases, variable-length reductions, and packed-episode attention boundaries need explicit semantics.
Separate parameter, gradient, optimizer, activation, temporary-buffer, collective, checkpoint, and evaluation resources. Repeated refinement may require different cache and workspace assumptions from autoregressive serving. Retain provenance, licensing/consent, PII handling, filter/mixture versions, tokenizer revision, sample IDs and shard hashes. Deduplicate and cluster before splitting, and quarantine public/private evaluations and synthetic siblings.
Observe token-normalized training/validation loss and domain slices, masked fraction, noise-level losses, remasking and EOS/truncation behavior, nonfinite/overflow counts, gradient/activation norms, throughput, MFU, data wait, collectives/stragglers, and reconstructable batch IDs. Abort on numerical instability, padding leakage, length runaway, or fixed-budget held-out regressions under predeclared windows and owners.
Checkpoint sharded model/optimizer, scheduler, scaler/FP8 state, global step/tokens, RNG, sampler state, exact data cursor, and data/tokenizer/config hashes. Publish atomically with checksums and a completion marker; define retention, replication, world-size limits and continuation-equivalence restore drills. Release the complete model/template/sampler/tool/safety bundle only after domain, base-retention, safety, format/tool, latency, cost and error-rate gates pass with paired uncertainty or justified sample sizes. Rehearse switching to the last-known-good sampler and checkpoint.
6. Practical Takeaway
Diffusion language modeling offers a different schedule for building and revising an answer. Its value depends on the objective, sampler, kernels, task constraints, and serving regime. Evaluate it as a complete system rather than infer efficiency from a small number of denoising steps. The next section asks which of these modeling advances support action-conditioned world modeling.
Quizzes
Quiz 1: Why can diffusion language models still use Transformers?
Diffusion changes the corruption objective and reverse generation schedule. The denoising network can use attention and Transformer layers.
Quiz 2: Why is comparing T denoising steps with L autoregressive steps insufficient?
Each denoising step may process an entire block, whereas autoregressive decoding can reuse a prefix cache. Compare full compute, latency, memory, and quality.
Quiz 3: Does the uniform categorical transition describe an absorbing-mask process?
No. Uniform diffusion mixes tokens across the vocabulary; an absorbing-mask process includes a distinct mask state and different transition structure.
Quiz 4: Why is the reverse sampler part of the release artifact?
Step count, reveal/remask policy, length, EOS, and streaming decisions change both quality and cost even with identical weights.
Quiz 5: What is missing from a demo that projects random vectors into token logits?
It has no learned denoising trajectory or valid reverse transition. A vocabulary projection alone cannot demonstrate diffusion generation.
References
- Li, X., et al. (2022). Diffusion-LM Improves Controllable Text Generation. arXiv:2205.14217.
- Austin, J., et al. (2021). Structured Denoising Diffusion Models in Discrete State-Spaces. arXiv:2107.03006.
- Nie, S., et al. (2025). Large Language Diffusion Models. arXiv:2502.09992.
- Inception. (2026). Introducing Mercury 2.5. Inception.