ElemedexA pocket encyclopedia of AI architectures
No. 053

Diffusion language model (LLaDA)

Masked diffusion language model · dLLM · LLaDA, Dream, Mercury, Gemini Diffusion, DiffusionGemma

Crossword

It does not write: it develops. It starts from a page of covered squares and, like someone doing a crossword, fills in the ones it is sure of first and leaves the doubtful ones for the next pass. Its cousins, who write left to right, still cannot see how it knows the ending before it has the beginning.

Height
32 (LLaDA 8B)
Weight
≈ 16 GB (bf16)
Parameters
8.02 B (LLaDA 8B)
Context
4,096-token sequences; the length of the answer canvas is fixed before sampling
Training data
2.3 trillion tokens (≈ 61% English, 11% Chinese, 28% code) + 4.5 M fine-tuning pairs
Year
2025
Generation
6 · Assistants, reasoning, and agents
Creators
Nie, Zhu, You, Zhang, Ou, Hu, Zhou, Lin, Wen & Li (Renmin University of China, Ant Group), on the discrete diffusion of Austin et al. (2021), Lou, Meng & Ermon (2024) and Sahoo et al. (2024)
Kind
Architecture

Base stats

Total
351

Approximate, ordinal scales meant for comparing species with each other; the hard numbers are in the data sheet.

Weaknesses

  • At equal size it still trails an autoregressive model: Google says so for DiffusionGemma against Gemma 4.
  • The maximum answer length (the canvas) is fixed in advance, unless it generates in blocks.
  • In its pure form it cannot use a KV cache: every step reprocesses the whole canvas.
  • Reinforcement fine-tuning recipes are far less tested than for autoregressive models.

Habitat

LLaDA was raised on 2.3 trillion tokens of web pages, books, academic papers, encyclopedias, mathematics and code, mostly in English and Chinese. Today it lives in labs, in APIs that sell speed (Mercury) and on home graphics cards: LLaDA 8B takes about 16 GB in bf16 and DiffusionGemma, quantized, fits in 18 GB.

Moves

Abilities

Generative bidirectionality
The transformer has no causal mask: when it predicts a gap, it sees everything already written on both sides.
Random masking rate
Each example has a fraction t drawn between 0 and 1 masked, not a fixed 15%: trained at every noise level, it can start from a fully masked page.
Adjustable speed
The number of steps is an inference-time setting: fewer steps mean more tokens per pass and faster answers, at a cost in quality.

Anatomy

Denoising step×Nthe same networkReal text x₀Draw t between 0 and 1Mask each token w.p. tBidirectional transformerLoss on the [MASK]s onlyPrompt + canvas of [MASK]Bidirectionalself-attentionPredict every [MASK]Keep the most confidentRemask the restAnswer, no masks leftTrainingGeneration

Masked diffusion in the style of LLaDA (Nie et al., 2025, secs. 2.1–2.4). Training masks a fraction t of the tokens and predicts only the masked ones; generation starts from a fully masked canvas and, at each of N steps, predicts every gap, keeps the most confident predictions and masks the rest again. What has been revealed stays put. DiffusionGemma replaces the masks with random tokens, which can still be corrected, and generates 256-token canvases one after another (Google DeepMind, 2026; Google, 2026).

Evolution chain

  • discrete noise: masks instead of Gaussian noise, removed a few at a time034 Diffusion model
  • BERT's fill-in-the-blank, with a random masking rate, becomes a generator028 BERT
053 Diffusion language model (LLaDA)

A diffusion language model generates text without writing it left to right. It starts from a masked canvas and, step by step, predicts every position at once, keeps the most confident ones and masks the rest again. LLaDA showed that the recipe works at the scale of a large language model: 8 billion parameters trained from scratch on 2.3 trillion tokens. Its authors find it competitive overall with LLaMA 3 8B, which saw 15 trillion (Nie et al., 2025, secs. 2.2, 3.2).

How it works

The forward process is the discrete version of Diffusion model's noise: draw a t between 0 and 1 and replace each token by [MASK] with probability t; at t = 1 nothing is left. The network that learns the way back is a Transformer without a causal mask that predicts every masked token at once. The loss is computed on those tokens only and is an upper bound on the negative log-likelihood: training on it is approximate maximum-likelihood estimation, as for an autoregressive model (Nie et al., 2025, sec. 2.1).

So far, this is nearly BERT. The difference is that BERT always masks 15%, whereas here the rate varies between 0 and 1 and the loss is weighted by 1/t; on the authors' account, that subtle difference is what turns the gap-filling exercise into a generator (2025, sec. 2.1). The lineage is short: Austin et al. (2021) extended diffusion to discrete states and saw that an "absorbing" state (the mask) links diffusion to masked models; Lou et al. (2024) reached GPT-2's perplexity; Sahoo et al. (2024) showed that the objective reduces to a mixture of classical masked language modeling losses.

To answer, the model receives the prompt and a fixed-length, fully masked canvas. At each step it predicts every mask, keeps the most confident predictions and masks the others again (Nie et al., 2025, sec. 2.4). In masked diffusion, a token once placed stays placed.

What changed

Autoregressive generation takes one pass per token and stores what it has already computed in a KV cache; LLaDA, having no causal mask, cannot, and reprocesses everything at each step (Nie et al., 2025, sec. 2.2).

Autoregressive Diffusion
Order left to right any
Tokens per pass one one or several, depending on the steps
KV cache yes no, in the pure form
Length the model decides a cap set in advance

Here the number of steps is a hyperparameter: fewer steps buy speed at the cost of quality (2025, sec. 2.4). Since every prediction sees both sides, filling a gap in the middle comes naturally. And there is a further effect: Berglund et al. (2024) showed that an autoregressive model that has learned "A is B" does not automatically generalize to "B is A"; on a test with lines of Chinese poems, LLaDA recalls the preceding line almost as well as the following one (45.6% against 51.8%), whereas GPT-4o drops from 82.7% to 34.3% (Nie et al., 2025, sec. 3.3).

Industry went for speed. Google showed Gemini Diffusion as a demo in May 2025 (Google DeepMind, 2025); according to Inception's report, measured by Artificial Analysis, Mercury Coder Mini exceeds 1,000 tokens per second on H100 GPUs (Inception Labs et al., 2025). Dream 7B started from the weights of an autoregressive model (Ye et al., 2025), and LLaDA-MoE added experts (Zhu et al., 2025). Block diffusion generates blocks left to right and diffuses within each one, which brings back the KV cache and variable length (Arriola et al., 2025). DiffusionGemma (June 2026) combines both: a causal encoder processes the prompt and caches it, and a bidirectional decoder denoises 256-token canvases one after another; strictly, it is the same network in two modes. Instead of masks it uses random tokens, which can be redrawn, so it can correct what it has already written (Google DeepMind, 2026; Google, 2026; O'Donoghue & Flennerhag, 2026).

Limits

Sources