Paper

The sequential bottleneck of sampling one token at a time

Large language models can compute an entire sentence in parallel during training, but when generating text they must know the preceding token before they can choose the next one. No matter how fast the GPU is, this order cannot be skipped in one pass, so generation latency grows. This post covers Lafa (Large flow language model), which attacks this bottleneck with block-level flow.

Lafa revives an already-trained autoregressive model. A single computation produces candidate tokens for an entire block, and autoregressive prediction verifies and commits them from the front. As a result, it achieves up to 2.54× the throughput of the existing autoregressive baseline at the same quality level. The exact conditions and numbers are revisited below.

Why flow, and why split into blocks

The existing parallel generation method, discrete diffusion, erases tokens with [MASK] and then restores them. Sampling multiple positions independently in one step severs the relationships between positions, which can degrade quality.

Flow differs: it does not erase tokens. It mixes Gaussian noise into token embedding vectors, then integrates the continuous path from noise back to clean embeddings to produce tokens. Because it moves in continuous space, the acceleration and control techniques developed for image and video generation carry over directly. However, existing flow language models were demonstrated only on small-scale, simple tasks; one scaling attempt reported training inefficiency; and how to scale to billions of parameters is not yet established (§1, §2).

Lafa splits flow into blocks. Instead of generating the whole sentence at once, it conditions on the previously committed text (the prefix) and generates token blocks of size $B$ one at a time, chaining blocks causally. The sentence probability is factorized as a product over blocks.

$$p(y\mid c)=\prod_{r} p\bigl(y^{rB+1:(r+1)B}\mid c,\,y^{\le rB}\bigr)$$

Splitting into blocks yields two benefits. First, the prefix key-value (KV) cache—the attention intermediates from previous token computations—can be reused for each block. Second, parallel generation can be confined to within a block (§2.1). Handling tokens on embeddings reduces the dimensionality of a single token from the vocabulary size $|V|$ to the embedding dimension $d$, which also makes training and scaling easier.

Asynchronous flow within a block

If every position in a block escaped noise at the same rate, the left-to-right directionality of text being read would disappear. Lafa gives each position $i$ its own progress clock $\tau^i(t)$. The clocks of earlier positions run faster, so earlier tokens are revealed first. The path from noise $x_0$ to the clean embedding $x_1$ is as follows.

$$I_t^i=(1-\tau^i(t))\,x_0^i+\tau^i(t)\,x_1^i$$

$\tau$ is not fixed. It is learned from data so that training passes slowly through regions with high loss. This concentrates training samples and inference steps around difficult noise levels. The learned schedule generally advances earlier positions first (in Fig. learned_time, the horizontal axis is reference time $t\in[0,1]$, the vertical axis is the per-position $\tau^i(t)$, and the curves correspond to block positions 1, 4, 7, …, 16); this left→right bias is not manually imposed but emerges from training (§2.1).

Illustrative example. Suppose the three embeddings of the prefix “the weather today is” are already committed, and with block size $B=3$ we must produce “sunny/cloudy/.”

StepInputRetained stateChanging stateOutput / discarded values
Start3 prefix embeddings, 3 noise vectorsprefix KV cache——
Step $k$reference time $t_k$, current state $\hat x_{t_k}$prefix KV cacheearlier positions’ $\tau$ grow first and $\hat x$ approaches the embeddingsintermediate noise $\hat x_{t_k}$
Endafter $K$ Euler stepsprefix KV cachetokens are committed from the final $\hat x$“sunny/cloudy/.”

The KV of the committed tokens is appended and we move to the next block. This example is for intuition only and is unrelated to the measurements below.

Designing flow to be learned from an autoregressive model

The key is not to train a flow model from scratch but to retrofit an already-trained autoregressive model into a block denoiser. The denoiser is a function that, given a noisy block, predicts the clean-token probability at each position. The problem is that this retrofit must not damage autoregressive prediction or the prefix cache. The paper solves this with three designs (§2.2).

First, tokenwise time conditioning. The prefix receives time 1 (no noise), and each position in the block receives its own time $\tau^i(t)$. This value is injected via adaptive layer normalization (adaLN)—a mechanism that re-normalizes a layer’s output based on its input. Initializing adaLN as the identity function means time conditioning initially leaves the existing computation untouched and is learned gradually.

Second, block bidirectional attention. Tokens within a block can see each other, so less-refined later tokens can help earlier ones. The prefix is still viewed only causally, as before. As a result, the prefix’s keys and values do not depend on block state and can be reused across denoising steps.

Third, fixed embedding norm. If embeddings are updated freely, their L2 norm grows relative to the noise scale, creating a shortcut that makes denoising easier. The pretrained norm is fixed and only the direction is learned.

The training loss sums three terms: autoregressive cross-entropy on the prefix, denoising cross-entropy on block tokens, and squared error between predicted and actual embeddings (Equation 6). Keeping the autoregressive loss also improves flow accuracy. Thanks to this joint training, autoregressive ability is preserved—or even improved—while learning flow. This is consistent with the existing observation that multi-token prediction improves next-token prediction (§2.2, §3.2).

The structure of parallel training, which splits a training sequence into clean portions and noisy blocks and processes them together

The figure above (original Figure training) shows the state transitions of parallel training. The upper clean sequence produces autoregressive predictions with causal attention, while the lower copy is split into blocks of size 3, where each block sees only the preceding clean tokens and produces denoising predictions bidirectionally within the block. A single forward pass yields both the autoregressive loss and the denoising losses of all blocks, without recomputing overlapping prefixes.

Design effects confirmed by ablation

At 0.5B, block 4, and 32 Euler steps, each design was reverted one at a time and average accuracy was compared (Table design-ablations).

Changed itemComparison conditionAverage accuracy
AttentionFully causal32.7%
Block bidirectional38.0%
Time scheduleSynchronous (all positions share the same $t$)36.2%
Asynchronous tokenwise38.0%
EmbeddingFully frozen34.4%
Unrestricted updates36.9%
Fixed norm38.0%
LossDenoising cross-entropy only33.6%
Squared error only29.7%
Both terms35.8%
Both terms + autoregressive38.0%

The original design wins on all four axes: attention, time, embedding, and loss. In particular, adding the autoregressive loss actually raises flow accuracy, so AR preservation and flow generation do not hurt each other.

Reducing the number of steps with flow map distillation

Flow decoding is expensive because it must call the denoiser many times per block. To reduce this, Lafa uses flow map distillation. A student model learns a function $\hat X_{s,t}$ that moves the state directly from time $s$ to $t$, replacing several Euler steps with a single jump. Predictions on the diagonal ($s=t$) are matched to the teacher, while off-diagonal predictions ($s\lt t$) are matched to the composition of two short jumps in a semigroup fashion. The student maintains the prefix cache and can generate in as few as 1 step ($\hat X_{0,1}$) (§2.2).

Draft and verify at once: self-speculative decoding

Reaching AR-level quality with flow decoding requires many steps. Lafa discards the expensive multi-step process and by default draws a block draft with 1-step flow, then verifies it with the autoregressive predictor (§2.3).

The draft comes from a single denoiser evaluation starting from noise. Each position of the draft is compared against the autoregressive prediction from the front, and only the longest matching prefix is committed; the rest is discarded. If even the first token differs, it is replaced with the autoregressive token. The final output is exactly the same as the model’s greedy autoregressive output. Flow is used only to increase speed, and the quality bar equals greedy autoregression.

A naive implementation needs a separate verification forward and a next-draft forward, which costs extra. The paper eliminates this with fused decoding: verification of the previous draft and drafting of the next block are mixed into a single forward pass.

Fused self-speculative decoding, which verifies the previous draft while generating the next block’s draft in parallel within one forward pass

The figure above (original Figure fused_decoding) shows how one stage proceeds at block size 3. The horizontal direction is sequence position, and the vertical blocks are the input fragments fed into each forward.

StageInputRetainedChanged / rejectedOutput
End of previous stageprefix KV, draft $\hat y$prefix KV——
Fused forwardclean draft $\hat y$ + $B$ candidate noise blocksprefix KVeach candidate assumes “$j$ preceding items accepted”verification logits, $B$ candidate drafts
Verificationverification logits vs autoregressive predictionaccepted prefix KVdrafts and candidates after the mismatch are discardedaccepted length $a$, next draft
Next stageextended prefixupdated KV cache—repeat

The clean draft is appended like a prefix to produce verification logits via causal attention, and at the same time candidate noise blocks corresponding to “the case where $j$ preceding draft items are accepted” are appended and processed together. From the verification result, the candidate block with the actually accepted length is chosen as the next draft, eliminating a separate re-drafting forward.

Because this method performs both drafting and verification with a single trained model, it is called self-speculative. No separate small draft model or additional parameters are needed. Alternatively, confidence decoding—accepting only prefixes whose token probability exceeds a threshold instead of using autoregressive verification—is possible, but lowering the threshold trades accuracy for speed, so the paper keeps self-speculative as the default (§3.3, Appendix confidence_results).

Results: maintaining quality while increasing speed

The models use Qwen2.5 0.5B·7B Instruct and Qwen3 8B Base as initialization and are trained for only 5–15 epochs (9–27B tokens) on Dolci-Instruct-SFT data. This is at least 18× fewer than the up to 500B tokens reported by comparable-scale diffusion models (Dream, LLaDA, Efficient-DLM) (§3, Table training-hyperparameters). The benchmarks are six covering instruction following, reasoning, and coding: IFEval, BBH, MMLU-Pro, GPQA, GSM8K, and HumanEval.

Learning flow does not hurt autoregression

Comparing average single-token decoding accuracy across the six benchmarks (Table ntp_main), Lafa beats the AR SFT built with the same initialization, data, and training budget at every scale. At 8B it approaches Efficient-DLM’s 63.5% while using at least 18× fewer training tokens. The process of learning flow actually improved autoregressive prediction (Table 1, §3.2).

ScaleAR SFTLafaDifference
0.5B28.7%31.6%+2.9%p
7B58.4%60.9%+2.5%p
8B56.8%63.1%+6.3%p

Parallelism: how far does accuracy hold as TPF rises

TPF (tokens per forward) is the number of tokens committed per forward pass. For AR it is 1 by definition. Since self-speculative output equals greedy autoregression, TPF comparisons are parallelism comparisons at the same AR quality.

The trade-off between accuracy and tokens per forward (TPF), averaged over six benchmarks

In the figure above (original Figure selfspec_frontier), the horizontal axis is TPF and the vertical axis is average accuracy over the six benchmarks. At 7B, block 4 reaches TPF 2.6 and 60.9% accuracy, beating DeepSeek-MTP on both accuracy and TPF, while block 16 reaches 58.0% at TPF 4.9, close to AR SFT’s 58.4% while nearly doubling parallelism. Across all scales, AR-level accuracy is maintained in the roughly 2.5–5 TPF range (Table selfspec_lafa_sixbench).

Wall-clock time: throughput measured in TPS

TPF shows only parallelism, not actual time. Because the cost of a forward pass differs by method, tokens per second (TPS) was measured on a single H100 GPU at batch 1.

Accuracy and tokens-per-second (TPS) throughput at 7–8B scale

In the figure above (original Figure throughput), the horizontal axis is TPS and the vertical axis is average accuracy over IFEval, GSM8K, and HumanEval. Lafa 7B with block 16 reaches 100.2 TPS, 2.54× the throughput of AR SFT’s 39.5 TPS at similar average accuracy (74.5% vs 73.9%). With block 4 it is about 2× faster at 79.9 TPS while achieving higher average accuracy (76.5%). DeepSeek-MTP (53.6 TPS) and MARS (48–49 TPS) reach at most 1.4× even when their accuracy equals or exceeds AR’s. Diffusion-based methods (Fast-dLLM v2, Dream, Efficient-DLM) can achieve higher TPS depending on configuration, but their average accuracy is below AR SFT, and the faster the configuration, the larger the accuracy loss (Table throughput_full, §3.3).

What “maintaining quality” means

Because self-speculative output equals greedy autoregression, the 2.54× is a speedup obtained while preserving the same AR quality. Flow decoding itself requires multiple steps. At 7B and block 4, the 32-step average is 75.2%, already above AR SFT (73.9%), and at 64 steps it reaches 75.9% (Table flow_full, §3.1). Turning multi-step flow into a 1-step draft plus verification is the source of the practical speedup. Flow map distillation improves accuracy in the 1–2 step regime, and at 7B the 2-step student approaches the 4-step teacher.

Limitations and when to apply it

The limitations the paper itself notes are mainly related to flow map distillation. The distilled 1- and 2-step models improve accuracy while reducing the number of steps, but a quality gap remains relative to flow decoding with more steps. Fully incorporating self-conditioning and prefix guidance into distillation is left as future work (§3.1, §4). Confidence decoding loses accuracy when the threshold is lowered, so it could not be used as the default (Appendix confidence_results).

There are also points a reviewer should note. First, the 2.54× was measured at 7B, block 16, a single H100, and batch 1; there is no guarantee the same factor holds for larger models, larger batches, or long contexts. Second, evaluation is limited to instruction, math, and coding benchmarks, so generalization to other domains is not established in the paper. Third, 8B starts from Base instead of Instruct (the paper reports that additional training of the Instruct counterpart degraded performance). This is why IFEval numbers at the 8B scale are generally low (AR SFT is also 38.1%).

Given these conditions, Lafa is suited to serving environments that want higher throughput while preserving the autoregressive model’s greedy output exactly. If you already have a trained model and can train on a small number of additional tokens, you can obtain the benefits of speculative decoding without a separate draft model. Conversely, if you want to change the output distribution itself, or if you have enough latency headroom to run multi-step flow decoding in real time, the method’s strengths are less prominent.

Tables from the paper

Tables converted mechanically from the arXiv e-print LaTeX source. The numbers are the paper’s own and did not pass through a model.

Table 1. Main hyperparameters. For block size four, we use batches of 384 sequences for training, whereas for larger blocks, we use memory-matched microbatches and, when applicable, continue training from smaller-block checkpoint.

SettingLafa 0.5BLafa 7BLafa 8B
Model and data
InitializationQwen2.5 0.5B InstructQwen2.5 7B InstructQwen3 8B Base
Training data / epochs / tokensDolci-Instruct-SFT / 5 epochs / approximately 9B
Block sizes $B$4, 8, 164, 8, 164
Maximum sequence length512–1024512–1024512
adaLNPer-layerShared across layersShared across layers
Optimization
OptimizerAdamW
Learning rate$1{\times}10^{-4}$$1{\times}10^{-5}$$1{\times}10^{-5}$
Schedule / warm-upConstant / first 1% of steps
Adam $(\beta_1,\beta_2)$(0.9, 0.999)
Weight decay / gradient clipping / batch size0 / 1.0 / 384 sequences
Precisionbfloat16
Distributed trainingDDPZeRO-3ZeRO-3
Training objective and architecture
Training noise scale $\sigma$4.0
Self-conditioning probability $p_\mathsf{sc}$0.5
adaLN learning rate multiplier5.0
Parameter EMA decay0.999 (enabled from step 500)
Learned tokenwise time
Histogram bins $M$200
Histogram EMA decay $\beta$0.99
Update interval $S$100 steps
Flow decoding
Inference noise scale $\sigma$0.1
prefix guidance scale $g$8.0

Table 2. Flow and flow map decoding accuracies.

Method$B$Euler steps0.5B scale GSM8K0.5B scale HumanEval0.5B scale IFEval0.5B scale Average7B scale GSM8K7B scale HumanEval7B scale IFEval7B scale Average
AR SFT––32.035.448.438.669.178.773.873.9
Flow decoding
Lafa (Ours)1610.83.020.38.12.410.429.814.2
21.76.123.510.418.721.336.225.4
411.712.227.017.047.540.244.744.1
818.314.030.921.160.254.956.957.3
1624.817.137.226.365.665.264.965.2
3225.921.339.929.166.968.364.166.5
6428.121.342.330.667.566.566.566.8
12828.120.744.231.068.767.765.267.2
812.46.123.310.620.122.034.825.6
29.212.223.515.047.441.542.143.7
417.418.929.021.864.057.955.859.2
824.825.638.429.664.864.064.564.5
1628.428.046.434.371.670.764.568.9
3229.128.045.534.272.372.071.071.7
6428.428.047.134.571.772.668.871.0
12828.728.749.035.571.072.669.370.9
116.413.432.520.853.932.344.743.7
214.79.135.119.760.034.843.846.2
425.021.343.630.069.563.460.164.3
827.022.046.631.873.071.369.371.2
1628.827.450.135.471.975.069.572.1
3230.431.152.938.173.878.773.075.2
6429.632.953.038.574.678.774.375.9
-8*412830.131.749.437.175.678.073.675.7
Flow map decoding
119.217.133.623.354.250.042.749.0
221.118.336.225.266.468.355.163.3
424.921.339.428.569.773.864.769.4
828.126.840.331.870.973.868.271.0
-5*Lafa (Ours)-5*41628.925.643.332.6––––

Table 3. Single-token decoding. For diffusion models, we decode exactly one highest-probability token per forward. Models marked $^\dagger$ are trained by us from the matched AR model on Dolci-Instruct-SFT for five epochs.

MethodIFEvalBBHMMLU-ProGPQAGSM8KHumanEvalAverage
0.5B scale
Qwen2.5 SFT$^\dagger$48.426.311.917.932.035.428.7
MTP$^\dagger$50.617.39.218.827.132.325.9
DeepSeek-MTP$^\dagger$53.224.114.018.535.536.030.2
MARS$^\dagger$51.326.612.419.432.840.230.4
SBD$^\dagger$55.320.69.222.527.230.827.6
BD3LM$^\dagger$47.17.52.017.930.631.722.8
Lafa 0.5B (Ours)$^\dagger$55.127.612.121.936.136.631.6
7B scale
Qwen2.5 SFT$^\dagger$73.859.241.627.969.178.758.4
MTP$^\dagger$73.251.737.326.860.573.853.9
DeepSeek-MTP$^\dagger$78.060.740.630.170.380.560.0
MARS$^\dagger$77.854.644.426.673.281.759.7
Fast-dLLM v2$^\dagger$70.653.543.128.667.232.949.3
Fast-dLLM v264.558.139.721.480.362.254.4
Dream57.166.043.626.681.758.555.6
Lafa (Ours)$^\dagger$78.963.041.831.073.876.860.9
8B scale
Qwen3 SFT$^\dagger$38.171.656.229.562.982.356.8
LLaDA58.030.928.725.476.042.143.5
Efficient-DLM58.470.861.533.787.468.963.5
Lafa (Ours)$^\dagger$62.370.756.231.777.879.963.1

Table 4. Self-speculative and parallel decoding accuracy (%) and TPF across model scales.

Method$B$IFEval Acc.IFEval TPFBBH Acc.BBH TPFMMLU-Pro Acc.MMLU-Pro TPFGPQA Acc.GPQA TPFGSM8K Acc.GSM8K TPFHumanEval Acc.HumanEval TPFAverage Acc.Average TPF
0.5B scale
AR SFT–48.41.026.31.011.91.017.91.032.01.035.41.028.71.0
MARS451.01.831.72.313.91.718.32.031.72.132.31.929.82.0
MTP451.22.517.63.39.43.117.92.826.82.933.52.926.12.9
DeepSeek-MTP251.91.623.71.812.11.918.81.935.51.835.41.729.61.8
BD3LM446.81.58.31.61.31.519.41.529.81.529.91.522.61.5
SBD456.42.220.63.29.42.723.22.726.72.731.12.827.92.7
PTP442.31.726.02.511.92.015.01.935.32.342.72.128.92.1
455.12.227.63.312.13.121.92.936.12.736.62.931.62.9
855.32.727.95.110.05.523.74.237.83.639.03.032.34.0
-3*Lafa (Ours)1654.23.127.06.39.19.218.14.836.73.639.63.330.85.0
7B scale
AR SFT–73.81.059.21.041.61.027.91.069.11.078.71.058.41.0
MTP473.21.951.93.338.32.527.72.660.53.073.83.154.22.7
DeepSeek-MTP278.01.560.81.842.51.629.51.770.31.780.51.960.31.7
Fast-dLLM v232/862.81.958.12.339.22.222.32.280.42.563.41.854.42.1
DreamCanvas18.94.242.54.242.24.49.84.438.43.523.83.829.34.1
477.81.952.94.140.02.829.22.874.02.881.72.959.32.9
MARS876.32.059.65.741.53.330.83.271.33.581.13.560.13.5
1675.82.055.86.339.23.626.83.275.43.777.43.758.43.7
478.91.763.03.441.82.431.02.373.82.876.82.860.92.6
877.52.859.16.339.43.728.14.075.34.876.24.659.34.3
-3*Lafa (Ours)1674.92.857.37.939.03.828.14.075.05.873.85.458.04.9
8B scale
AR SFT–38.11.071.61.056.21.029.51.062.91.082.31.056.81.0
LLaDACanvas36.83.231.03.228.82.79.42.747.22.723.82.529.52.8
457.12.666.93.260.73.033.02.885.42.966.53.061.62.9
-2*Efficient-DLM3258.82.470.73.361.63.134.42.987.42.968.93.063.62.9
Lafa (Ours)462.32.470.73.456.23.231.73.177.82.679.92.963.12.9

Table 5. Per-task accuracy (%) and throughput in tokens per second (TPS) at 7–8B scales, measured using one H100 GPU with batch size one. Efficient-DLM is 8B and other methods are 7B.

MethodSettingThresholdIFEval AccuracyIFEval TPSGSM8K AccuracyGSM8K TPSHumanEval AccuracyHumanEval TPSAverage AccuracyAverage TPS
AR SFT––73.840.969.140.678.737.073.939.5
DeepSeek-MTP$B=2$–78.045.170.357.280.558.476.353.6
MARS$B=4$0.9577.642.070.759.879.943.376.148.4
$B=8$0.9577.340.969.162.778.043.174.848.9
$B=16$0.9575.041.172.961.375.044.674.349.0
Fast-dLLM v2$B=4$0.9065.852.181.666.267.156.571.558.3
$B=8$0.9065.460.980.198.557.371.167.676.8
$B=16$0.9061.965.177.3116.056.178.965.186.7
Efficient-DLM$B=4$0.7058.231.887.837.170.138.472.035.8
$B=8$0.7058.240.787.755.668.958.571.651.6
$B=16$0.7058.447.288.470.567.175.471.364.4
$B=32$0.7059.149.387.574.463.484.870.069.5
$B=32$0.6058.656.182.287.155.596.365.479.9
$B=32$0.5052.971.972.0102.942.1111.255.795.3
Dream$k=1$–57.122.781.736.058.526.765.828.5
$k=2$–44.745.675.072.035.453.351.757.0
$k=4$–33.891.259.3143.520.1106.337.7113.7
$B=4$–78.960.973.891.776.887.276.579.9
$B=8$–77.561.175.3116.176.2104.376.393.8
-3*Lafa (Ours)$B=16$–74.959.775.0125.273.8115.774.5100.2

Table 6. Self-speculative decoding accuracy (%) $\uparrow$ and TPF $\uparrow$.

Method$B$IFEval Acc.IFEval TPFBBH Acc.BBH TPFMMLU-Pro Acc.MMLU-Pro TPFGPQA Acc.GPQA TPFGSM8K Acc.GSM8K TPFHumanEval Acc.HumanEval TPFAverage Acc.Average TPF
0.5B scale
Qwen2.5 SFT–48.41.026.31.011.91.017.91.032.01.035.41.028.71.0
455.12.227.63.312.13.121.92.936.12.736.62.931.62.9
855.32.727.95.110.05.523.74.237.83.639.03.032.34.0
-3*Lafa (Ours)1654.23.127.06.39.19.218.14.836.73.639.63.330.85.0
7B scale
Qwen2.5 SFT–73.81.059.21.041.61.027.91.069.11.078.71.058.41.0
478.91.763.03.441.82.431.02.373.82.876.82.860.92.6
877.52.859.16.339.43.728.14.075.34.876.24.659.34.3
-3*Lafa (Ours)1674.92.857.37.939.03.828.14.075.05.873.85.458.04.9
8B scale
Qwen3 SFT–38.11.071.61.056.21.029.51.062.91.082.31.056.81.0
Lafa (Ours)462.32.470.73.456.23.231.73.177.82.679.92.963.12.9

Figures in this post are taken from the original arXiv:2610.28559 (CC BY 4.0). Only size and format were changed.

License

Author: Jaehun Ryu

Link: https://jaehun.me/en/posts/paper-2610-28559v1/

License: CC BY 4.0

This work is licensed under the Creative Commons Attribution 4.0 International License. You are free to use it for any purpose, including commercial use, as long as you provide proper attribution.

Comments