An interactive technical explainer

Diffusion Large Language Models

Most language models write left to right, one word at a time. Diffusion models start with a blank page of [MASK] tokens and sharpen the whole sentence in a handful of passes. This page walks through how, and why it matters.

A 4-step diffusion decoding of a single sentence — watch the masks resolve
step 0 / 4
Sections
18
Interactive visualizations
40+
Read time
60 min
§ 0 · Before we start

Five ideas the rest of the page leans on

01Text arrives as tokens, not letters

A language model never sees raw characters. "The cat sat." is chopped into chunks called tokens first — usually whole words or word-fragments like The, cat, sat, .. Every token is just a row number in a giant lookup table called the vocabulary, which typically holds between 32,000 and 256,000 entries.

So to the model, a sentence is a short list of integers. Generating new text means producing more integers and looking up what strings they happen to map to.

02A Transformer is attention, stacked many layers deep

Every modern LLM runs on a network called a Transformer. Picture it as a tall stack of identical layers. Each layer lets every token glance at the others to pull in context — that's attention — and then runs the result through a small feed-forward network. Repeat thirty-something times, and the model can finally tell you what token is most likely to come next at every position.

You don't need the matrix math here. The one thing to internalize: attention is what lets the token at position 5 know what's happening at position 12. Whether that glance is even allowed is decided by an attention mask — and that mask turns out to be the star of Part 2.

03Autoregressive: one token at a time, left to right

GPT, Llama, Claude, and Gemini all share one basic move: pick tokens one at a time, in order. The model sees "The cat sat", picks the most likely next token (say on), tacks it on, then does it again with "The cat sat on", picks the, and so on. That left-to-right habit has a name — autoregressive (AR) generation — and it's the only style most people have ever seen.

Two properties of AR matter later. Once a token is picked, it's locked in for good. And the model can only look at what it's already written; it can't peek to the right. Diffusion ends up pushing back on both of those at once.

04"Predicting the next token" really means a probability over the entire vocabulary

When people say the model "predicts" the next word, what it actually hands back is a probability for every token in the vocabulary — a 128,000-long vector that sums to 1. During training the signal is roughly: "out of all those options, the right answer was token #4711. Push that probability up, push the rest down." The math for doing the pushing is cross-entropy loss; the picture is enough.

A trained model is one that puts most of its probability mass on a reasonable next token. Sampling is then just rolling a weighted die against that vector.

05BERT-style fill-in-the-blank is already half of this

Long before anyone said the word "diffusion," BERT (2018) was trained by hiding about 15% of the tokens in a sentence with a [MASK] symbol and asking the model to guess them from context. The same exercise on the back of any language workbook: "The cat sat ___ the mat." BERT got very good at filling blanks but never learned to write whole passages.

Diffusion language models are essentially BERT pushed harder. Instead of always hiding 15%, they hide a random fraction anywhere between 0% and 100%. Then, to generate text, they start with the page entirely blank and fill it in across a few rounds of guessing. That's the core idea you're about to take apart.

Hold onto those five. Every new piece on the page — Markov chains, attention masks, denoising loops, block diffusion — is really just a new arrangement of these five bricks. If something later feels like it appeared out of nowhere, scroll back here.

Part 1

Foundations

From image diffusion to discrete tokens — and why the bridge is non-trivial.

§ 1

Two Ways to Write a Sentence

Every generative model is answering one question: given everything I've seen so far, what comes next? Autoregressive language models answer one token at a time, left to right, with each new token conditioned on the exact tokens already written. GPT, Llama, Claude, and Gemini all (mostly) work this way.

Diffusion models answer the same question from a different starting point. Instead of building the sequence token by token, they begin with a completely corrupted tape — every position is [MASK] — and refine it across a handful of steps, deciding all positions in parallel each step. By the final step every mask has been replaced with a real token. The model didn't write the sentence; it uncorrupted it.

Why there are two ways to begin with

"Writing text" sounds like one job, but there are really two ways to arrive at a finished paragraph. One is to write each word the moment it occurs to you and never look back. The other is to rough out the whole thing first, sharpen the parts you're sure of, and circle back to the rest. The first is autoregressive. The second is diffusion. Neither is obviously the winner — they trade speed, parallelism, and the ability to undo mistakes against each other in different ways.

A lot of confusion in this corner of the field comes from mixing up two questions: how the model was trained, and how it has to generate. Diffusion models aren't magically free of constraints; they just have a different set. Part 1 is about putting names to those constraints so the rest of the page reads as engineering rather than alchemy.

Figure 1.1 — Side-by-side: autoregressive emission vs. diffusion denoising of the same sentence
Autoregressive (left-to-right)
step 0
Diffusion (parallel denoising)
step 0
The autoregressive model emits one token per timestep — 12 timesteps for 12 tokens. The diffusion model commits multiple positions per step and converges in 4 steps. Both reach the same final sentence, by very different paths.

Three things make this worth doing, and the rest of the page is mostly about each of them: parallelism (many tokens commit per step, so a long sentence can finish in fewer model calls), bidirectional context (every position sees every other while generating — including the ones to its right), and self-correction (a wrong token committed early can be revisited and replaced later). Autoregressive models can't do any of these natively.

Intuition

An autoregressive model is like taking dictation: you commit each word the moment you hear it, you can't peek at what comes next, and once a word is on the page, it's there forever. A diffusion model is more like developing a Polaroid: the whole image emerges at once, fuzzy at first, with the sharper features (confident tokens) resolving first and the trickier ones coming into focus later.

The same end result, two profoundly different routes. The route matters — it changes what the model can plan ahead for, how it recovers from mistakes, and how fast it produces output.

Contrast set. The awkward question now is why anyone thought "wipe the page and uncorrupt it" was a reasonable way to write text at all. Honestly, nobody did at first — the whole idea was invented for images, where it works astonishingly well, and only later did anyone try porting it across to language. Before we can see why the port is hard, we need a quick tour of how diffusion does its job on pictures.
§ 2

Why Diffusion Started in Image Space

Diffusion didn't begin with language. It was invented for images, where it now dominates everything from Stable Diffusion to Midjourney to Sora. The core trick is almost suspiciously simple: take a real image, slowly add Gaussian noise until it dissolves into pure static, then train a neural network to undo the noising one step at a time.

Gaussian noise in 30 seconds

"Gaussian noise" is a fancy name for adding a small random number to each pixel, with the number drawn from the bell curve everyone knows from intro stats — mostly near zero, occasionally larger. A little of it makes the picture slightly grainy. A lot of it turns the picture into TV static. Run it for hundreds of steps and you reach pure noise: every pixel has forgotten what it used to be.

A diffusion model is just a small network trained to undo one of those steps. If it can take a slightly noisy image and predict the slightly cleaner version that came before it, then by stacking that operation hundreds of times you can walk all the way back from pure static to a clean image. That's the entire idea: train a one-step denoiser, run it many times.

Figure 2.1 — Drag the slider: forward Gaussian corruption, then reverse denoising
x₀ (clean) → x_T (pure noise)
The forward process is a fixed Gaussian Markov chain: each step adds a little Gaussian noise. The reverse process is what the network learns. Notice that pixel values can be moved infinitesimally — adding 0.01 to a pixel still gives a valid pixel.
The math, in one line

The forward Gaussian step is

$$ q(\mathbf{x}_t \mid \mathbf{x}_{t-1}) = \mathcal{N}\!\left(\mathbf{x}_t;\, \sqrt{1-\beta_t}\,\mathbf{x}_{t-1},\, \beta_t\,\mathbf{I}\right) $$

and the closed-form jump to any timestep is

$$ q(\mathbf{x}_t \mid \mathbf{x}_0) = \mathcal{N}\!\left(\mathbf{x}_t;\, \sqrt{\bar{\alpha}_t}\,\mathbf{x}_0,\, (1-\bar{\alpha}_t)\,\mathbf{I}\right) $$

with $\bar{\alpha}_t = \prod_{s=1}^{t}(1-\beta_s)$. Training reduces to predicting the noise $\varepsilon$ from $\mathbf{x}_t$ — the famous $\mathcal{L}_{\text{simple}} = \|\varepsilon - \varepsilon_\theta(\mathbf{x}_t, t)\|^2$.

Three things are happening. First, each step shrinks the image a hair (that's the $\sqrt{1-\beta_t}$ factor) and adds a small amount of noise with variance $\beta_t$. Second, because every step is independent Gaussian, you can collapse any number of them into a single jump — handy at training time, since you never have to simulate the whole chain. Third, the loss boils down to: given a noisy version, guess the noise. If the network can name the noise, subtracting it gets you back the original. That's what $\mathcal{L}_{\text{simple}}$ is asking for.

This works beautifully on images because they live in a continuous space. Every pixel is a real number, and "image plus a little noise" is still a valid image. Now ask the obvious follow-up: what is "a token plus a little Gaussian noise"?

For images, then, the recipe is clean: add noise, denoise, repeat. It rests on one quiet assumption — that "image plus a little noise" is still a meaningful image. For pixels that's true, because brightness lives on a smooth scale. The next section asks whether the same thing is true for text. It isn't, and the way it fails turns out to dictate what discrete diffusion has to look like.
§ 3

Why Continuous Diffusion Breaks on Text

Tokens are stubbornly discrete. A token is an integer ID into a vocabulary of, say, 128,000 entries. There is no "Gaussian neighborhood" around the integer 42 — token 42 might be the word "dog," token 43 might be the suffix "##ing," and token 41 might be a Chinese character. Adding 0.5 to a token ID gets you precisely nothing.

Continuous vs discrete, in plain terms

A continuous quantity is one you can nudge by an arbitrarily small amount and it still means something — temperature, height, pixel brightness. A discrete quantity comes from a fixed menu with nothing in between: whole numbers, chess squares, the words in a dictionary. The integers 4 and 5 sit next to each other on the number line, but the meanings "four" and "five" are no closer to each other than "four" and "synchrotron." The ordering of words in a vocabulary is an accident of how someone numbered them; underneath, there's no geometry at all.

Diffusion only works when "almost the same" actually means something. For pixels it does. For tokens it doesn't. That one fact is what forces the rest of this part of the page; everything that follows is the workaround the field came up with.

Figure 3.1 — Hover the pixel grid vs. the token grid. Pixels admit smooth interpolation; tokens don't.
Pixel space — continuous
hover to move the pixel value
Token space — discrete
hover a token — neighbors are unrelated
Pixels live on a continuum: the value 0.42 and 0.43 are nearly indistinguishable. Tokens live on a vocabulary: token #42 ("dog") and token #43 ("##ing") have no relationship at all. The Gaussian forward kernel that powers image diffusion is meaningless in vocab space.

Two responses emerged. The first was embedding-space diffusion: embed each token into ℝd, run Gaussian diffusion on the embeddings, and round back to a token at the end. It works in a technical sense, but the rounding is lossy and most of the model's capacity ends up learning the rounding boundary rather than learning language. By 2024 this line had quietly become a historical branch.

The second response is the one that actually won: discrete diffusion. Throw out the Gaussian forward kernel entirely. Replace it with a categorical Markov chain that lives directly in vocabulary space. The rest of this page is the story of how that one substitution turned diffusion into a serious challenger to autoregressive language modeling.

We need a corruption process that stays inside the vocabulary, rather than one that lives in a continuous space we then have to round out of. The fix is to drop Gaussian noise altogether and swap in something simpler: at every step, each token has some chance of being replaced by another token, or by a special blank symbol. No real numbers, no embeddings, just random swapping. The math people call this a Markov chain over tokens.
§ 4

Discrete Diffusion: A Markov Chain Over Tokens

What's a Markov chain (and a transition matrix)?

A Markov chain is a random process where the next state depends only on the current state — not on the full history. The toy example is weather, simplified to "sunny / cloudy / rainy." If today is sunny, there's some probability tomorrow is sunny, some that it's cloudy, some that it's rainy. Stack those three rows of probabilities into a tiny table and you have a transition matrix: row = today, column = tomorrow, cell = probability.

For text the same table is much bigger — one row and one column for every token in the vocabulary, so $K \times K$ with $K$ maybe 128,000. Every cell answers the same kind of question: if this position is token $i$ right now, what's the chance that one corruption step turns it into token $j$? Most cells are zero or essentially zero; the interesting design choice is which non-zero pattern you choose.

In a discrete diffusion model (the family called D3PM, introduced by Austin et al. in 2021), the forward "noising" step is governed by a transition matrix Qt of shape K × K, where K is the vocabulary size. Qt[i, j] is the probability of token i transitioning to token j at step t. Apply Qt repeatedly and you get gradually corrupted token sequences — no Gaussians, no embeddings, just stochastic token replacement.

Three concrete choices of Qt matter for language:

Figure 4.1 — Pick a corruption variant and a corruption rate. Watch the same sentence corrupt three different ways.
Absorbing-state corruption replaces tokens with [MASK] — the model knows which positions are corrupted. Uniform corruption replaces tokens with random other tokens — the model doesn't know which are corrupted, and must figure it out. Almost all modern diffusion LLMs use absorbing-state because of this information advantage.

From here on, when we say "diffusion language model" we mean masked (absorbing-state) discrete diffusion. This is the family that includes MD4, MDLM, SEDD, LLaDA, Gemini Diffusion, and Mercury.

Intuition: why MASK won

Imagine you're proof-reading a page where some words have been replaced. With uniform corruption, swapped words look like every other word — you have to figure out which positions are wrong AND what they should be. With MASK corruption, the corrupted positions are crossed out — you only need to figure out what they should be. The first job is much harder than the second. Models trained with MASK can spend their full capacity on prediction rather than detection.

We now have a corruption process that actually fits text: MASK out a random subset of tokens. The training objective that comes with it looks intimidating at first — a continuous-time evidence lower bound, an integral over schedules, transition matrices, KL terms. The next section is the moment the field collectively noticed that, for the MASK-only variant, all of that collapses into one short line of cross-entropy. That collapse is what made diffusion language models practical.
§ 5

The Simplification That Made It All Click

For a few years (2021–2023), discrete diffusion was a niche topic — interesting math, but the models trained sluggishly and underperformed BERT. In 2024 two papers (MD4 from Google DeepMind, and MDLM from a separate group) showed that the entire training objective for masked diffusion collapses to something stunningly simple:

The training loss, simplified
$$ \mathcal{L}(\theta) = \int_0^{1} w(t)\, \mathbb{E}_{\mathbf{x}_0,\, \mathbf{x}_t \sim q_t(\cdot|\mathbf{x}_0)} \left[\, \sum_{i \in M_t} -\log p_\theta(x_0^i \mid \mathbf{x}_t) \,\right]\, dt $$

— summed over masked positions $M_t$ only, where $t$ is the mask rate and $w(t)$ is a fixed weighting derived from the noise schedule. For the standard "linear" schedule (mask each token with probability $t$), $w(t) = 1/t$.

Read it left to right and ignore any symbol you don't recognize. The thing inside the brackets is the same "did I get the right answer" cross-entropy score from card 04 of the warm-up. The sum runs only over positions that were masked, so the easy ones don't count. The $w(t)$ weights that score based on how aggressively things were corrupted. The integral over $t$ just averages everything across every possible mask rate from 0% to 100%. That's the whole loss.

Read that twice. This is just BERT's masked language modeling loss, but with the mask rate sampled uniformly from [0, 1] instead of fixed at 15%, and with a 1/t weighting. The entire mathematical edifice of "diffusion" — Markov chains, ELBOs, score functions, transition matrices — collapses, in the masked variant, to "weighted MLM with a continuous schedule."

Figure 5.1 — Drag t. Watch the mask rate change, and see how the 1/t loss weight emphasizes light masking.
weight w(t) = 1/t = 2.00
The loss is computed only on the masked positions (highlighted). At small t (light corruption), w(t) is large and each per-token mistake costs more — the model is forced to be very accurate when context is plentiful. At large t (heavy corruption), w(t) is small and the model is given more slack.

This collapse is the moment diffusion LLMs became viable. Training is now operationally indistinguishable from BERT's MLM — every existing MLM trainer, every distributed-training trick, every optimizer ablation, transfers directly. The "diffusion" content lives entirely in (a) how you choose the schedule, (b) how you weight the loss, and (c) how you sample from the trained model. The model itself is just a Transformer trained on a generalized masked-LM objective.

LLaDA's training loss, published by Renmin University + Ant Group in February 2025, is exactly this — Equation 3 of the LLaDA paper is the linear-schedule special case of MD4's general formula. The simplification turned out to be the same one, found independently.

If you only remember one thing from Part 1

A masked diffusion language model is trained almost exactly like BERT. Two things change. First, the fraction of tokens hidden isn't fixed at 15% — it's drawn fresh for every example, anywhere from 0% to 100%. Second, the easier examples (small mask rate, lots of context) count for more in the loss than the harder ones. Same Transformer, same cross-entropy, same optimizer; only the way you set up the training examples changes.

If that sounds like "BERT with extra steps," the extra steps are what turn a blanks-filler into a real generator. Parts 3 and 4 are about how.

§ 5·b

Feel It: Drag The Mask Rate

Before going further, build a physical feel for what t means. Drag the slider. Every position has a fixed random draw; whichever positions happen to land below t become [MASK]. At t = 0 the model sees a clean sentence; at t = 1 every position is hidden. The training loss samples a random t for each example, so the model has to be competent at every mask rate from near-zero to near-one.

Figure 5·b — Drag t. The same sentence, corrupted at three different rates of intensity.
The 1/t weighting in the loss means a single mistake at t = 0.05 (only 5% masked) costs 20× as much as a mistake at t = 1.0. Training is gently nudged toward getting the "easy" cases (lots of context) perfect, while permitting more slop on the "hard" cases (lots of mask).
The two extremes are the same model

A diffusion LLM at t very small is doing what BERT does — fill in a handful of blanks given lots of context. A diffusion LLM at t very large is doing something like image generation — sculpt a sentence out of nothing but the prompt. The remarkable claim of MDLM is that the same Transformer, trained on a uniform mix of t values, becomes fluent at both — and at every regime in between.

We've built the math. Now we need to ask: what kind of neural network can actually run this objective at scale — and how does it differ from the autoregressive Transformers we already know?
Part 2

Architecture

What changes in the Transformer when you train it as a diffusion model.

§ 6

The One Change That Changes Everything: Bidirectional Attention

A minute on attention masks

Inside any attention layer, every position asks the same question: which other positions should I look at? It gets back a similarity score for each candidate and forms a weighted sum from them. Up to that point, every position is fair game.

The attention mask is the rule that bans some of those lookups before they happen. It's a square grid the size of the sequence: cell $(i, j)$ is 1 if position $i$ is allowed to look at position $j$, and 0 otherwise. Different masks turn the same Transformer into very different models. The gap between an AR Transformer and a diffusion Transformer, at the implementation level, really is just two different masks. The figure below lets you flip between three of them.

An autoregressive Transformer (GPT, Llama) uses a causal attention mask: token at position i can attend only to positions 1 through i. This is the structural enforcement of left-to-right generation. A diffusion Transformer (LLaDA, Gemini Diffusion, Mercury) removes that mask. Token at position i can attend to every position — including positions to its right.

Figure 6.1 — Click each mask. Black = attention allowed, gray = blocked. The diagonal is always allowed (self).
Position i sees 1…i. KV cache is reusable across emit steps.
Every position sees every other. KV cache is destroyed.
Bidirectional within a block, causal between blocks. KV cache for committed blocks.
This is the central architectural trade-off of diffusion LLMs. Full bidirectional attention is what lets every token see global context — but it destroys the KV cache that makes autoregressive generation fast. Block diffusion is the engineering compromise: bidirectional within a block (so a block decodes jointly), causal between blocks (so committed blocks become a cacheable prefix).

Drag the block-size slider above. At block size 1, the mask is fully causal — the model is operationally identical to AR. At block size = sequence length, the mask is fully bidirectional — full MDLM. In between, you get production block diffusion. This single slider is the AR-to-diffusion continuum. Modern systems live around block size 32.

Intuition: peripheral vision

Causal attention is reading with a card sliding down the page — you can only see the line you're on and the lines above. Bidirectional attention is reading with all of your peripheral vision — every word is glimpsed in the context of every other word. When the model decides what to commit at a masked position, it knows the words to its right exist (just doesn't know what they are yet). That is genuinely new information AR can't access.

A concrete example: "The keys to the cabinet ___ on the table." An autoregressive model reading left-to-right sees "cabinet" right before the blank, and might guess "is." But the actual subject is the plural "keys" — so the answer is "are." A bidirectional model sees the whole sentence at once. It knows "on the table" follows, it knows the subject is "keys," and it commits "are" with confidence. Small example, huge structural difference.

§ 7

An Anatomy of LLaDA-8B

To make this concrete: LLaDA-8B is a Llama-3-class Transformer trained as a diffusion model. Here's what changes and what stays.

The five Transformer parts we'll mention

In case the names start flying: the embedding layer turns each token ID into a dense vector by looking it up in a table. Self-attention is the layer we just discussed — where positions read each other. The FFN is a small two-layer MLP that runs on each position independently, and most of a Transformer's parameters live in there. RMSNorm / LayerNorm is a normalization step that keeps activations from blowing up or fading to nothing. RoPE is a rotation applied to the queries and keys so the model knows where each token sits in the sequence.

A Transformer "block" is just self-attention plus an FFN. A full model is thirty to eighty of those stacked on top of one another. LLaDA-8B inherits its block design wholesale from Llama-3. The only differences are the attention mask, the loss the model is trained against, a small change to how the attention heads are grouped, and one extra signal — the current mask rate $t$ — fed in through the FFN.

Figure 7.1 — Hover each component. Green = same as Llama-3, orange = changed for diffusion.
The architecture is mostly Llama-3. Three things change: attention mask (causal → bidirectional), loss (next-token CE → weighted masked CE on masked positions), and GQA (LLaDA drops grouped-query attention, returning to 32 independent query heads). The time-step embedding for the mask rate t is injected via AdaLN-style FFN scaling, similar to image diffusion conditioning.
Architecture set. Now the practical question: how do you actually train this thing — for billions of parameters, in a way that converges, and that doesn't waste the AR checkpoints already sitting on disk?
Part 3

Training

The forward process, the noise schedule, and how to convert an AR checkpoint to a diffusion model.

§ 8

A Training Step, In Slow Motion

Here's what actually happens for one training example. (A "batch element" is one sentence; on a GPU you process hundreds at a time.)

  1. Sample t ~ Uniform(0, 1). This is the mask rate for this example — a fresh number every time, anywhere from 0 (don't mask anything) to 1 (mask the whole sentence). Think of $t$ as "how hard am I about to make this one?"
  2. Corrupt: walk through each position and flip a biased coin. With probability $t$, replace the token with [MASK]; otherwise leave it alone. A 12-token sentence at $t = 0.3$ ends up with roughly 4 random tokens replaced.
  3. Forward pass: run the bidirectional Transformer on the corrupted sentence and read off the logits at every position. (A logit is just an unnormalized score; softmax turns it into the probability vector from card 04.) Positions that weren't masked still get logits — we just ignore them.
  4. Cross-entropy on the masked positions, weighted by 1/t. The model is graded only on the slots it couldn't see. Light corruption (small $t$) makes the grade weigh heavily; heavy corruption (large $t$) makes it weigh gently.
  5. Backprop, optimizer step, next batch. Same neural-net mechanics as anywhere else: the loss tells the gradient which direction to nudge each parameter, and the optimizer takes one small step that way.
What does the network actually learn?

After millions of examples across every mask rate, the network is really learning the answer to one big question: given any partially-masked sentence, what's the joint distribution over the missing tokens? When you query it at inference time, you're running the exact same machinery — only starting from "everything masked" instead of "30% masked at random." That symmetry between training and inference is the reason a single training signal is enough.

Figure 8.1 — Step through one training example. Sample t, corrupt, predict, compute loss.
Notice that every position gets a prediction, but only the masked positions contribute to the loss. This is just BERT MLM with a randomized mask rate.
§ 9

The Noise Schedule: How Fast The Mask Climbs

What "schedule" actually means here

A schedule is just a curve. It tells you, at corruption fraction $t$, how many tokens should still be visible. A linear schedule is a straight line: at $t = 0.5$, half the tokens are still there. A cosine schedule bends in the middle, so most of the masking happens in the middle of the trajectory and tapers near each end. A polynomial schedule with a higher exponent pushes the masking later — most positions stay visible until pretty late, then everything goes at once. The plot below shows three of these along with the loss-weight curve each one induces.

The noise schedule α(t) maps a continuous time t ∈ [0, 1] to the fraction of tokens unmasked. At t = 0, α = 1 (no masking). At t = 1, α = 0 (everything masked). The shape of the schedule between those endpoints determines what mask rates the loss emphasizes — and, by symmetry, the step distribution at inference.

Figure 9.1 — Three common schedules, plus the loss weighting they induce
Linear is the LLaDA default (α(t) = 1−t, w(t) = 1/t). Cosine smooths the endpoints. Polynomial-k shifts the weight toward heavier or lighter corruption. The choice changes what the model spends its capacity learning: linear over-weights the easy cases (few masks), polynomial-2 distributes more evenly.
§ 10

AR → Diffusion: The WSD Curriculum

What's a "checkpoint" and why does it matter?

A trained language model is, at the end of the day, just a giant blob of numbers — every weight matrix in the Transformer, all saved together. That blob on disk is what people call a checkpoint. A frontier-scale one costs millions of dollars in GPU time to produce, so teams guard them carefully. Which raises an obvious question once you want to switch paradigms: do I have to throw the old checkpoint out and start from scratch? The good news is no. You can morph an AR checkpoint into a diffusion one for a small fraction of the original training budget — which is what the next section is about.

Training a 100-billion-parameter language model from scratch is an order-of-magnitude commitment of GPU-hours. Nobody wants to throw away an existing pretrained autoregressive checkpoint and start over for the diffusion variant. AR2Diff (DeepMind, 2024) and WSD (Ant Group, 2025) both solve this: take an AR checkpoint, gradually morph it into a diffusion model.

LLaDA2.0's Warmup-Stable-Decay curriculum is the most ambitious instance. It parameterizes the model by a block size L_B that controls how much bidirectional attention is on. At L_B = 1, the model is pure AR. At L_B = sequence length, it is pure full-sequence diffusion. The curriculum walks the model up the continuum, lets it stabilize in pure-diffusion mode, then walks it back down to a small operational block size for inference.

Figure 10.1 — Play the LLaDA2.0 WSD curriculum. Block size walks 1 → 4096 → 32.
current L_B = 1
phase: warmup
The warmup phase (L_B: 1 → 4 → 32 → 64 → 4096) smoothly anneals the AR model into full-sequence diffusion mode while preserving the pretrained knowledge. The stable phase (L_B = 4096) trains pure MDLM on the full sequence. The decay phase (L_B: 4096 → 32) compresses back down to a production block size that supports KV-cache reuse at inference.
The Gaussian-noise hack

During AR pretraining, the embedding for the [MASK] token never receives gradient (because [MASK] is never seen), so its weight decays to zero. When you switch to diffusion training, every masked position has a near-zero embedding — and at high mask rates the model's predictions collapse into garbage. The LLaDA2.0 paper documents a precise fix: inject independent Gaussian noise into the embedding-layer output for masked tokens during the first iterations. This keeps the L2 norm of the masked-token embedding meaningful without re-initializing weights (which would cause catastrophic forgetting). Small, ugly, essential.

Once the model is trained, it lives or dies at inference time. This is where every architectural commitment from Parts 2 and 3 comes due — and where the engineering creativity in the diffusion-LLM space is most concentrated.
Part 4

Inference

The denoising loop, block diffusion, parallel decoding, and self-correction.

§ 11

The Basic Denoising Loop

Training vs inference, in two sentences

In training we took a clean sentence and corrupted it. At inference we run the same machine in reverse: start from a fully corrupted sequence — every position is [MASK] — and ask the model to uncorrupt it. The forward pass is identical to the one in training. The only new piece is a sampler: a small policy that, each step, decides which masked positions are confident enough to commit and leaves the rest masked for next round.

At inference time, the model starts with a fully masked sequence — every position is [MASK] — and runs N denoising steps. Each step is one forward pass through the Transformer, which emits a probability distribution over the vocabulary at every position. The sampler then decides which masked positions to commit this step, samples a token at each of those, and leaves the rest masked for the next step.

Figure 11.1 — Step through the denoising loop. At each step you see the prediction distribution and which positions commit.
N is the inference-time step budget. With N = sequence length, the model commits one token per step — same compute as AR. With N small, many tokens commit per step in parallel. The conditional-independence assumption ("all masked positions are independent given the current context") gets stretched as N shrinks, which is the tradeoff.
§ 11·b

The Speed-Quality Knob, Made Tangible

Step budget N is the most consequential knob in diffusion inference. Drag it. Press play. Watch the same sentence resolve through 2 steps, 4 steps, 16 steps — and notice how the quality readout responds.

Figure 11·b — Drag step budget N. Press play. Watch the resolution unfold.
The expected-quality curve here is fit from LLaDA2.0's reported score vs. tokens-per-forward ablation. It's not linear: quality plateaus quickly once N is large enough, but drops sharply when N is so small that the model is forced to commit too many tokens at once on too-thin evidence.
Why does this exist at all?

At each step the model assumes masked positions are independent given the current context. That's a lie — they aren't. But the lie is approximately true when the model commits only its highest-confidence positions. The art of diffusion inference is keeping each step's commit set inside the regime where the lie is harmless.

§ 12

Remasking Strategies: Who Commits This Step?

The sampler's only real job is picking which positions to commit each step. Different policies trade speed (commit a lot per step) against quality (commit only when the model is genuinely confident). The four common ones, roughly from simplest to cleverest:

Figure 12.1 — Same model, same prompt, four remasking strategies, side-by-side
Random remasking picks positions uniformly — matches the training objective, but quality is poor at small N. Low-confidence remasking ranks positions by the model's top-1 probability and commits the most confident — empirical workhorse, dominates random remasking by ~10 points on GSM8K. Confidence-threshold variants commit any position above τ — the basis of Fast-dLLM and CAP. Margin-based variants commit on (top-1 − top-2), more robust under miscalibration.
§ 12·b

Inside The Model's Head: A Confidence Tour

When the diffusion model runs a forward pass, every masked position emits a full probability distribution over the vocabulary. The threshold τ is the rule for which positions are confident enough to commit this step. Hover any token below to peek at its top-3 candidates — the same data the sampler uses to decide.

Figure 12·b — Drag τ. Hover any cell for the model's top-3 candidates.
Each cell is a position; the gold fill behind each token shows its top-1 probability. Cells whose top-1 ≥ τ are committed this step (token shown). The others stay as [MASK] and get re-scored next step with the now-richer context. Watch how lowering τ commits more tokens per pass — at the cost of acting on weaker evidence.
Confidence is the speed lever

A well-calibrated model where "0.95 confidence" really means 95% accurate is a model you can run with τ = 0.95 and trust. A poorly-calibrated model where "0.95 confidence" actually means 70% accurate is a model that will commit early, commit wrong, and have no recourse. This is why LLaDA2.0's confidence loss — selectively sharpening predictions only on tokens the model gets right — was a quietly important contribution.

§ 13

Block Diffusion: Killing the KV-Cache Problem

What's the "KV cache," and why does AR get one?

Inside every attention layer, each position computes three vectors: a query (Q), a key (K), and a value (V). Attention scores are dot-products of queries against keys, and the output is a weighted sum of values. In an AR model, once you've produced the first 50 tokens, their K and V vectors at every layer are settled — they only depend on what came before. So the engine caches them. When you compute token 51, you only need its own Q/K/V plus the 50 cached entries. That cache is what people mean by the KV cache, and it's a big part of why AR can run at 100 tokens per second on a single GPU.

Bidirectional attention destroys that. Position 1 now attends to position 50, so the moment position 50 changes — which happens every denoising step — position 1's output changes too. Nothing is reusable. Every step recomputes everything from scratch. At sequence length 4,096 that's the practical reason plain full-bidirectional diffusion never made it out of research demos.

Recall from §6: full bidirectional attention destroys the KV cache. Every denoising step re-attends from scratch across the whole sequence. With sequence length 4096 and 32 steps, that's 32 × O(4096²) attention computations per generation. This is what makes vanilla MDLM uncompetitive at production scale.

Block diffusion fixes it. Partition the output into blocks of size B (typically 32). Within a block, attention is bidirectional — the block decodes jointly. Between blocks, attention is causal — block k attends only to blocks 1…k. Once block k is fully decoded, its K/V is frozen and cached. The decoder marches left-to-right at the block level while doing parallel bidirectional refinement at the token level.

Figure 13.1 — Block-by-block decoding. Watch each block resolve, then become a cacheable prefix.
This is the structural backbone of Gemini Diffusion, LLaDA2.0/2.1, Mercury, and Seed Diffusion. Block size 32 has emerged as a near-universal sweet spot. LMSYS observes that block diffusion "bears a high degree of similarity to chunked-prefill" — the serving primitives are the same as existing AR engines, which is why SGLang could ship Day-0 support.
Block diffusion = read by paragraph

Full bidirectional MDLM is reading the whole book at once with peripheral vision on every page — gloriously parallel, infeasible to cache. Block diffusion is reading one paragraph at a time: inside the paragraph you can flick your eyes around freely, but once a paragraph is read you lock it in and move on. The locked-in paragraphs become a KV cache. This is the engineering compromise that made diffusion LLMs deployable.

§ 13·b

A Race: AR vs Diffusion Forward Passes

Set a sequence length. Set a diffusion step count. Press play. Both models start with an empty page; AR commits one token per forward pass, diffusion commits ⌈seq_len / N⌉ tokens per pass. Watch the diffusion bar pull ahead.

Figure 13·b — Same sequence, same model size, different generation strategy
This is the upper bound for diffusion's speedup — what you get if every forward pass costs the same (which is approximately true, since both attention masks scan the full sequence length). In practice the speedup is smaller: AR engines have KV caching that diffusion only partially recovers via block-level caching, and diffusion's bidirectional attention is more expensive per pass.
Why isn't it 10× then?

A vendor showing a "10× faster" claim is usually comparing a diffusion model at aggressive step budget (8 steps over 1024 tokens) against an AR model with no KV cache. Apples to apples on the same hardware, with both engines tuned, the honest number is closer to 2× at parity quality. Still impressive — but the 10× headline number is engineering theatre.

Block diffusion handles the structural cost. Inside each block, though, there's still a choice to make: how many tokens do you commit per forward pass? Commit one and you're safe, but you've wasted all that parallel machinery. Commit all of them and you're fast, but every commit was made without knowing what its neighbours will turn into. The obvious middle ground is to commit only the positions where the model is very sure of itself. That's what the next section is about.
§ 14

Confidence-Aware Parallel: The Speed Lever

Block diffusion alone costs T_block forward passes per block. The decisive speedup comes from committing many positions per pass. The dominant policy is Confidence-Aware Parallel (CAP): in one forward pass, commit every masked position in the active block whose top-1 probability exceeds threshold τ. Positions below τ stay masked and get re-scored next step.

Calibration, the unsexy prerequisite

Confidence only means something if it's calibrated. A well-calibrated model that says "0.95" really should be right about 95% of the time when it says so. Standard neural networks are notoriously overconfident — they'll say 0.95 when their true accuracy is closer to 70%. CAP makes that gap painful: every overconfident prediction becomes a frozen wrong answer. So a serious diffusion stack ships more than just a CAP sampler. It also ships training-time losses that make the confidence numbers honest. LLaDA2.0's confidence loss (next callout) is exactly that.

Figure 14.1 — Drag τ. Watch how many tokens commit per pass, and how quality degrades when τ drops too low.
From the LLaDA2.0 ablation: τ = 0.95 produces score 70.15 at 2.55 tokens-per-forward-pass; τ = 0.85 raises throughput to 3.31 TPF but drops the score to 67.90 — an unacceptable quality cliff per the authors' own framing. CAP works only because LLaDA2.0 trains an auxiliary confidence loss that selectively sharpens predictions only on correctly predicted tokens, so the model's confidence becomes a trustworthy commit signal.
The CAP confidence loss

L(θ) = L_SFT(θ) + λ · L_conf(θ), where L_conf is the entropy of the predicted distribution, computed only on tokens that were correctly predicted. The "correctly predicted" qualifier is critical — minimizing entropy unconditionally would push the model toward confident wrong answers. Minimizing it only on the correct subset selectively sharpens calibration where it's safe.

We just bought speed by committing many tokens at once. The cost is that some early commits will be wrong, and there's no built-in way to take them back. AR has the same problem and lives with it. But diffusion has a structural advantage: every position spits out a fresh prediction every step, whether it's already been committed or not. So why not look at those fresh predictions on already-committed positions and overwrite the ones where the model has clearly changed its mind? That's T2T editing, which the next section unpacks.
§ 15

Self-Correction: T2T Editing and Multi-Block Editing

CAP has a structural weakness: a token committed early on weak evidence is final, and the loop has no mechanism to revisit it. LLaDA2.1's T2T (Token-to-Token) editing fixes this. At each step, the sampler maintains two sets:

Positions in Δ_t get overwritten — a committed token is replaced by the new top-1 candidate. This is how a diffusion model can fix its own early-step mistakes mid-generation.

Figure 15.1 — Watch a wrong token get committed early, then replaced by T2T after more context arrives
LLaDA2.1 ships two operating points. Speedy mode uses τ_mask ≈ 0.5, τ_edit ≈ 0.0 — commits aggressively, lets T2T clean up. Quality mode uses τ_mask ≈ 0.7, τ_edit ≈ 0.5 — conservative commitment, minimal editing. Speedy mode is 2.1× faster than LLaDA2.0 and quality-equivalent, because T2T repairs the over-commitments.

Multi-Block Editing (MBE) extends this across block boundaries: after block k+1 is decoded, the sampler revisits positions in blocks 1…k whose newly-available right-context changes their top-1 prediction. Architecturally this means breaking the K/V cache for any block where edits trigger and re-running attention — expensive, but only triggered when needed. LLaDA2.1 reports MBE consistently improves benchmarks on reasoning and coding tasks where late evidence invalidates early commitments.

§ 16

Speed vs. Quality: The Real Tradeoff Curve

How to read a throughput-vs-quality plot

Two numbers matter for any serving system: tokens per second (how fast text comes out) and benchmark score (how good it is). Put them on x and y and every configuration shows up as one point. A configuration is strictly better than another only if it wins on both axes; otherwise you're picking a trade-off. The chart below shows where AR baselines and various diffusion configurations land on the same axes, under the same hardware, the same serving stack, and the same sequence length. That last sentence is doing most of the work — almost every marketing chart you'll see in this space is missing one of those controls.

Every diffusion-LLM acceleration trick is a point on a single curve: throughput vs. benchmark score. The marketing-grade "10× faster than autoregressive" numbers come from comparing favorable conditions on one side with unfavorable conditions on the other (small GPU, no continuous batching, etc.). The honest controlled-comparison number is ~2×.

Figure 16.1 — Throughput vs. quality, controlled comparison on 8×H20
Data from the LMSYS Day-0 SGLang post (Dec 2025) and the LLaDA2.0 paper. Same hardware, same TP=8, same serving stack. The honest number for "diffusion vs. AR speedup at parity quality" is ~1.9–2.1× on small batch. Marketing-grade 10× numbers reflect unfavorable AR baselines.
§ 16·b

Where Diffusion Wins — And Where It Doesn't

The mechanics are settled. The natural next question is empirical: on which tasks does this paradigm actually outperform autoregressive models, and on which does it not? Click any row to read the why.

Figure 16·b — Diffusion vs autoregressive across 9 benchmarks. Click a row for the reason.
Numbers compiled from Stable-DiffCoder (controlled comparison), Mercury Coder benchmarks, Gemini Diffusion benchmark card, and LLaDA2.1 reports.
A pattern, not a coin flip

Diffusion wins decisively on tasks that are inherently non-sequential — rewriting a function signature changes every call site at once; filling a hole in the middle of code needs left- and right-context simultaneously. Diffusion loses on tasks where each conclusion depends serially on the one before — multi-hop science, knowledge retrieval. The wins and losses are predictable from task structure.

§ 16·c

The Coordination Problem, In One Visualization

Here's why diffusion struggles on chained reasoning. When the model commits a block of 5 tokens in parallel, each must be independently plausible without seeing the exact content of the other four. For code, this is fine — structural tokens are strongly predictable. For chained logic, where each step is about the previous one, it's fragile.

Figure 16·c — The same 5-step reasoning chain, generated two ways.
Feng et al. proved this formally: masked diffusion needs a linear number of denoising steps for low reasoning error — which dissolves the parallelism advantage. The practical fix is hybrid: AR for the chain-of-thought, diffusion to fill in the prose.
With where this paradigm wins and where it bends now in sharp focus, the question becomes who is actually building it — and what their stacks look like.
Part 5

The Stacks

Google DeepMind's four-layer stack, and Ant Group's open-source LLaDA lineage.

§ 17

Google DeepMind: MD4 → AR2Diff → Gemini Diffusion

Why we say "stack" instead of "model"

When a lab ships a model, the model is the tip of an iceberg. Underneath sit the math that defines the training objective, the recipe for turning an existing checkpoint into the new paradigm, the inference engine that runs it fast in production, and the evaluation playbook. A "stack" is the whole iceberg. DeepMind and Ant Group both published every layer of theirs; the next two sections walk through them in the order they were built.

DeepMind's diffusion-LLM work is a four-layer stack, assembled over roughly 24 months. The math layer (MD4) gave the simplification we unpacked in §5. The schedule generalization (GenMD4) made the noise schedule learnable per-token. The transfer recipe (AR2Diff) let an existing AR checkpoint become a diffusion model with a small additional pretraining budget. The serving system (Gemini Diffusion) is the productization — a block-diffusion model demoed at Google I/O 2025.

Figure 17.1 — DeepMind's diffusion-LLM stack, click each layer
Figure 17.2 — Gemini Diffusion vs. Gemini 2.0 Flash-Lite, by benchmark category
Gemini Diffusion
Gemini 2.0 Flash-Lite (AR)
Within ~1 point of Flash-Lite on code and short math (HumanEval, MBPP, LiveCodeBench, BigCodeBench, AIME 2025). Falls 10–16 points behind on multi-hop reasoning and broad knowledge (GPQA Diamond, BIG-Bench Hard, Global MMLU Lite). This is the coordination problem: parallel commitment within a block struggles on long chains of dependent inferences. Block diffusion partially recovers AR's prefix-conditioning, but not entirely.
§ 18

Ant Group / inclusionAI: The LLaDA Lineage

In a 12-month sprint, Ant Group and Renmin University released five generations of open-source diffusion LLMs — culminating in LLaDA2.0-flash, the first 100B-parameter diffusion model. Every checkpoint is MIT/Apache licensed; every paper ships with code. It's the most aggressive open-source push in the diffusion-LLM space.

What's an MoE, and what does "100B / 6.1B active" mean?

In a regular dense Transformer, every parameter takes part in every forward pass — a 100B-parameter model uses all 100B parameters for each token. A Mixture of Experts (MoE) replaces the dense FFN inside each layer with a bank of small "expert" FFNs plus a tiny router that selects a few of them per token. So the model can own 100 billion parameters but only run a small fraction — the "active" ones — for any given token. LLaDA2.0-flash has 100B total parameters and only about 6.1B active per token, which gives it roughly the capacity of a big model at roughly the inference cost of a small one.

The figure below shows the routing concretely: 256 routable experts plus one always-on "shared" expert, with the router picking 8 of the 256 each time. Those numbers aren't just trivia — they're a big part of how a Chinese lab fits a frontier-scale diffusion model onto export-restricted GPUs.

Figure 18.1 — Five generations of LLaDA. Click each.
Figure 18.2 — LLaDA2.0-flash MoE routing: 256 routed experts + 1 shared, top-8 per token
100B total parameters; only ~6.1B active per token thanks to the 1/32 activation ratio. The shared expert is always active; the router picks 8 of 256 routed experts per token, weighted by sigmoid routing scores (aux-loss-free).
§ 18·b

VRPO & EBPO: Reinforcement Learning, When Likelihoods Are Noisy

Why post-training matters

A freshly pretrained language model is a fluent next-word predictor. What it isn't yet is a model with preferences — it has no opinion on helpful vs rude, or correct math vs confidently-wrong math. The fix is post-training: a second phase where the model is shown pairs of outputs and told "this one is better than that one." The algorithms that turn preference labels into weight updates (DPO, GRPO, PPO) are all flavours of reinforcement learning, and they all need the same quantity: how likely is this output under my current model?

For an AR model that's easy — the probability factors into a product of next-token probabilities you're already computing. For a diffusion model it doesn't factor cleanly; you can only estimate it (with the ELBO from §5), and the estimate is noisy. Section 18·b is about how Ant Group brought that noise down far enough to do RL on a 100B-parameter diffusion model.

Reinforcement learning algorithms — DPO, GRPO, PPO — all depend on one quantity: the log-likelihood that the policy assigns to a sample. For an autoregressive model, this is exact and free (factor the chain rule, sum the log-softmaxes). For a diffusion model, it is intractable. You can only estimate the log-likelihood via the ELBO, and those estimates are noisy. Plug noisy estimates into a policy-gradient algorithm and the gradient becomes noisy too — training oscillates, sometimes diverges, and the learning rate has to be tuned an order of magnitude smaller than for AR. This is the single biggest reason RL on diffusion was a research curiosity until 2025.

Ant Group cracked it twice. VRPO (Variance-Reduced Preference Optimization), shipped with LLaDA 1.5 in May 2025, applied three variance-reduction tricks to DPO. The first two are budget allocation — many timesteps with one mask each, rather than few timesteps with many masks. The third is the trick: antithetic sampling. When you compute the policy's ELBO and the reference model's ELBO, use the same random masks for both. When you take the difference (which is what DPO needs), most of the noise cancels.

Figure 18·b — Naive vs antithetic ELBO estimation. Press play to watch both estimators trace the same true log-likelihood.
VRPO ablation (LLaDA 1.5 paper, Table 2): the variance of the gradient drops by roughly 5× when antithetic sampling is added. GSM8K jumps +4.7 points, Arena-Hard +4.3 points — entirely from variance reduction, no extra training budget.
Antithetic sampling, in one image

Imagine you're measuring two slightly different ocean tides at the same beach. If you measure them on different days, the weather adds noise to each — the difference is dominated by weather, not by the tides. If you measure them on the same day at the same hour, the weather is shared between both measurements, so it cancels in the subtraction. That's antithetic sampling. The "weather" here is the random choice of which tokens to mask when estimating the ELBO.

VRPO got LLaDA 8B to the alignment level needed for instruction following. But it didn't scale: at 100B parameters, even the variance-reduced ELBO was too noisy for the longer sequences needed for serious code RL. So in December 2025 the team shipped EBPO (ELBO-based Block-level Policy Optimization) — the first RL framework operated at 100B scale on a diffusion model.

EBPO's key move is to compute the ELBO block by block rather than over the whole sequence. The 100B model already trains with block size 32; EBPO inherits the same block partition for RL, computing one local ELBO per block and combining them additively. This gives the algorithm two structural advantages: per-block ELBOs have lower variance individually (fewer mask positions per estimate), and the cumulative gradient is more stable. EBPO is what drove LLaDA2.0-flash from a 23 to a 60 on AIME 2025 — a 45% post-training improvement on math reasoning.

Pretraining cost saved
< 0.5%
vs full from-scratch RL
GSM8K gain (VRPO)
+4.7
LLaDA 1.5 vs SFT baseline
AIME 2025 gain (EBPO)
+36.7
LLaDA2.0-flash preview → final
First RL at this scale
100B
non-autoregressive params
§ 18·c

dInfer: The Inference Stack That Actually Ships

A model is only as useful as the engine that serves it. When Ant Group released LLaDA2.0 they also released dInfer — a diffusion-native inference engine written specifically to exploit the unique structure of block-diffusion decoding. dInfer is open-source, Apache 2.0, and shipped with a Day-0 integration into SGLang.

Each layer in dInfer's stack is a separately-published optimization. Together they take a 100B model from ~237 TPS (Qwen3-30B AR baseline on the same hardware) to ~1,587 TPS on LLaDA2.1-mini's HumanEval+ benchmark — a 6.7× cumulative improvement, every step of which is independently ablated in the LLaDA2.0 and LLaDA2.1 technical reports.

Figure 18·c — Speedup waterfall. Each row is a separately-reported optimization in the Ant Group inference stack.
Numbers from LLaDA2.0 / LLaDA2.1 papers and the LMSYS Day-0 SGLang post (Dec 2025). All measured on 8×H20 GPUs at SGLang TP=8. The headline 6.7× is real and reproducible — though it requires assembling every layer.
dInfer vs the ecosystem
Open source Apache 2.0

On LLaDA-MoE (a 7B diffusion model used as the public benchmark for dInfer), serving HumanEval+:

dInfer
1,011 tok/s
vLLM (Qwen-2.5-3B AR)
294 tok/s
NVIDIA Fast-dLLM
91 tok/s

dInfer is roughly 3× faster than vLLM serving a smaller AR model, and 10× faster than NVIDIA's own Fast-dLLM. The headline framing is loaded — different model architectures, different hardware tunings — but the structural point holds: diffusion-specific kernels beat general-purpose ones at this workload by a wide margin.

Why does the engine matter so much?

Diffusion decoding has many more degrees of freedom than AR: block size, threshold τ, edit threshold, remasking strategy, KV reuse policy, FP8 schedule, expert routing batch granularity. An engine that gets all of these defaults right is doing more for end-to-end speed than any single algorithmic improvement to the model itself. This is why Ant Group shipping dInfer mattered: it turned a research model into a deployable one.

§ 18·d

The Open-Source Push: inclusionAI

Every model and tool described in this Part is released through Ant Group's inclusionAI organization on GitHub and HuggingFace. Apache 2.0 licenses. Pre-training data is publicly described (though not always publicly downloadable). Training infrastructure (dFactory), inference engine (dInfer), and benchmark suite all open. The lineage:

inclusionAI ecosystem, end-to-end
Models
LLaDA-8B
LLaDA-MoE (7B/1.4B)
LLaDA2.0-mini (16B/1.44B)
LLaDA2.0-flash (100B/6.1B)
LLaDA2.1-flash, -mini
Training
dFactory (WSD curriculum)
VRPO (DPO + antithetic)
EBPO (block-level PG)
CAP (confidence loss)
T2T / MBE editing
Serving
dInfer (3-10× over vLLM)
SGLang Day-0 integration
FP8 per-block quantization
Alpha-MoE megakernel
KV cache reuse

For context, this is the most comprehensive open-source release in the diffusion-LLM space. Every other 100B-class diffusion model in 2025–2026 is closed (Mercury, Seed Diffusion, Gemini Diffusion). Every other open model is smaller (DiffuCoder 7B, Stable-DiffCoder 8B). The combination — frontier scale + full open weights + open training and serving toolchain — is what makes Ant Group's bet legible to the broader research community.

The strategic argument

"Ant Group's push into alternative model paradigms underscores how China's Big Tech firms are stepping up efforts in algorithm and software optimisation to offset the country's disadvantages in advanced AI chips." (South China Morning Post, Dec 2025). The 5–10× inference speedup that diffusion offers is, in a hardware-constrained environment, equivalent to a generation of new chips. That is the bet.

Enough exposition. The point of an explainer is to let you poke at it. The next two figures put the full diffusion-decoding loop and the reverse-curse demo in your hands.
Part 6

Playground

Try it yourself. Run a denoising loop. See the reverse curse. Tune the speed/quality knob.

§ 19

Build Your Own Denoising Loop

Pick a sentence. Pick a block size, a number of steps, a remasking strategy. Watch the model "generate" by uncorrupting a tape of masks. (This is a simulated diffusion process — the predictions are pre-baked from a real LLaDA-style trace, not a live model — but the dynamics are faithful.)

A small experiment to try

Drag the step budget down to 2 and basically everything commits in one pass — the result is lumpy. Drag it up to 12 and each step commits only the most confident handful, and the sentence resolves cleanly. That one slider is the speed-vs-quality lever every diffusion engine ships with. Production systems pick a point on this curve based on the workload: short factual answers can run at 4 steps, long coding tasks usually want 16 or more.

Figure 19.1 — Full diffusion-decoding playground
§ 20

The Reverse Curse Demo

What "reverse curse" actually means

Train an autoregressive model on the sentence "Tom Cruise's mother is Mary Lee Pfeiffer," and it'll answer "Who is Tom Cruise's mother?" no problem. Flip it around and ask "Who is Mary Lee Pfeiffer's son?" and the same model often whiffs, even though the information is logically the same. The reason is purely structural. During AR training the model only ever read that sentence left to right, so the gradients flowed "Tom Cruise" → "mother" → "Mary Lee Pfeiffer" and never the other way. A bidirectional (diffusion) model treats both halves of every sentence as evidence for each other, so the asymmetry never gets baked in. The demo below shows the same phenomenon on Chinese poems, where the training corpus has plenty of forward citations and almost no reverse ones.

Autoregressive models trained on "A is B" struggle to answer "B is A" at inference. This is the reverse curse, and it is a direct consequence of left-to-right training: the model never sees "A is B" as evidence for "B is A." Bidirectional MLE training (i.e., diffusion training) sees both directions equally. The LLaDA paper documents this concretely on Chinese poem completion: forward 51.8% / reverse 45.6% for LLaDA, vs. forward 82.7% / reverse 34.3% for GPT-4o. GPT-4o is dramatically better forward and dramatically worse backward.

Figure 20.1 — Reverse curse, side-by-side
§

Three Things to Remember

If you take only three things away from this page, take these.

1
Diffusion isn't replacing AR — it's merging with it.

Block size is a continuum, not a binary. A diffusion LLM with block size 1 is AR. With block size = sequence length, it is full MDLM. Production settings live in between. The 2026 reality is one model, one set of weights, with the generation paradigm chosen at inference time per workload.

2
Self-correction is the structural advantage.

Going back and fixing mistakes mid-generation isn't a quality boost — it changes what kinds of tasks AI can handle. Code editing, document revision, collaborative writing, any non-sequential workload — these are where diffusion isn't just competitive but decisively ahead.

3
The open-source story is different this time.

Every major open-source diffusion LLM in 2025–2026 comes from a Chinese institution: Ant Group's LLaDA family, ByteDance's Stable-DiffCoder, Renmin University's GSAI-ML. US contributions remain closed (Mercury, Gemini Diffusion). The ecosystem dynamics, the tools, the licensing norms — all different from the AR landscape.

One final image

Autoregressive generation is like writing an essay in ink, on a scroll that only unrolls forward. You cannot erase. If you realize on page 10 that page 2 needs revision, you have to start over.

Diffusion generation is like writing on a whiteboard. You sketch the rough structure first. Fill in the easy parts. Step back, check the whole thing, and erase-and-rewrite the pieces that don't fit. The final result is polished in a way that a single linear pass could never achieve.

Diffusion LLMs are the whiteboard. They're not better at everything. But for the things they're good at, they're genuinely transformative. And they're just getting started.

§

Sources and further reading

Everything in this page is grounded in primary sources. Click any link to go to the original.