Looped language models can adapt computation for predicting a token without a proportional rescaling in unique model parameters by adjusting the number of loops. This property has been used for self-speculative decoding, taking shallow loops as fast drafters and deep loops as verifiers, which is effective since drafting still uses full parameters. In this paper, we show that shallow loops can be also predictive of several future tokens and leverage this to drastically accelerate the inference of looped language models. To that end, we present Floodgates, a simple self-speculative decoding method that appends a block of mask tokens as a suffix and learns via low-rank adaptation to draft these tokens in parallel. Across seven models, five benchmarks, a range of batch sizes, and both greedy and sampled decoding, Floodgates is the fastest lossless decoding method in most cases, attaining up to 7.5x acceleration. Through analysis, we show that this speedup is enabled by all-depth training of looped models, with the shallow drafter's ability to leverage full-depth computation by conditioning on deep prefix cache evaluated during verification.
Figures & tables
Figure 1: Floodgates is up to 7.5 × faster than autoregressive generation and faster than prior methods on every model. Speedup over plain decoding under greedy decoding at batch size one, averaged over the benchmarks of each model. Open circles show the fastest prior lossless method on each model.
Figure 2: Floodgates drafts a block of tokens with a single loop and verifies it in one decoding step. (Left) A single loop reads the deep prefix cache (purple) computed during the previous verification and drafts several tokens (lilac) in parallel from mask tokens. (Right) The full model verifies the drafts in one decoding step, accepts them up to the first mismatch, and produces the prefix cache for the next draft. (Top) This allows the shallow drafter to leverage full-depth computation for fast speculative decoding.
Figure 3
GSM8K
MATH-500
HumanEval+
MBPP+
BBH
Model
Method
Greedy
Sampling
Greedy
Sampling
Greedy
Sampling
Greedy
Sampling
Greedy
Sampling
Ouro 1.4B
LoopSpec ∗
2.51 (3.1)
2.10 (2.8)
2.60 (3.2)
2.34 (3.0)
3.01 (3.7)
2.67 (3.5)
2.62 (3.3)
2.23 (3.0)
2.67 (3.3)
2.25 (2.9)
LoopSpec
2.77 (3.5)
2.40 (3.3)
2.81 (3.5)
2.53 (3.4)
3.10 (3.9)
2.77 (3.8)
2.83 (3.6)
2.51 (3.5)
2.86 (3.6)
2.46 (3.4)
WaveFront
2.34 (3.1)
1.85 (2.4)
2.47 (3.2)
2.10 (2.7)
2.77 (3.7)
2.31 (3.0)
2.38 (3.2)
2.00 (2.6)
2.52 (3.4)
1.96 (2.5)
DAS
1.91 (5.8)
1.74 (5.3)
2.07 (6.4)
1.97 (6.0)
2.59 (7.9)
2.40 (7.3)
2.06 (6.3)
1.83 (5.6)
2.16 (6.6)
2.07 (6.3)
DAS-Wave
0.44 (1.8)
0.54 (1.9)
0.44 (1.8)
0.53 (1.9)
0.43 (1.8)
0.52 (1.8)
0.44 (1.8)
0.50 (1.8)
0.42 (1.7)
0.50 (1.8)
Table 1: Floodgates is the fastest lossless method on every model and task under greedy decoding, and in 16 of 24 settings under sampling. We report wall-clock speedup ( × ) over plain decoding on an A100 at batch size one, with accepted tokens per step τ in parentheses. Sampling uses temperature 1.0 and top- p0.7 . We bold the fastest lossless method and underline the second fastest. LoopSpec ∗ uses one proposal ( Cho et al., 2026 ) , WaveFront ( Ha and Kim, 2026 ) and DAS/DAS-Wave ( Li et al., 2026 ) are training-free looped baselines, JD denotes Jacobi decoding ( Santilli et al., 2023 ) , and PLD denotes prompt lookup decoding ( Saxena, 2023 ) .
GSM8K
MATH-500
Model
Method
Greedy
Sampling
Greedy
Sampling
Ouro 1.4B Thinking
LoopSpec
2.72 (3.3)
2.40 (3.3)
2.74 (3.5)
2.47 (3.5)
WaveFront
2.24 (2.9)
2.13 (2.8)
2.31 (3.2)
2.18 (3.0)
DAS
1.76 (5.5)
1.65 (5.1)
1.97 (6.0)
1.80 (5.5)
DAS-Wave
0.47 (1.8)
0.47 (1.8)
0.48 (1.9)
0.46 (1.8)
JD
0.86 (5.3)
0.77 (4.7)
0.85 (5.3)
0.76 (4.8)
Table 2: On the reasoning models, Floodgates is the fastest method on both tasks under greedy decoding and sampling. We report wall-clock speedup ( × ) over plain decoding on an A100 at batch size one, with accepted tokens per step τ in parentheses. Sampling uses temperature 0.6 and top- p0.95 . We bold the fastest lossless method and underline the second fastest.
Drafter
Params.
Depth
GSM8K
MATH-500
Separate, 1 layer
56M
1%
2.55 (2.9)
2.85 (2.9)
Separate, 4 layers
210M
4%
3.70 (4.5)
4.09 (4.4)
Separate, DFlash
278M
5%
4.32 (5.1)
4.05 (4.6)
Floodgates
61M
25%
5.48 (7.6)
5.54 (7.0)
Table 3: Floodgates gives larger speedups than a separate drafter. Speedup ( × ) over plain decoding, with accepted tokens per step in parentheses. Params. is the number of trained parameters, and depth is the number of layer evaluations in one drafting pass relative to a full decoding step.
Figure 3: Floodgates gives larger speedups than any number of layers of a non-looped model. Speedup over plain decoding on GSM8K and MATH-500. On Llama 3.2 1B and LayerSkip Llama 3.2 1B, we train our drafter on the first 1 to 16 layers, and “own decoding” is the native self-speculative decoding of LayerSkip.
Figure 8
Figure 5: Elastic passes increase the speedup only on deep verifiers. Speedup over plain decoding on GSM8K against the elastic drafting budget E . Recurrent Llama 3.2 runs at 4 to 64 loops with a single drafter trained at 32 loops. Up to 16 loops, a single pass ( E=0 ) is fastest, whereas at 32 and 64 loops the speedup peaks at 16 to 24 passes. DAS-Wave runs the same loops starting from copies of the last token.
Figure 6: Floodgates is the fastest method at every verifier depth. Speedup over plain decoding on GSM8K when Recurrent Llama 3.2 and Huginn 3.5B run at 4 to 64 loops. Each method uses its best setting, and Floodgates uses a single drafter per model trained at 32 loops. At each depth, we select the elastic drafting budget E on held-out problems. Open circles mark the depths where a single pass ( E=0 ) is selected. Filled circles mark the depths where elastic passes ( E>0 ) are preferred (the deeper depths).
Figure 7: Floodgates has the highest serving throughput at every batch size on the Ouro models, and up to batch size 64 on Recurrent Llama 3.2. System throughput (tokens/s over all requests) against per-request throughput on an A100 under continuous batching. Each point is one batch size, which grows from 1 at the bottom right to the largest that fits in memory at the top left.
Model
Block
R
Layers per token
Width
Ouro 1.4B, Ouro 1.4B Thinking
entire stack, 24 layers
4
96
2048
Ouro 2.6B, Ouro 2.6B Thinking
entire stack, 48 layers
4
192
2048
Recurrent Llama 3.2
prelude 4 , core 6 , coda 4
32
200
2048
Recurrent TinyLlama
prelude 4 , core 8 , coda 4
32
264
2048
Huginn 3.5B
prelude 2 , core 4 , coda 2
32
132
5280
Table 5: The Ouro models loop all of their layers four times, and the other three models loop a middle block 32 times. Block denotes the looped layers, R the default number of loops, and layers per token the total number of layer evaluations in one decoding step.
Task
Problems
Shots
Max. new tokens
Stop strings
GSM8K
first 100 of 1,319
3
512
Q: , end of text
MATH-500
first 100 of 500
4
2,048
Problem:
HumanEval+
all 164
0
1,024
end of function
MBPP+
all 378
0
1,024
end of function
BBH
20 per task, 540
3
1,024
Q , blank line, end of text
Table 6: All benchmarks follow the evaluation protocol of LoopSpec. We list the number of test problems, few-shot examples, maximum new tokens, and stop strings of each benchmark ( Cho et al., 2026 ) .
Ouro 1.4B
Ouro 2.6B
1.4B Thinking
2.6B Thinking
Rec. Llama
Rec. TinyLlama
Huginn
Training sequences
21,973
21,973
9,505
9,505
21,973
21,973
21,973
Mask tokens k
12
12
8
8
12
12
12
Drafts per pass
12
12
8
8
13
13
13
Adapter rank
64
64
64
64
64
64
64
Trained parameters
60.6 M
121.1 M
60.6 M
121.1 M
34.3 M
30.8 M
50.2 M
Training steps
32 K
32 K
16 K
16 K
32 K
32 K
32 K
Table 7: Each drafter trains 31M to 121M parameters in 4 to 15 hours on one GPU. Drafts per pass is the number of tokens drafted by one loop, and E is the elastic drafting budget selected on held-out problems ( Section 8.1 ).
Model
E
GSM8K
MATH-500
HumanEval+
MBPP+
BBH
Greedy decoding
Ouro 1.4B
0
5.04 (7.5)
4.69 (7.0)
4.83 (7.2)
3.01 (4.6)
4.40 (6.6)
1
3.75 (7.0)
2.89 (5.4)
3.37 (6.3)
2.27 (4.4)
3.29 (6.2)
Ouro 2.6B
0
5.56 (8.2)
6.04 (9.0)
5.57 (8.3)
3.39 (5.2)
5.07 (7.5)
1
3.43 (6.3)
2.92 (5.4)
3.14 (5.8)
2.28 (4.4)
3.15 (5.9)
Ouro 1.4B Thinking
0
3.70 (5.6)
3.68 (5.5)
–
–
–
Table 8: A single pass is fastest on the 4-loop Ouro models, and elastic drafting is faster on most tasks of the 32-loop models. Speedup ( × ) over plain decoding at batch size one, with tokens per step τ in parentheses, for a single pass ( E=0 ) and for elastic drafting with E passes. Shaded rows indicate the setting selected on held-out problems and reported in Tables 1 and 2 . Reasoning models are sampled at temperature 0.6 and top- p0.95 .
Model
Method
GSM8K
MATH-500
HumanEval+
MBPP+
BBH
Ouro 1.4B
LoopSpec
2.77 [2.73, 2.80]
2.81 [2.78, 2.84]
3.10 [3.08, 3.11]
2.83 [2.79, 2.88]
2.86 [2.84, 2.88]
Floodgates
5.04 [4.84, 5.24]
4.69 [4.49, 4.91]
4.83 [4.69, 4.99]
3.01 [2.85, 3.25]
4.40 [4.28, 4.52]
Ouro 2.6B
LoopSpec
3.06 [3.03, 3.09]
3.09 [3.02, 3.15]
3.33 [3.31, 3.34]
3.09 [3.07, 3.11]
3.10 [3.08, 3.11]
Floodgates
5.56 [5.36, 5.77]
6.04 [5.59, 6.46]
5.57 [5.43, 5.70]
3.39 [3.30, 3.49]
5.07 [4.93, 5.20]
Rec. Llama 3.2
LoopSpec
4.61 [4.45, 4.77]
6.11 [5.88, 6.28]
6.03 [5.90, 6.14]
5.41 [5.21, 5.60]
5.65 [5.57, 5.73]
Floodgates
5.04 [4.75, 5.35]
6.97 [6.68, 7.16]
6.91 [6.75, 7.06]
5.84 [5.54, 6.07]
6.62 [6.54, 6.70]
Table 9: The greedy speedups of Table 1 vary by at most 8% when the test problems are resampled. Speedup ( × ) over plain decoding with 95% bootstrap intervals over problems, for Floodgates and the prior method with the highest mean speedup on each model.
Model
GSM8K
MATH-500
HumanEval+
MBPP+
BBH
Ouro 1.4B
75.0
74.0
76.0
73.0
64.6
64.0
65.1
65.1
70.9
71.1
Ouro 2.6B
85.0
85.0
57.0
59.0
74.4
74.4
69.3
69.0
78.9
80.2
Recurrent Llama 3.2
47.0
45.0
44.0
41.0
11.6
11.0
24.3
23.8
34.3
34.1
Huginn 3.5B
29.0
29.0
25.0
26.0
14.6
14.6
26.2
26.5
31.9
32.0
Recurrent TinyLlama
38.0
40.0
41.0
42.0
14.0
13.4
23.3
23.0
–
–
Ouro 1.4B Thinking
87.0
85.0
88.0
85.0
–
–
–
–
–
–
Table 10: Floodgates matches the accuracy of plain decoding within 3 points on every task. Accuracy (%) under greedy decoding. For each task, the left column is plain decoding and the shaded column is Floodgates. The two differ on at most seven problems per task, because bfloat16 rounding differs when several tokens are verified in parallel.
Model
GSM8K
MATH-500
HumanEval+
MBPP+
BBH
Greedy decoding
Recurrent Llama 3.2
46.0
47.0
41.0
39.0
11.0
8.5
23.0
23.0
37.0
38.5
Huginn 3.5B
27.0
23.0
25.0
16.0
14.6
12.2
27.0
25.4
31.9
31.1
Recurrent TinyLlama
37.0
40.0
40.0
39.0
14.0
14.0
24.1
24.1
–
–
Sampling at temperature 1 and top- p0.7
Recurrent Llama 3.2
52.0
50.0
39.0
31.0
13.4
11.6
16.9
11.1
38.5
36.3
Table 11: The parallel sampler does not preserve accuracy, which drops by up to 13 points on Huginn 3.5B. Accuracy (%). For each task, the left column is plain decoding and the shaded column is the parallel sampler ( Geiping et al., 2026 ) .
GSM8K
MATH-500
HumanEval+
MBPP+
BBH
Model
Method
Greedy
Sampling
Greedy
Sampling
Greedy
Sampling
Greedy
Sampling
Greedy
Sampling
Recurrent Llama 3.2
Parallel sampler †
5.38
5.03
5.68
5.41
5.67
5.56
5.54
5.52
5.44
5.39
Floodgates
5.04 (20.4)
3.28 (7.6)
6.97 (28.5)
4.66 (11.0)
6.91 (28.0)
4.69 (10.9)
5.84 (23.5)
4.34 (10.1)
6.62 (27.1)
5.13 (12.1)
Huginn 3.5B
Parallel sampler †
5.37
5.38
5.79
5.79
5.78
5.73
5.24
5.38
5.34
5.13
Floodgates
4.48 (19.0)
3.16 (7.3)
6.21 (26.6)
4.60 (10.8)
6.18 (26.2)
4.70 (10.9)
5.06 (21.4)
3.52 (8.1)
5.70 (24.6)
4.48 (19.3)
Recurrent TinyLlama
Parallel sampler †
5.72
5.32
6.01
5.87
6.03
5.06
5.86
5.54
prompts exceed max context length
Table 12: Under greedy decoding, Floodgates is faster than the parallel sampler in 11 of 14 settings, without changing the outputs. Wall-clock speedup ( × ) over plain decoding on an A100 at batch size one, with accepted tokens per step τ in parentheses. Sampling uses temperature 1.0 and top- p0.7 . † marks the parallel sampler ( Geiping et al., 2026 ) , which is not lossless. It is faster under sampling, where its accuracy drops the most ( Table 11 ).
Figure 8: Early-exit supervision makes the early layers more predictive of the next tokens. Accuracy of linear readers that predict the token one, two, or three positions ahead from the hidden state after each layer of Llama 3.2 1B and LayerSkip Llama 3.2 1B.
Figure 9: With 24 elastic passes, the acceptance rate stays above 50% up to draft positions 23 to 32. Acceptance rate by draft position on Recurrent Llama 3.2 ( R=32 ), measured as the fraction of verification steps in which the j -th draft is accepted. DAS-Wave runs the same 24 loops starting from copies of the last verified token. The last panel varies the elastic drafting budget E on GSM8K.
Batch size
1
2
4
8
16
32
Largest
Best
Ouro 1.4B, GSM8K , largest batch size 80
Plain decoding
105
207
394
733
1,252
1,948
2,708
1.00×
LoopSpec
229
322
384
414
–
–
419 ∗
0.15×
DAS
193
371
674
1,183
1,832
2,502
3,302
1.22×
Prompt lookup decoding
206
387
662
1,045
1,460
1,775
2,079
0.77×
Floodgates, fixed block
588
1,099
1,865
2,980
3,787
4,463
4,859
1.81×
Table 13: Floodgates reaches the highest peak throughput on three of the four models, and the adaptive budget adds up to 54% at the largest batch size. System throughput (tokens/s) across batch sizes. The last column reports the speedup of each method’s peak throughput over that of plain decoding. “Fixed block” verifies all k drafts of every request instead of the budget M⋆ in ( 7 ). LoopSpec ( ∗ ) runs as many server instances as fit in memory.
Model
Decoding
GSM8K
MATH-500
HumanEval+
MBPP+
BBH
(100)
(100)
(164)
(378)
(540)
Recurrent Llama 3.2
Plain decoding, per-loop caches
47.0
44.0
11.6
24.3
34.3
Plain decoding, single cache
44.0
39.0
9.8
24.6
35.2
Floodgates, single cache
44.0
42.0
10.4
24.3
35.0
Recurrent TinyLlama
Plain decoding, per-loop caches
38.0
41.0
14.0
23.3
–
Plain decoding, single cache
38.0
42.0
13.4
24.3
–
Table 14: A single shared cache changes the accuracy of plain decoding by at most 2 points on Huginn 3.5B and Recurrent TinyLlama. Accuracy (%) at batch size one, with a separate cache per loop or with the final-loop cache reused by all loops. Both cache settings are evaluated on the same problems, with the number of problems in parentheses.
Figure 10: With a single shared cache, Floodgates has the highest throughput at every batch size on all five tasks. System throughput against batch size on an A100 for Huginn 3.5B, served with one key-value cache for all loops. The number in each panel is the throughput of Floodgates relative to the strongest baseline at the largest batch size.
Configuration
GSM8K
MATH-500
tok/s
Floodgates, 64 positions, k=12 , rank 64
7.69
6.46
475
16 sampled positions per sequence
7.30
5.90
449
k=8
6.58
5.84
410
k=16
8.26
6.63
477
rank 32
7.50
6.23
465
noise input instead of mask tokens
7.54
6.21
451
Table 15: The default drafter is within 2% of the fastest configuration. Accepted tokens per step on GSM8K and MATH-500, and decoding throughput (tokens/s) on GSM8K, for drafters of Ouro 1.4B trained for 8 K steps. Each row changes one choice of the default configuration in the first row.
LLM inference acceleration develops algorithms and systems that reduce language-model latency, memory use, and serving cost while preserving output quality.
Looped Transformers improve parameter efficiency by repeatedly applying the same Transformer layers. However, generating each token still involves sequential computation and repeated access to model weights, leading to high decoding latency. Recent pipelined self-speculative decoding methods reduce this delay by drafting tokens from early-loop predictions and asynchronously advancing tokens at different recurrent depths in the same batch, but they do not fully exploit early-loop features for longer lookahead and still spend computation verifying incorrect speculative branches. We introduce \method, a speculative decoding framework for looped transformers that enables earlier drafting of future tokens and assigns complementary roles to different recurrent depths. A lightweight lookahead drafter (LAD) predicts multiple future tokens with early-loop states, and deeper-loop feedback helps decide which draft branches to continue and which to pause, while the full-depth model makes the final token decisions. LoopAhead achieves up to 7.82x decoding speedup over autoregressive decoding while preserving the target model's output distribution.
Looped language models repeatedly apply a weight-shared block to increase effective depth without increasing parameter count, but the resulting T sequential recurrent-block calls per generated token substantially increase decoding latency. To address the issue, we introduce Wavefront Decoding (WFD), a training-free self-speculative decoding framework designed for looped language models. WFD exploits two properties of these architectures: intermediate recurrence outputs provide effective draft predictions, and weight sharing allows token states at different positions and recurrence depths to be processed in one batched recurrent-block call. WFD organizes these mixed-depth states into a diagonal wavefront, continuously drafting new positions at shallow depth while advancing earlier positions toward full-depth verification. Unlike the phase-separated draft-then-verify schedule, WFD therefore concurrently batches drafting and verification within the same recurrent calls, while rejected drafts are corrected using full-depth predictions. Across six Spec-Bench task categories, WFD achieves 2.42x speedup on Ouro-2.6B and 3.54x on Huginn-3.5B over autoregressive decoding, consistently outperforming draft-then-verify. Cross-recurrence KV sharing further reduces wavefront KV traffic and increases WFD's speedup to 4.81x on Huginn-3.5B. The code is available at https://github.com/summerbro-hhj/wavefront-decoding.
Looped language models such as Ouro and Raven apply one weight-shared block several times per token, so autoregressive decoding (AR) runs every loop of every token in sequence. Pipelined self-speculative decoders overlap these loops by drafting tokens from shallow readouts and verifying them at full depth. Yet every loop of a looped LM ends in a readout of the next token, and draft tokens pass through every depth anyway, so each depth can check them without an extra pass. We introduce LoopSkim, in which the depth of the pipeline is the verifier. Draft tokens copied from the context, as in prompt lookup decoding, enter after the first loops, any later readout that contradicts one replaces it at that depth, and only full-depth readouts commit tokens. LoopSkim fixes the random draws of every position in advance, so each check compares two tokens and decoding stays lossless in exact arithmetic under sampling for any number of checks and draft chains. Without training, its speedup over AR averages 1.73x that of LoopSpec across greedy decoding and sampling, and its checks between the first loops and full depth speed it up on every model. An optional draft head adds a second chain and raises this average to 1.99x.
Muhan Xiao, Shijian Li
College of Artificial Intelligence Zhejiang University · College of Computer Science and Technology Zhejiang University