Vibe Engines is free, interactive AI engineering & system design — runs in your browser. Pick a learning path →
Autoregressive vs diffusion LLMs: one token at a time, or all at once?
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.
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."
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.
Head to head
| Dimension | Autoregressive | Diffusion |
|---|---|---|
| Generation order | Left to right, one token at a time | All positions at once, refined over K steps |
| Sequential steps | = number of tokens (N) | = fixed step budget (K), independent of N |
| Attention | Causal (can only look back) | Bidirectional (sees the whole sequence) |
| KV cache | Yes — each step reuses past keys/values | No causal cache; recomputes over positions |
| Revise earlier tokens? | No — once emitted, it is fixed | Yes — a later step can rewrite an earlier token |
| Decode bottleneck | Memory bandwidth, one token per pass | Compute over all positions, few passes |
| Quality / coherence | State of the art, mature | Improving fast, historically a notch behind |
| Tooling maturity | Deep (every serving engine) | Early, fast-moving |
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
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.
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.
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.
Block diffusion: autoregressive across blocks, diffusion within a block. The frontier is less "which one wins" and more "how much of each, where."
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.
Bounded, latency-critical spans → diffusion. Long, coherence-critical generation → autoregressive. Increasingly, one system uses both.
The picture: six passes against three
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 N | Steps K | Tokens per step | AR: N × 10 ms | Diffusion: K × 25 ms | First readable text | Faster |
|---|---|---|---|---|---|---|
| 16 | 16 | 1 | 160 ms | 400 ms | AR 10 ms, diffusion 400 ms | AR, 2.5× |
| 64 | 16 | 4 | 640 ms | 400 ms | AR 10 ms, diffusion 400 ms | Diffusion, 1.6× |
| 256 | 32 | 8 | 2,560 ms | 800 ms | AR 10 ms, diffusion 800 ms | Diffusion, 3.2× |
| 256 | 256 | 1 | 2,560 ms | 6,400 ms | AR 10 ms, diffusion 6,400 ms | AR, 2.5× |
| 1,024 as 4 blocks of 256 | 32 per block | 8 | 10,240 ms | 4 × 32 × 25 = 3,200 ms | AR 10 ms, first block 800 ms | Block 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.
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.
| Case | Time | Space | Why |
|---|---|---|---|
| AR decode | N sequential passes, one token each | KV cache grows with N: keys and values for every layer and past token | Each pass is light on compute but reads all the weights and the cache from memory. |
| AR + speculative decoding | Fewer target-model passes when draft tokens are accepted | + a draft model and its cache | The output distribution is unchanged. The gain depends on how often the draft agrees. |
| Diffusion, one canvas | K passes, each over all N positions | Activations for N positions; no growing cache; length fixed up front | About K × N token-forwards against N for AR: lower latency, more total compute. |
| Block diffusion | N ÷ B blocks × K passes each | KV cache for finished blocks | Going AR across blocks brings back caching, and finished blocks can stream. |
| Prompt prefill, both | 1 parallel pass over the prompt | Builds the cache, or the context, for the prompt | Both 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.
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.
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.
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.
For autoregressive generation the number of sequential steps equals the number of tokens, so latency grows with output length no matter how you tune it. Diffusion spends compute in parallel over a step budget you choose, which is the property that matters for a bounded, latency-critical span. Smaller models and speculative decoding reduce the constant; they do not remove the per-token sequential depth.
Generating a long document where coherence across thousands of tokens is the priority.
Long coherent generation is where the autoregressive left-to-right dependency earns its sequential cost. Raising the diffusion step budget spends more compute without restoring that strict conditioning, and generating section by section is edging toward the block-diffusion hybrid rather than a pure diffusion answer.
How should you read a system described as "autoregressive across blocks, diffusion within a block"?
Block diffusion takes the coherence of sequential conditioning between blocks and the parallel step budget inside them, which is the page's point: these are complementary properties rather than rivals, and increasingly one system uses both.
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.
Autoregressive vs Diffusion LLMs: one token at a time, or all at once?
Explore the topic
See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.
More Handbooks
- The Prompting HandbookA friendly, hands-on field guide for everyday humans — learn the CRISP framework, spot bad prompts, practice with real recipes, play a drag-and-drop game, and test yourself with a quiz. No code required.Read →
- The Senior AI Engineer Interview Handbook60 questions across architecture, production incidents, agentic systems, RAG, evals, cost, safety, and leadership — what staff-level AI interviewers actually probe for.Read →
- The LLM Serving HandbookHow to serve large language models fast and cheap — prefill vs decode, the KV cache, continuous batching and PagedAttention (vLLM), quantization, speculative decoding, and the latency-vs-throughput tradeoffs that decide your inference bill.Read →
- The Transformers HandbookThe architecture behind every LLM, built up from scratch — tokens and embeddings, positional encoding, self-attention (query/key/value), multi-head attention, the transformer block (FFN, residuals, layer norm), and how a decoder-only model generates text autoregressively.Read →
- The Fine-Tuning HandbookWhen to fine-tune vs RAG vs prompting, full fine-tuning vs parameter-efficient methods, how LoRA and QLoRA make it cheap enough for a single GPU, why the data matters more than the method, catastrophic forgetting, and how to evaluate and decide.Read →
- The On-Device AI HandbookSmall models, everywhere: why 1–14B models got frontier-adjacent (distillation + textbook data), the napkin law of local inference (tokens/sec ≈ bandwidth ÷ bytes), quantization and the llama.cpp / GGUF / Ollama / MLX stack, the honest local-vs-cloud decision table, four hybrid patterns that ship, and the evals craft of choosing a small model that actually fits the device.Read →