Diffusion-Based Text Generation Is Here: From Token-by-Token Output to Whole-Block Denoising
This article explains two ways to improve large language model text generation. Multi-token prediction with speculative decoding and quantization-aware training keep the autoregressive approach and make it faster or cheaper to run. Discrete diffusion generates text as parallel blocks. The article covers the speed limit of token-by-token decoding, how each approach works, their strengths and limitations, and how developers can choose between them.
From Writing Word by Word to Revising Whole Blocks: A Shift in How Text Is Generated
For a long time, mainstream large language models have generated text in almost the same way: autoregressive decoding. The model produces output from left to right, one token after another. Each generated token is appended to the context, and the model then predicts the next one. This approach is mature, stable, and well supported by its ecosystem. It has one inherent bottleneck, however: decoding must run serially, so the speed limit is set by generating one step at a time.
Two main optimization paths have emerged recently. The first keeps the autoregressive paradigm and speeds it up. Its representative technique is multi-token prediction (MTP) combined with speculative decoding. The second is more aggressive. It changes how generation works by using discrete diffusion, which lets the model write text in parallel as a whole block. This article breaks down both approaches at the principle level and analyzes where each one fits.
1. The Core Bottleneck of Autoregressive Generation: Why Word-by-Word Generation Is Slow
Generating N tokens with an autoregressive model requires at least N forward passes. Each pass depends on the output of the previous step, so the computation cannot be parallelized along the time dimension. Engineering techniques such as KV caching, operator fusion, and batching have already made single-step inference highly efficient, but the serial dependency itself cannot be removed. When an application needs low first-token latency and high overall throughput, such as local deployment or real-time conversation, decoding speed becomes the main pain point.
1. MTP + Speculative Decoding: Adding a “Draft Accelerator” to Autoregression
The idea behind multi-token prediction is to keep the model’s writing process unchanged but let it propose several candidate tokens at each step. A typical process has three stages:
- Drafting: A lightweight draft head or draft model predicts the next 4, 8, or more candidate tokens at once.
- Verification: The main model checks the draft sequence in parallel and determines which positions can be accepted.
- Acceptance or rollback: Correct tokens are accepted directly. The sequence is truncated at the first incorrect position, and generation restarts from there.
The main model still performs the final confirmation with the original autoregressive logic. In theory, the output distribution is therefore identical to pure autoregressive decoding. Quality stays stable, and compatibility is good, so existing inference frameworks and downstream applications need little or no change. The trade-off is that this approach does not remove the fundamental left-to-right constraint. The speedup depends on the draft hit rate, and the upper limit is relatively modest, typically in the range of 1.5x to 3x. Hit rates also drop when the output is highly divergent, such as code with jumps or non-contiguous structures.
2. Quantization-Aware Training (QAT): Reducing Cost Through Lower Precision
A complementary route is quantization-aware training. It does not change the decoding method. Instead, it simulates low-precision numerical behavior (such as int4 or int8) during training, so the model weights can run at deployment with a smaller memory footprint and better memory access efficiency. Compared with post-training quantization (PTQ), QAT can significantly reduce accuracy loss at low bit widths. This makes it especially useful for running large models on consumer GPUs for local inference.
MTP and QAT both improve performance within the existing paradigm. MTP reduces the number of serial steps, and QAT reduces the cost of each step. Diffusion-based generation takes a fundamentally different approach.
2. Discrete Diffusion Text Generation: Lay Out a Draft Canvas, Then Denoise the Whole Block
Discrete diffusion models borrow ideas from image diffusion. Instead of building text from scratch one token at a time, the model first sets up a fixed-length “canvas,” for example a region of 256 tokens, initialized with noise or placeholders. The model then iteratively denoises this canvas, gradually turning noise into coherent text.
Intuitively, the iterative process looks like this:
- Round 1: The overall meaning and structure of the paragraph take shape.
- Round 2: Key sentences are filled in.
- Round 3: Grammar is corrected and details are added.
- Round 4: The full text is polished into the final output.
1. Why It Can Run in Parallel
All token positions within the same canvas are processed at the same time. In a single forward pass, the model sees the entire 256-token block and updates it together, so no position depends on another. This reduces the number of serial steps needed to generate 256 tokens from 256 to a few dozen or fewer. The approach fits well with the massively parallel capacity of GPUs.
More advanced architectures use a hybrid strategy: block-level autoregression with parallel denoising inside each block. The blocks are still chained in order to keep long text coherent, while the tokens within each block are denoised in parallel. This design balances long-range dependencies against parallel efficiency.
2. Working with a Mixture-of-Experts (MoE) Architecture
Experimental models of this kind often combine a Mixture-of-Experts (MoE) architecture. The total parameter count is large, for example more than 20 billion. Each token, however, activates only a small subset of the experts. For instance, the model may activate 8 of 128 experts plus one shared expert, so the number of active parameters may be only about 3 to 4 billion.
MoE offers large capacity with low computation. The model’s knowledge capacity grows, while the compute required per inference stays lightweight. This is especially helpful for local deployment. Combined with support for 256K-class long context, the design forms a local high-performance inference path that pairs large capacity, low activation, and parallel decoding.
3. Strengths and Limitations
The strengths are clear:
- High parallelism: Processing a whole block at once makes good use of GPUs, so generation within a block is fast.
- Suitable for local deployment: With a small active parameter count and low-bit quantization, consumer hardware may reach reasonable throughput.
- Global editing: Diffusion supports rewriting an entire block of text and filling in specific parts (infilling). This is particularly useful for editing and rewriting tasks.
The limitations are also clear:
- The paradigm is new: Generation quality and long-text stability are still being validated. The approach lacks the large-scale practical testing that the mature autoregressive ecosystem has.
- Weaker ecosystem compatibility: Many existing applications assume streaming, token-by-token output, such as typewriter effects and incremental parsing. Whole-block output requires an adaptation layer.
- A trade-off between iteration count and quality: Fewer denoising steps speed up generation but may hurt coherence, so parameters need tuning for each task.
3. How Developers Should Choose
Given the characteristics of both approaches, a practical decision framework looks like this:
| Scenario | Recommended Approach |
|---|---|
| Existing autoregressive pipeline, low-cost speedup | MTP/speculative decoding + KV cache optimization |
| Local or edge deployment with tight memory | QAT low-bit quantization + MoE small-activation model |
| Large-batch parallel generation, text editing and rewriting | Consider the diffusion-based generation paradigm |
| Maximum online quality stability | The mature autoregressive stack remains the conservative choice |
A simple thought experiment shows the difference between the two paradigms at the pseudocode level:
# Autoregressive: N serial stepsfor i in range(N):next_tok = model(context + tokens)tokens.append(next_tok)# Diffusion: parallel denoising of the whole blockcanvas = [MASK] * BLOCK_SIZEfor step in range(K): # K << Ncanvas = model.denoise(canvas, context)
When K is much smaller than N, the theoretical speedup is clear.
4. Conclusion
Text generation is splitting into two decoding paradigms. MTP and QAT represent the incremental camp. They improve speed and efficiency within the autoregressive framework by predicting more tokens per step and using compute more efficiently. Diffusion-based generation represents the more radical camp. It redefines generation through parallel whole-block denoising. The former is proven and compatible, while the latter is more aggressive and has greater potential.
For developers, mainstream production systems will likely remain built on autoregressive decoding, with speculative acceleration and quantized deployment, in the near term. Still, the maturity of diffusion approaches is worth t
