Text diffusion: writing a block of tokens by cleaning up noise
Must a language model write from left to right? What if it could fill in a whole block of text at once?
After the prompt “the hare”, a model has seven more tokens to write: “sat on the grass in the sun”.
Every token waits its turn
Writing adds one token per pass, and each pass must wait for the one before it.
Speculative decoding checks guesses in bulk, but each kept token still depends on the ones before it. Could one pass fill several positions on its own?
Let every position guess at once
Start with seven blanks after the prompt, and predict all of them in one pass.
For that, a blank must see the blanks after it too, so we drop the rule that a column cannot look ahead. Every position can now see every other.
Every guess is reasonable on its own, but none of them knew what the others would choose.
Keep the sure ones, look again
So keep only the words the model is most sure of, and blank the rest. Run it again: the remaining blanks can now see the words already chosen.
Starting from noise and cleaning it up a little each pass is how image generators work too. Applied to text, it is called text diffusion.
Learning to fill blanks
Training uses the same game. Take real text, blank out a random share of it, and train the model to fill the blanks back in.
Block by block
Real models fill one block at a time. Google’s DiffusionGemma writes 256 tokens per block in at most 48 passes. Each finished block joins the cache, like the prompt, and the next block starts.
It starts each block from random tokens rather than blanks, and can still change a word it had kept. Google reports text up to 4 times as fast as writing token by token on a GPU, at some cost in quality.
Writing faster by doing more per pass is one approach. Another is to make each pass read less: store the weights in fewer bits.
Sources and assumptions
- Structured Denoising Diffusion Models in Discrete State-Spaces (D3PM), Austin and colleagues, 2021, for diffusion over discrete tokens, including masking as the corruption.
- Simple and Effective Masked Diffusion Language Models, Sahoo and colleagues, 2024.
- LLaDA: Large Language Diffusion Models, Nie and colleagues, 2025: an 8B model trained from scratch by masking text and predicting the masked tokens, competitive with LLaMA3 8B on in-context learning.
- DiffusionGemma launch post and model card: 256-token blocks, random placeholder tokens refined over several passes, up to 4 times faster on GPUs, lower quality than Gemma 4. The 48-pass limit, recomputed acceptance and the cache of finished blocks come from its Hugging Face implementation, summarised on its architecture page.
The words chosen in each pass are illustrative, not the output of a model. Models choose how many positions to keep per pass in different ways; keeping the most confident predictions is one common rule. In the article the model fills blanks; DiffusionGemma’s version, which starts from random tokens and can change kept ones, is described in the last section.