Skip to content
Cosvexa – Cosvexa home

Research · Inside modern models

Diffusion language models

A diffusion language model generates text by starting from a fully masked or noisy sequence and refining it over several steps, filling in many tokens in parallel, instead of writing one token at a time from left to right. The approach adapts the diffusion idea behind image generators to text. Research models such as LLaDA (2025) reached quality comparable to similar-sized autoregressive models; the main attraction is speed.

Cosvexa team · Published

Abstract illustration of a row of glowing tiles emerging from a soft fog, some already sharp and bright while others are still blurred, as if a line of text were coming into focus all at once.

Key points

  • Autoregressive LLMs write one token after another; diffusion language models refine a whole sequence over a number of steps.
  • Most current text diffusion models are masked diffusion models: training hides random tokens, and the model learns to restore them.
  • Because many tokens are decided per step, generation can be much faster, and the model can use context on both sides of a gap.
  • LLaDA 8B (2025) was reported to be competitive with LLaMA3 8B, showing the approach can scale.
  • Open issues include output quality at few steps, variable-length output, caching and reasoning performance.

What a diffusion language model is

Almost every well-known large language model is autoregressive: it predicts the next token given all previous ones, appends it, and repeats. Text is produced strictly from left to right, one token per step of the model. A diffusion language model works differently. It starts from a sequence in which every position is masked or noisy, and over a series of denoising steps it predicts and commits tokens across the whole sequence, often many at once, until the text is complete.

The idea comes from diffusion models for images, which learn to reverse a process that gradually adds noise. Images are continuous, so adding Gaussian noise is natural. Text is made of discrete tokens, which is why diffusion for language took longer to work well. Two families emerged: continuous diffusion, which adds noise to word embeddings, and discrete diffusion, which corrupts the tokens themselves, most often by replacing them with a special mask token. Most strong recent models use the discrete, masked variant.

How it works

In a masked diffusion model, the forward process is simple: pick a masking level t between 0 and 1, and replace each token in a training sequence with a mask token with probability t. At t close to 0 the text is almost intact; at t = 1 every token is hidden. A transformer is trained to predict the original tokens at the masked positions, seeing all unmasked tokens on both sides. This resembles the masked language modeling used by BERT, but with masking rates that vary across the full range, which turns the model into a generator rather than only an encoder.

  1. 1

    Start fully masked

    Given a prompt, create a response of a chosen length in which every position is a mask token.

  2. 2

    Predict all masked positions

    Run the model once. It outputs a probability distribution over the vocabulary for every masked position at the same time.

  3. 3

    Commit some tokens

    Fill in a portion of the positions, for example those where the model is most confident, and leave the rest masked.

  4. 4

    Remask and repeat

    Run the model again on the partly filled sequence. Some samplers also remask low-confidence tokens so they can be revised. Repeat until no masks remain.

  5. 5

    Trade steps for quality

    The number of steps is a setting. Fewer steps means more tokens decided per step and faster generation, usually at some cost in quality.

A small example

Prompt: Name the capital of France and one famous museum there. Suppose the response length is eight tokens, all masked. After the first step, the model is most confident about a few positions and fills them: [The] [capital] [_] [_] [Paris] [_] [_] [Louvre]. After the second step it fills more: [The] [capital] [is] [Paris] [_] [the] [_] [Louvre]. A third step completes the sentence. An autoregressive model would have needed eight sequential steps, one per token; this diffusion model used three passes, each over the whole sequence. Notice also that the model placed Louvre near the end before writing the words in between, because it sees the full sequence at every step.

How the field developed

Austin et al. (2021) introduced D3PM, a general framework for diffusion on discrete data. They tried several corruption processes and showed that an absorbing state, a special token that corrupted positions turn into, connects diffusion to masked and autoregressive models. Li et al. (2022) took the continuous route with Diffusion-LM, which denoises Gaussian vectors into word embeddings; its intermediate states made it easy to steer generation toward constraints such as a given syntactic structure.

Quality on standard language-modeling benchmarks still lagged behind autoregressive models. Lou, Meng and Ermon (2023, ICML 2024) proposed score entropy, a loss that extends score matching to discrete data, and reported that their SEDD models were competitive with autoregressive models of similar size, in particular outperforming GPT-2. Sahoo et al. (NeurIPS 2024) showed with MDLM that simple masked diffusion, trained with a good recipe and a simplified objective that is a mixture of masked language-modeling losses, approaches autoregressive perplexity.

In 2025 the approach was scaled up. Nie et al. trained LLaDA, an 8-billion-parameter masked diffusion model, from scratch on 2.3 trillion tokens, then applied supervised fine-tuning. They reported that LLaDA 8B Base was overall competitive with LLaMA3 8B Base on their benchmarks and showed good instruction following after fine-tuning. They also reported that it handled the reversal curse, the difficulty autoregressive models have with relations stated in the opposite direction from training, better than the autoregressive models they compared, for example on a task of completing the previous line of a poem.

Commercial interest followed. Inception Labs described its Mercury Coder models in a 2025 technical report and stated that independent evaluations by Artificial Analysis measured throughputs of 1,109 and 737 tokens per second for its Mini and Small models on NVIDIA H100 GPUs. Google DeepMind announced Gemini Diffusion as an experimental research model in May 2025, and in June 2026 Google released DiffusionGemma, an open experimental model it described as delivering up to four times faster inference on dedicated GPUs. These are vendor figures, not independent benchmarks across tasks.

AspectAutoregressive LLMMasked diffusion LM
Generation orderStrictly left to right, one token per stepAny order; many tokens per step
Context usedOnly previous tokens (causal attention)Tokens on both sides (bidirectional attention)
Speed leverBatching, caching, speculative decodingFewer denoising steps, parallel decoding
RevisionCannot change earlier tokensCan remask and revise uncertain tokens
Output lengthNatural: stops at an end tokenUsually fixed per generation or handled in blocks
MaturityDominant, heavily optimizedResearch and early products

Why it matters

  • Speed. Autoregressive decoding is limited by the number of sequential steps. Deciding many tokens per pass can cut latency, which is the main reason companies are interested. It attacks the same bottleneck as speculative decoding, from a different direction.
  • Bidirectional context. The model can plan the end of a passage while writing the middle, which suits tasks like filling in a gap in code or text, editing, and satisfying constraints on the whole output.
  • Self-correction. Samplers that remask low-confidence tokens let the model revise parts of its answer before finishing, something left-to-right decoding cannot do without starting over.
  • A different inductive bias. Results such as LLaDA's on the reversal curse suggest that the training objective, not only scale, shapes what models find easy or hard.

Limits and common misconceptions

“Diffusion LMs are always faster.” Not automatically. Each denoising step runs the full model over the whole sequence. If many steps are needed for good quality, the total work can exceed that of an autoregressive model, which reuses past computation through the KV cache. Bidirectional attention does not fit the standard KV cache, which is one reason Arriola et al. (ICLR 2025) proposed block diffusion: generate blocks left to right, and run diffusion inside each block, which restores caching and allows flexible length.

Quality at few steps. When many tokens are committed in the same step, each is predicted without knowing the others' final values, which can produce inconsistent combinations. Quality usually improves with more steps, so speed and quality must be balanced.

Fixed length and control. Many models generate a response of predetermined length, padding with end tokens. Variable-length generation, streaming output to a user token by token, and long multi-turn conversations are less natural than for autoregressive models.

“Diffusion LMs have replaced autoregressive models.” They have not. The best general-purpose models remain autoregressive, and most of the tooling, from inference optimizations to reinforcement-learning post-training, was built for them. Diffusion language models are promising but have far less evidence behind them, especially on long reasoning tasks.

Where it is going

Active research areas include hybrids between autoregressive and diffusion generation such as block diffusion, better samplers that decide which tokens to commit, adapting existing autoregressive models into diffusion models instead of training from scratch, reinforcement learning for diffusion LMs, and serving systems tailored to their compute pattern. Code and structured editing are natural early niches, since speed and the ability to fill gaps matter there. Whether diffusion becomes a main paradigm for language or a specialized tool for low-latency tasks is still an open question.

Frequently asked questions

What is a diffusion language model?

It is a language model that generates text by iteratively denoising a masked or noisy sequence, filling in many tokens in parallel over several steps. This contrasts with autoregressive models such as most chat LLMs, which generate one token at a time from left to right.

Are diffusion language models faster than normal LLMs?

They can be, because they decide several tokens per model pass. Vendors have reported large speedups for their diffusion models. Real speed depends on the number of steps, the hardware and caching, and fewer steps usually cost some quality.

How is text diffusion different from image diffusion?

Images are continuous, so image diffusion adds and removes Gaussian noise. Text is discrete, so most text diffusion models corrupt it by replacing tokens with a mask token and learn to restore them, although some models apply continuous noise to word embeddings instead.

What is LLaDA?

LLaDA is an 8-billion-parameter masked diffusion language model trained from scratch by Nie et al. and described in a 2025 paper. The authors reported it was competitive with LLaMA3 8B on many benchmarks and handled reversed relations better than the autoregressive models they compared.

Will diffusion models replace autoregressive LLMs?

It is too early to say. The strongest general models are still autoregressive and the ecosystem is built around them. Diffusion language models are a credible alternative with clear speed and editing advantages, and hybrids that combine both approaches are an active research direction.

References

  1. Austin et al. (2021). Structured Denoising Diffusion Models in Discrete State-Spaces
  2. Li et al. (2022). Diffusion-LM Improves Controllable Text Generation
  3. Sahoo et al. (2024). Simple and Effective Masked Diffusion Language Models
  4. Nie et al. (2025). Large Language Diffusion Models
  5. Arriola et al. (2025). Block Diffusion: Interpolating Between Autoregressive and Diffusion Language Models
  6. Inception Labs et al. (2025). Mercury: Ultra-Fast Language Models Based on Diffusion

More in this section

Start free: 50 Cosvexa-1 questions a day

Every major model in one workspace; on the Free plan Cosvexa-1 answers 50 questions a day. No card needed to start.