Diffusion LLMs: How They Write Without Going Left to Right
A diffusion LLM writes from a masked draft filled in over several rounds, not one token at a time. How it works, which models use it, and where it fits.
On this page
Short answer
A diffusion LLM is a language model that generates text by starting from a fully masked draft and filling in all positions in parallel over several denoising steps. Unlike a normal LLM, which writes one token at a time from left to right, it refines the whole draft at once, which makes it fast at drafting and good at editing.
What is a diffusion LLM?
A diffusion LLM is a language model that generates text using a diffusion process instead of writing one token at a time. It starts with a draft made entirely of mask tokens and fills the whole draft in over several rounds, deciding many positions at once in each round.
The idea borrows from image diffusion models, which start from noise and remove it step by step. For text, the "noise" is a mask: each position starts hidden, and the model reveals tokens round by round until the whole answer is filled in. The process is called masked diffusion.
Diffusion LLMs are a real, working alternative to the usual autoregressive design, not just a research curiosity. The open research model LLaDA showed the approach in 2025, and commercial models such as Mercury from Inception Labs and Gemini Diffusion from Google DeepMind have followed it into products aimed at code and fast drafting.
The key difference is parallelism. A normal LLM needs one forward pass per token, so a long answer takes many passes. A diffusion LLM needs one pass per round, and each round fills many positions, so the number of passes depends on the rounds you choose, not on the length of the answer.
How does a diffusion LLM generate text?
A diffusion LLM generates text by laying out a masked draft of a fixed length, then refining it over a set number of rounds. At each round the model reads the whole draft, including the parts already filled in, and predicts a token for every masked position at once.
After each round, only the most confident predictions are kept. The rest are turned back into masks and guessed again in the next round, when more of the surrounding text is already set. This is called low-confidence remasking, and it is what lets the model fix its own weak guesses instead of locking them in.
The number of rounds is a setting you choose. Fewer rounds mean more tokens decided per pass and faster output, at some cost in quality. More rounds give the model more chances to correct itself, which helps on tasks where consistency matters, such as code or structured data.
Because the model reads the whole draft in both directions, it can use the end of a sentence to fix the beginning, which a left-to-right model cannot. That two-way view is why diffusion LLMs handle editing well: you can mask part of an existing answer and ask the model to rewrite just that part, with the rest as context. The same denoise-in-stages idea powers image models, as how to train a diffusion model explains.
How is that different from a normal LLM?
A normal LLM is autoregressive: it writes left to right, one token at a time, and each new token depends only on the tokens before it. A diffusion LLM writes in rounds, filling many positions at once, and each round can use the whole draft as context.
| Property | Autoregressive LLM | Diffusion LLM |
|---|---|---|
| Generation order | Left to right, one token at a time | Whole draft refined over rounds |
| Forward passes | One per token | One per round |
| Context used | Only what came before | Both directions at once |
| Editing | Rewrite from the change point | Mask and refill any part |
| Length control | Stops when it chooses | Draft length set up front |
| Best at | Open-ended writing, chat | Fast drafting, code, structured output |
The draft length is the main constraint. A diffusion LLM must decide how long the answer will be before it starts, because the masked draft has a fixed size. If the answer needs more room than planned, the model cannot simply keep writing, the way an autoregressive model can.
Another difference is the cache. Autoregressive models reuse past work through a key-value cache, which speeds up long outputs. Diffusion models process the full sequence at every round, so they do not use that cache, and the cost of each round grows with the draft length. For judging model quality, LLM model evaluation covers the checks that matter.
Which diffusion LLMs exist today?
Three diffusion LLMs are worth knowing: LLaDA, the open research model, Mercury, the commercial code model, and Gemini Diffusion, the research model from Google DeepMind. Each shows a different way the idea reaches users.
LLaDA, short for Large Language Diffusion with mAsking, was published as a research model in 2025. It is trained to predict masked tokens from context and is openly available, which makes it the standard way to study and test diffusion text generation. Its performance on general tasks is close to similar-sized autoregressive models.
Mercury, from Inception Labs, is a commercial diffusion LLM aimed at code generation. It is served behind a standard API and is marketed on speed, since its parallel generation produces code drafts quickly. It is not openly downloadable, so teams use it through the vendor's access programme.
Gemini Diffusion, from Google DeepMind, applies the same masked-diffusion idea inside Google's model family. It is a research demonstration rather than a public product, and it shows that the approach scales to large models. The three models together show that diffusion text generation works from small open models to large commercial ones.
Where do diffusion LLMs fit best?
Diffusion LLMs fit best where speed, editing or structured output matters more than open-ended chat. They are strongest at drafting, code and tasks where the answer has a clear shape.
- Code generation. Code has strict structure, and the model can refine a whole function at once instead of writing it line by line.
- Structured output. JSON, forms and tables benefit from the model seeing the whole answer while it fills it in.
- Editing and rewriting. Masking part of a draft and refilling it is natural for this design, and it keeps the rest of the text untouched.
- Fast drafting. When many short answers are needed, parallel generation can produce them in fewer passes than one-token-at-a-time writing.
- Agents and tools. Agents that need a quick first draft to act on can use a diffusion model for speed and an autoregressive model for review.
They fit less well for long, open-ended writing, where the fixed draft length is a problem, and for streaming chat, where users expect the first words immediately. In those cases the usual left-to-right model is still the better tool. A team choosing between model types should test both on its own prompts rather than trusting vendor speed claims, and an LLM development review can set up that comparison.
Example (hypothetical): a support team drafts replies
Example (hypothetical): a support team drafts 60 replies a day, each about 120 tokens long, and wants to know whether a diffusion model would be faster than its current model.
With the current autoregressive model, each reply needs one forward pass per token, so 60 replies times 120 tokens is 7,200 forward passes a day. With a diffusion model set to 8 rounds per reply, each reply needs 8 passes, so 60 replies times 8 rounds is 480 forward passes a day.
The difference is 7,200 minus 480, which is 6,720 fewer passes, or about 15 times fewer. That does not mean the replies arrive 15 times faster in practice, because each diffusion pass processes the whole draft and costs more than one autoregressive pass, but it shows why the approach is worth testing for high-volume drafting.
The team still needs a quality check. It runs both models on the same 60 tickets, compares the drafts, and keeps the one whose answers need fewer edits. Speed only matters if the drafts are good enough to send.
What are the common mistakes?
The most common diffusion LLM mistakes are treating it as a drop-in replacement, ignoring the draft length, and trusting speed claims without testing on your own workload.
- Assuming it replaces every LLM. Diffusion models are strong at drafting and structured output, but weak at long open-ended writing. Use each where it fits.
- Setting the draft length wrong. Too short and the answer is cut off; too long and the model wastes rounds on padding. Test lengths on real prompts.
- Using too few rounds. Cutting rounds to save time leaves low-confidence guesses in the answer. Find the lowest round count that keeps quality.
- Trusting vendor benchmarks. Speed numbers depend on hardware, batch size and prompt length. Measure on your own workload before deciding.
- Skipping the evaluation set. Without fixed test prompts, you cannot tell whether a change in rounds or length helped or hurt.
- Ignoring the API limits. Some diffusion models are only available through a vendor API, which affects cost, data handling and availability.
Key takeaways
- A diffusion LLM fills a masked draft over several rounds, instead of writing one token at a time
- Each round predicts every masked position at once, using context from both directions
- Low-confidence remasking lets the model fix weak guesses in later rounds
- LLaDA, Mercury and Gemini Diffusion show the approach works from open research to commercial products
- Diffusion LLMs fit drafting, code and structured output best; long open-ended writing fits autoregressive models better
- Draft length and round count are settings to test on your own prompts, not defaults to accept
Frequently asked questions
What is a diffusion LLM?
It is a language model that generates text by starting from a fully masked draft and filling it in over several rounds. Each round predicts all masked positions at once, keeps the most confident predictions, and re-masks the rest for the next round, until the whole answer is filled in.
How is a diffusion LLM different from ChatGPT-style models?
ChatGPT-style models are autoregressive: they write left to right, one token at a time, with each token depending only on what came before. A diffusion LLM refines a whole draft in parallel over rounds and can use context from both directions, which makes it fast at drafting and good at editing.
What is LLaDA?
LLaDA, short for Large Language Diffusion with mAsking, is an open research model published in 2025 that applies masked diffusion to text. It is the standard way to study diffusion language modelling, and its performance on general tasks is close to similar-sized autoregressive models.
Are diffusion LLMs faster than normal LLMs?
They can be, because they need one forward pass per round rather than one per token, so fewer passes are needed for a draft. Whether that translates into faster answers depends on hardware, batch size and draft length, so measure on your own workload before deciding.
Can a diffusion LLM edit existing text?
Yes, and editing is one of its strengths. You can mask part of an existing answer and ask the model to refill just that part, while the rest of the text stays as context. A left-to-right model has to rewrite from the change point onwards instead.
When should I not use a diffusion LLM?
Avoid it for long, open-ended writing where the answer length is unknown, and for streaming chat where users expect the first words immediately. In those cases an autoregressive model fits better, because it decides its own length and streams naturally.