Vibe Engines
YouTube

Vibe Engines is free, interactive AI engineering & system design — runs in your browser. Pick a learning path

Handbooks  /  Autoregressive vs Diffusion LLMs
AI~9 min readComparison
Head to Head

Autoregressive vs diffusion LLMs: one token at a time, or all at once?

AutoregressivevsDiffusion

Almost every model you have used is autoregressive: it writes one token, looks at everything it has written, and writes the next — strictly left to right. A diffusion LLM throws that out. It starts with a whole sequence of blanks and sharpens every position at once over a handful of passes. The difference is not cosmetic; it changes the latency, the memory, and even whether the model can take a word back.

01

The one distinction that decides everything

An autoregressive (AR) model factorizes text as a chain: the probability of a sequence is the product of each token given all the tokens before it. So generation is inherently sequential — token t cannot be computed until token t−1 exists. A diffusion LLM instead starts from a fully masked or noised sequence and runs a fixed number of denoising steps, and at every step it updates all positions together using bidirectional attention. It trades "N tokens means N steps" for "K refinement passes over the whole thing, in parallel."

→ The rule

AR: the number of sequential steps equals the number of tokens. Diffusion: the number of sequential steps is a fixed budget you choose, independent of length. That single fact drives every trade-off below.

02

Head to head

DimensionAutoregressiveDiffusion
Generation orderLeft to right, one token at a timeAll positions at once, refined over K steps
Sequential steps= number of tokens (N)= fixed step budget (K), independent of N
AttentionCausal (can only look back)Bidirectional (sees the whole sequence)
KV cacheYes — each step reuses past keys/valuesNo causal cache; recomputes over positions
Revise earlier tokens?No — once emitted, it is fixedYes — a later step can rewrite an earlier token
Decode bottleneckMemory bandwidth, one token per passCompute over all positions, few passes
Quality / coherenceState of the art, matureImproving fast, historically a notch behind
Tooling maturityDeep (every serving engine)Early, fast-moving
03

When to reach for each

Autoregressive

  • You need the best available quality and coherence today
  • Long, open-ended generation where each token depends tightly on the last
  • You rely on a mature serving stack (continuous batching, speculative decoding)
  • Streaming token-by-token output to a user
  • Tool-calling and agentic loops with established tooling

Diffusion

  • Latency is king and outputs are bounded in length
  • Throughput matters more than squeezing the last bit of quality
  • Tasks that benefit from revising — infilling, constrained edits
  • Parallel generation of many short spans
  • You are exploring the frontier and can tolerate younger tooling
04

The speed story — why parallel can win

AR decode is famously memory-bandwidth bound: each token is a full forward pass that mostly moves weights and the KV cache through memory, and you cannot start the next one early. So wall-clock scales with token count. Diffusion decouples the two — if a model produces a good answer in, say, a dozen denoising steps regardless of how many tokens it emits, the sequential depth stops growing with length, and the parallel work per step maps well onto a GPU.

That is why reported throughput for diffusion LLMs has been eye-catching: vendor figures have put decode rates in the thousands of tokens per second (reported numbers around 1,000, 1,500, and 2,000+ tok/s on their hardware), against the tens-to-low-hundreds that a typical AR model streams. Treat those as reported, hardware- and setup-specific figures rather than a like-for-like law — but the direction is real, and it comes straight from replacing N sequential steps with K.

→ The trade you are making

Diffusion buys latency by spending compute in parallel over a fixed step budget. AR spends the minimum compute per token but pays for it in sequential depth — one pass per token, no matter how fast each pass is.

05

The quality gap — and why it is closing

The historical catch is quality. AR training — predict the next token — matches how the model is used, and years of scaling have made it extremely good at long-range coherence. Early diffusion text models traded some of that away: refining all positions at once is a harder learning problem, and outputs could be less crisp on long, tightly-dependent passages. The gap has narrowed quickly, but for the highest-stakes open-ended generation, AR still tends to lead.

The pragmatic answer is not either/or. Block diffusion generates blocks of tokens autoregressively while denoising the tokens within each block in parallel — keeping AR-style long-range structure and KV-cache friendliness across blocks, while recovering diffusion’s parallel speed inside them. It is a direct attempt to take the latency win without paying the full coherence cost.

→ The hybrid

Block diffusion: autoregressive across blocks, diffusion within a block. The frontier is less "which one wins" and more "how much of each, where."

06

A worked scenario: a latency-critical assistant

Imagine an inline coding assistant that must return a short completion the instant a developer pauses. The outputs are bounded (a line, a small block) and latency is everything — a perfect fit for a diffusion or block-diffusion decoder, where a fixed handful of steps returns the whole span at once instead of streaming it token by token. Shaving hundreds of milliseconds off time-to-answer here is worth a small quality concession.

Now the same product has a long-form "explain this codebase" mode: multi-paragraph, tightly reasoned, open-ended. That leans back toward autoregressive generation, where coherence over long spans and the mature streaming stack matter more than raw tok/s. Same product, two decoders, chosen by the shape of the output — which is exactly how this comparison tends to resolve in practice: not a winner, but a fit.

→ The pattern

Bounded, latency-critical spans → diffusion. Long, coherence-critical generation → autoregressive. Increasingly, one system uses both.

The picture

The picture: six passes against three

autoregressive: 6 tokens = 6 sequential passes diffusion: K = 3 passes, all 6 positions each thecatsatonthemat pass 1pass 2pass 3pass 4pass 5pass 6 all 6 positions start masked catmat thecatsatmat thecatsatonthemat streams k0k1k2k3 +2 surest+2+2: done
Top: the autoregressive model needs pass 5 before it can run pass 6, so six tokens cost six sequential passes. Each token can be shown to the user the moment it exists. Bottom: the diffusion model fixes a six-position canvas, all masked, and runs three passes. Each pass looks at every position in both directions, predicts all of them, and commits the two it is most confident about (highlighted). Order follows confidence, not position: “cat” and “mat” are settled before the “the” that starts the sentence. Nothing is readable as a sentence until pass 3.
By the numbers

Worked example: when do fewer passes win?

Use illustrative per-pass costs: an AR pass takes 10 ms and produces one token (100 tokens/s). A diffusion pass takes 25 ms, because it runs over every position with no KV cache to reuse. Pass cost is held fixed to keep the arithmetic readable. In reality a pass over more positions costs more, which makes the long rows less favourable to diffusion.

Output NSteps KTokens per stepAR: N × 10 msDiffusion: K × 25 msFirst readable textFaster
16161160 ms400 msAR 10 ms, diffusion 400 msAR, 2.5×
64164640 ms400 msAR 10 ms, diffusion 400 msDiffusion, 1.6×
2563282,560 ms800 msAR 10 ms, diffusion 800 msDiffusion, 3.2×
25625612,560 ms6,400 msAR 10 ms, diffusion 6,400 msAR, 2.5×
1,024 as 4 blocks of 25632 per block810,240 ms4 × 32 × 25 = 3,200 msAR 10 ms, first block 800 msBlock diffusion, 3.2×

The break-even is simple. Diffusion is faster only when K × 25 < N × 10, that is, when each pass commits more than 2.5 tokens. Its speed comes entirely from committing several tokens per pass. Run it at one token per pass (row 4) and it is slower than AR, because every pass is the more expensive kind. But the more tokens a pass commits, the more of them are chosen together without seeing each other, which is where quality goes (see the mistakes below). Note the “first readable text” column too. In every row AR has something on screen after 10 ms. That gap is why block diffusion, which can release each finished block, matters for chat.

Trade-offs

Cost and trade-offs: passes, memory and total compute

Here Time means sequential passes, which set latency. Space means memory held per request. N is output length, K is diffusion steps, B is block size.

CaseTimeSpaceWhy
AR decodeN sequential passes, one token eachKV cache grows with N: keys and values for every layer and past tokenEach pass is light on compute but reads all the weights and the cache from memory.
AR + speculative decodingFewer target-model passes when draft tokens are accepted+ a draft model and its cacheThe output distribution is unchanged. The gain depends on how often the draft agrees.
Diffusion, one canvasK passes, each over all N positionsActivations for N positions; no growing cache; length fixed up frontAbout K × N token-forwards against N for AR: lower latency, more total compute.
Block diffusionN ÷ B blocks × K passes eachKV cache for finished blocksGoing AR across blocks brings back caching, and finished blocks can stream.
Prompt prefill, both1 parallel pass over the promptBuilds the cache, or the context, for the promptBoth read the prompt in parallel. The difference is all in generation.

The row to remember is the third. In the 256-token, 32-step example, diffusion does 32 times as many token-forwards as AR to finish 3.2 times sooner. That is a good deal when the GPU has idle compute, as it does when AR decoding is waiting on memory at small batch sizes. It is a worse deal on a server already batching many requests, where compute is the scarce resource.

Watch for

Common mistakes

  • Comparing speeds at different batch sizes

    AR decoding at batch 1 is bound by memory bandwidth and leaves compute idle, which is where diffusion’s parallel passes look best. A server batching many requests reads the weights once for all of them, and AR throughput per GPU climbs. A latency win at batch 1 can shrink or reverse in cost per token at high load. Compare at the batch size you will actually serve.

  • Too few steps

    Positions committed in the same pass are each sampled from their own prediction, without seeing what the others chose. Two choices can each be plausible and together be wrong. If the answer is a city, one position picks “New” and the next picks “Francisco”. More tokens per step means more of these clashes, so a step budget that looks fast in a demo can hurt quality on real prompts.

  • Expecting it to stream

    A single-canvas decoder has nothing readable until its last pass: 400 ms against 10 ms to the first token in the example above. For an inline completion that is fine. For a chat reply, users judge the wait to the first word, so use block diffusion or keep AR.

  • Forgetting the canvas length

    Many diffusion decoders need the output length, or a maximum, fixed before the first pass. Too short and the answer is cut off. Too long and every pass also runs over positions that end up as padding. AR simply stops when it emits an end token.

  • Assuming the AR serving toolbox carries over

    Continuous batching, prefix caching, speculative decoding and grammar-constrained decoding were all built around left-to-right decoding with a KV cache. Constrained JSON output, for example, works by masking the logits of the next token. A decoder that fills positions in any order needs a different mechanism for each of these.

In the wild

Where this shows up in production and interviews

  • Code completion and infilling

    Editing in the middle of a file means writing text that has to fit both what comes before and what comes after. AR models learn it through fill-in-the-middle training, which reorders a document as prefix, suffix, then middle, so the model has read both sides before it writes. A diffusion model sees both sides natively. That, plus short bounded spans, is why code completion is the first place diffusion LLMs are being sold.

  • Who ships them

    Inception Labs’ Mercury models are commercial diffusion LLMs, Google has shown an experimental Gemini Diffusion, and LLaDA is an open research model in the same masked-diffusion family. Most deployed chat models are autoregressive.

  • What they compete with

    The bar is not naive AR. It is AR served by engines like vLLM: continuous batching, a paged KV cache, prefix caching and speculative decoding. Any diffusion speed claim should be read against that stack at a stated batch size.

  • The interview version

    “Why is decoding memory-bound?” At batch 1, every token reads every weight once. A 7B-parameter model in 16-bit weights is 14 GB, so at an illustrative 1,000 GB/s of memory bandwidth the ceiling is about 71 tokens/s, however much compute the GPU has. Batching or parallel passes are the two ways around that ceiling.

Your call

Which would you pick?

Three situations. Pick the side you'd actually build — the explanation follows.

A code-completion feature must return a short bounded span with the lowest possible latency.

Generating a long document where coherence across thousands of tokens is the priority.

How should you read a system described as "autoregressive across blocks, diffusion within a block"?

Frequently asked

Quick answers

What is the difference between autoregressive and diffusion LLMs?

Autoregressive models generate text one token at a time, left to right, each token conditioned on all previous ones — so the number of sequential steps equals the number of tokens. Diffusion LLMs start from a masked or noised sequence and refine every position in parallel over a fixed number of denoising steps, so sequential depth is a fixed budget independent of length. That changes latency, KV caching, and whether earlier tokens can be revised.

Are diffusion LLMs faster?

They can be, for bounded outputs, because they replace N sequential token-steps with a fixed number of parallel denoising passes. Reported vendor throughput has reached thousands of tokens per second, versus tens to low hundreds for typical autoregressive streaming. Those are setup-specific reported figures, not a universal law, but the speedup is real and comes from the parallel, fixed-step structure.

Do diffusion LLMs use a KV cache?

Not in the same way. Autoregressive decoding reuses cached keys and values from earlier tokens, which is what makes each next-token step cheap. Diffusion uses bidirectional attention and updates all positions each step, so it does not have a causal KV cache to reuse — a different compute profile that trades cache reuse for parallelism.

What is block diffusion?

A hybrid that generates blocks of tokens autoregressively while denoising the tokens within each block in parallel. It keeps autoregressive long-range coherence and KV-cache friendliness across blocks, while recovering diffusion’s parallel speed inside each block — an attempt to get the latency benefit without the full quality cost.

▶  Watch it explained

Autoregressive vs Diffusion LLMs: one token at a time, or all at once?

Autoregressive vs Diffusion LLMs · Vibe Engines · 2026
Finished this one? 0 / 209 Handbooks done
NextWorld Models Next on the “How models actually work” ladder · rung 10 of 11

Explore the topic

See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.

More Handbooks