Manuscript Offprint
arXiv:2610.21594LoopAhead: Speculating Ahead for Faster Decoding in Looped Language Models
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
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 LoopAhead, 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 decoding speedup over autoregressive decoding while preserving the target model's output distribution.
1 Introduction
Looped Transformers have recently attracted increasing attention as a parameter-efficient architecture for large language models (McLeish et al., 2025; Geiping et al., 2026). By repeatedly applying a shared Transformer stack across recurrent depths, they achieve performance comparable to substantially deeper and larger models while using significantly fewer parameters (Saunshi et al., 2025; Dehghani et al., 2018; Zhu et al., 2025). However, under full-depth autoregressive decoding, a looped model completes all configured recurrent passes before producing each token (Cho et al., 2026),
Key observation

Faster Lossless Decoding
LoopSpec LoopAhead
Figure 1: Key observations and decoding speedups of LoopAhead. Top left shows Ouro-1.4B's task accuracy when generating at a fixed loop depth r. Top right shows token agreement between depth-r and full-depth predictions under the same prefixes. The bottom panel shows representative decoding speedups over AR, with percentages indicating throughput gains over LoopSpec.
and its parameters are repeatedly accessed across iterations for every generated token, leading to increased memory-bandwidth pressure (Hooper et al., 2025). The resulting latency makes inference acceleration particularly relevant to looped models (Schwethelm et al., 2026; Cho et al., 2026).
Speculative decoding accelerates autoregressive inference by generating candidate tokens with a lightweight drafter and verifying them in parallel with the target model (Leviathan et al., 2023; Chen et al., 2023; Jiang et al., 2026). Feature-based methods further improve drafting using target hidden representations (Li et al., 2024b,a, 2025; Zhang et al., 2025). However, these methods generally separate drafting from verification and do not fully exploit the shared recurrent structure of looped Transformers. Recent methods such as LoopSpec (Cho et al., 2026) and WaveFront (Ha and Kim, 2026) address this by pipelining early-loop proposals with full-depth verification, allowing tokens
Corresponding author.
at different recurrent depths to be processed together. In particular, LoopSpec achieves substantial speedups without training an additional drafter. Nevertheless, each new proposal requires its predecessor to reach a specified recurrent depth, limiting how early future tokens can be generated. Moreover, incorrect branches may continue consuming computation until full-depth verification.
To go beyond the speedup achieved by pipelining alone, we explore how recurrent states can support both drafting and early candidate checking. Prior work has shown the value of target features and early-layer predictions for speculative drafting (Li et al., 2024b; Elhoushi et al., 2024). Our observation in Figure 1 shows that generating complete answers using only early loops can substantially reduce task accuracy. Yet early-loop predictions already show high token agreement with full-depth outputs under the same prefixes, and this agreement rises rapidly over subsequent loops. These observations motivate using early-loop states to draft multiple future tokens and using intermediate-loop feedback to guide execution of speculative branches before full-depth verification.
Motivated by these observations, we introduce LoopAhead, a novel speculative decoding framework for looped language models that combines early-loop multi-token drafting with intermediate-loop feedback-guided scheduling. A separately trained lightweight lookahead drafter predicts multiple future candidates from selected early-loop states and a native proposal anchor. Feedback from intermediate loops guides the recurrent computation, suspension and resumption. Our experiments show that feedback-guided scheduling reduces computation on unpromising branches while improving decoding throughput, making early lookahead more efficient. LoopAhead remains lossless since the scheduler only controls speculative execution, while all final output decisions remain determined by the full-depth target verification rule. Our contributions are:
• We introduce LoopAhead, a lossless speculative decoding framework for looped language models. Its lookahead drafter uses early-loop states and native proposal anchors to predict multiple future positions, and uses a compact draft vocabulary to reduce drafting overhead.
• We design a feedback-guided scheduling mechanism that leverages intermediate recurrent representations to dynamically suspend and resume speculative branches under bounded execution budgets. Experimental results demonstrate that our scheduling strategy effectively limits wasted computation caused by unpromising speculative paths.
• We evaluate LoopAhead across diverse looped language models and benchmarks under both greedy and sampling decoding settings. LoopAhead achieves up to decoding speedup over AR as shown in Figure 1. Further analysis and ablation studies demonstrate the effectiveness of components and their complementary contributions to performance.
where contains the initial hidden states. Repeating shared layers gives an effective core depth of without additional parameters.
Learned Drafting for Speculative Decoding. Speculative decoding verifies draft tokens in parallel using a target model (Leviathan et al., 2023; Chen et al., 2023). Blockwise decoding, MTP, and Medusa predict multiple positions in parallel (Stern et al., 2018; Gloeckle et al., 2024; Cai et al., 2024). Hydra and ReDrafter introduce dependencies between draft tokens (Ankner et al., 2024; Cheng et al., 2024). EAGLE drafts autoregressively from target features (Li et al., 2024b). EAGLE-2 adapts draft trees (Li et al., 2024a), and EAGLE-3 fuses multi-layer features for direct token prediction (Li et al., 2025). DistillSpec improves draft-target alignment through distillation (Zhou et al., 2024), while HASS aligns training and decoding contexts and objectives (Zhang et al., 2025). LayerSkip trains early exits for self-speculation (Elhoushi et al., 2024). DFlash generates draft blocks in parallel with a diffusion model (Chen et al., 2026).
Pipelined Speculative Decoding. SPEED pipelines decoding with cyclic parameter sharing, but invalidates dependent states and restarts computation when intermediate predictions change (Hooper et al., 2025). LoopSpec (Cho
Prompt: How many eggs are in two dozen eggs?
Output: Two dozen eggs contain twenty-four eggs.

Figure 2: Illustration of LoopAhead with an Ouro-1.4B decoding trajectory. LAD uses early-loop context and the native anchor to draft future tokens before verification. R2 feedback suspends conflicting branches while retaining their KV states for resumption. Full-depth R4 verification determines acceptance and pruning. The complete traces appear in Appendix E and Figure 13.
et al., 2026) provides training-free pipelining specially designed for looped models with gated deeper proposals and full-depth verification. However, each native readout predicts only the next token position and drafting further ahead requires additional recurrent computation.
3 Method
Framework Overview Figure 1 shows that early-loop predictions often agree with full-depth outputs, motivating us to draft future tokens early and use deeper-loop feedback to guide their execution. Figure 2 illustrates how LoopAhead combines these roles with full-depth verification.
3.1 Early-Loop LookAhead Drafting
Anchor-Conditioned Drafting from Early-Loop States Let denote the target state immediately before the vocabulary projection after r loops. It is computed at token and predicts position t. We collect w cached depth-r states along this branch.
For greedy decoding, the native prediction supplies an anchor at position t.
where is the frozen target vocabulary projection and is the target vocabulary. We call this direct target-model prediction a native proposal. Under sampling, the anchor is drawn after temperature scaling and nucleus truncation. The anchor need not be verified before drafting. Its embedding supplies the token at position t, while the cached states describe the preceding context.
The LAD drafter uses and to predict K additional tokens at positions , where E denotes the frozen target token embedding. It projects the context into a smaller hidden space and appends one query for each future position. Each query combines the anchor embedding, the latest projected context state, and a position embedding. A lightweight causal Transformer processes the context and queries together. Its output is projected back to the target hidden size and added to the latest early-loop state.
(3)
Here is the base drafter's token distribution at position . The base drafter computes all future hidden states in one forward pass. The causal mask allows each query to attend to the context and earlier query representations. All queries are constructed before token selection, so the base drafter predicts future positions without feeding one selected draft token into the next prediction. Ouro and Raven-TinyLlama select draft tokens directly from these predictions. Raven-Llama and Raven-OLMo add a small logit correction conditioned on the preceding draft token. Appendix A.5 gives the model-specific adaptations. Draft tokens are selected by argmax in both decoding regimes. Sampling randomness is handled by native proposals and full-depth verification.
Teacher Trajectories and Training Objectives
The frozen target generates full-depth greedy continuations of mixed-domain prompts. We record its early-loop states and use its generated tokens as training labels. For a teacher trajectory y, a training example at prediction position t is
Training supervises up to future positions, and inference uses . Base training uses teacher tokens as anchors. At inference, the anchor comes from the native early-loop proposal. Labels beyond the recorded continuation are masked. We train the base drafter with cross-entropy over valid teacher-label indices I.
The target model, token embeddings, and output projection remain frozen. The base drafter learns to turn early context into hidden states that predict the target's later tokens. Training objectives for the residual adaptations are given in Appendix A.5.
Low-Overhead Drafter Execution At inference, LAD projects to a request-specific vocabulary containing frequent training-output tokens, stop tokens, prompt tokens, and already committed tokens. We gather the corresponding rows of and restrict draft argmax and score normalization to this set. This reduces projection cost for each future position. Native proposals and final verification use the full target vocabulary .
3.2 Feedback-Guided Scheduling
Feedback from Intermediate Loops
Intermediate-loop readouts provide early feedback for candidates awaiting full-depth verification. A parent’s readout predicts the token represented by its child. Under greedy decoding, a candidate conflicts if its token differs from the parent’s prediction at the deepest available feedback depth. Under sampling, it conflicts if its token differs from all native proposal tokens recorded by the parent. Ouro uses one feedback depth, while Raven updates feedback across multiple depths. Appendix A.5 gives the selected depths and sampling rules.
Candidate Tree and Recurrent Execution The root represents the last committed token, and its descendants represent speculative continuations. Each retained node represents a candidate token and stores its parent, hidden state, KV states, and completed loop depth. Native proposals and LAD drafts enter the same tree. Proposals with the same token and parent share one node. The tree therefore reuses computations when different drafting paths propose the same continuation. Within each LAD extension, the candidate at position is attached to the native anchor , and each later candidate is attached to the preceding draft token. Different candidate tokens extending the same prefix form separate branches.
Nodes advance from their own loop depths, allowing candidates at different stages to run in the same batch. At each depth, a node attends to itself, the committed prefix, and its ancestors on the same branch. Figure 2 illustrates this attention mask. Required ancestor KV states must be available at the corresponding depth, either from the cache or from ancestors advanced in the same batch.
Execution Policy limits the nodes kept in the tree, while limits those advanced in each batch. A path conflicts if any token on it conflicts. Nodes within token positions of the committed prefix are protected from conflict-based suspension. The scheduler applies three operations.
(1) Execution. Select at most unfinished nodes with available predecessor states. Eligible nodes have conflict-free paths or lie within the protected region. The scheduling priority chooses among eligible nodes when the batch is full.
(2) Suspension and resumption. Suspend conflicting paths outside the protected region and retain their hidden states, KV states, and completed loop depths. A node becomes eligible again when feedback resolves the conflict or root advancement brings it into the protected region. Nodes left out of a batch remain available for later execution.
(3) Pruning. Full-depth verification selects the next output token. Keep its continuation and cached states, and discard competing subtrees. If the selected token has no retained node, create one and compute its states from the committed prefix.
Recursive Draft Expansion After each recurrent step, our scheduling policy considers nodes newly reaching the drafting depth and selects at most one of their native proposal children as an anchor, prioritizing those nearest the root. Drafting requires a cached context window and an anchor with no existing children. Each LAD call adds a chain of at most K tokens, subject to retention capacity and model-specific admission rules. A drafted node can later reach the same early depth and support another call, extending lookahead beyond one draft block. Appendix A.5 shows the details of admission and execution priorities.
Full-Depth Verification and Commitment The full-depth readout of a node determines the token that follows it. Greedy decoding selects the argmax. Sampling applies native proposal acceptance and residual correction against the full-depth distribution, as described in Appendix D. The selected token is then matched to a retained child, whether proposed natively or by LAD. This child becomes the root and preserves its computed states. If its full-depth readout is ready, commitment continues within the same step.
3.3 Theoretical Analysis
For greedy decoding, consider a length-L chain formed by recursive LAD calls after a correct prefix, and let be the full-depth continuation. Let N be their matching-prefix length and the first mismatch, with if all tokens match. Define , with , and .
Fix a feedback depth . Let be its native prediction under the same preceding tokens, and denote the probability that feedback predicts the target token at the first mismatch. Compare the same candidate workload with and without suspension, keeping other policies fixed. Let count advances on the rejected suffix performed without suspension and skipped with it, counting through final pruning. One advance runs one recurrent loop for one candidate. Let be a lower bound on .
Theorem 1 (Feedback-Guided Recursive Draft Filtering). Under this matched-workload comparison,
If and for all , where , then
The first bound sums the contributions from correct feedback at each possible first mismatch. In the second bound, is the expected matching-prefix length and is the expected rejected-suffix length. An early mismatch can leave many recursive successors on which feedback can save computation. The proof and extensions to multiple feedback depths and variable chain lengths are provided in Appendix C.1 in detail.
4 Experiments
4.1 Settings
Models. We evaluate Ouro-1.4B, Ouro-2.6B, Ouro-1.4B-Thinking (Zhu et al., 2025), Raven-Llama-3.2, Raven-OLMo-2, and Raven-TinyLlama (McLeish et al., 2025) from two model families, using 4 recurrences for Ouro and 32 for Raven. Inference runs on NVIDIA A40 GPUs (48 GB), with one request per GPU and BF16 target computation in a local PyTorch-based backend.
Draft Training and Inference Details. Each target uses a separately trained LAD drafter shared across all benchmarks. Teacher trajectories are collected from a pool of 9,025 training prompts spanning GSM8K (Cobbe et al., 2021), CodeAlpaca (Chaudhary, 2023), MATH (Hendrycks et al., 2021), BBH (Suzgun et al., 2023), and UltraChat (Ding et al., 2023), with 782 development and 782 confirmation prompts. LAD base drafters are two-layer Transformers with hidden size 512, trained for three epochs using AdamW with a peak learning rate of . Raven-Llama/OLMo additionally use R4 residual adapters, as detailed in Appendix A.5. The base drafter is trained to predict up to future tokens beyond the native anchor. At inference time, each LAD invocation generates at most three additional tokens for Ouro and Raven-TinyLlama, and two for Raven-Llama/OLMo. All main LoopAhead results use an 8,192-token base draft vocabulary without changing the target vocabulary.
Baselines. We compare LoopAhead with three baselines. (i) AR uses standard autoregressive decoding at full recurrent depth. (ii) LoopSpec is our reproduction of pipelined self-speculative decoding (Cho et al., 2026), with proposal depths (1, 2) for Ouro and (2, 8) for Raven, following the dual-proposal configuration provided in the official LoopSpec implementation (Cho et al., 2026). (iii) DFlash is a locally trained adapta-
| Model | Method | GSM8K | MATH500 | HumanEval | MBPP | BBH |
|---|---|---|---|---|---|---|
| Ouro-1.4B | DFlash | 2.19 (-24.8%) | 2.35 (-11.9%) | 1.29 (-60.8%) | 1.64 (-45.4%) | 3.21 (+20.6%) |
| LoopSpec | 2.92 (—) | 2.66 (—) | 3.29 (—) | 3.00 (—) | 2.66 (—) | |
| Ours | 4.27 (+46.4%) | 3.73 (+40.0%) | 4.07 (+23.8%) | 4.01 (+33.6%) | 4.30 (+61.6%) | |
| Ouro-2.6B | DFlash | 2.24 (-30.0%) | 2.30 (-18.0%) | 1.35 (-60.9%) | 1.72 (-46.6%) | 3.42 (+19.8%) |
| LoopSpec | 3.19 (—) | 2.80 (—) | 3.45 (—) | 3.22 (—) | 2.85 (—) | |
| Ours | 5.21 (+63.1%) | 4.37 (+55.9%) | 4.72 (+36.9%) | 4.76 (+47.8%) | 5.12 (+79.2%) | |
| Ouro-1.4B-Thinking | DFlash | 2.52 (-6.1%) | 2.40 (-1.6%) | 1.88 (-28.9%) | 1.92 (-27.9%) | 2.62 (+18.8%) |
| LoopSpec | 2.68 (—) | 2.44 (—) | 2.64 (—) | 2.66 (—) | 2.21 (—) | |
| Ours | 3.49 (+30.2%) | 3.10 (+27.0%) | 3.18 (+20.6%) | 3.17 (+19.0%) | 2.82 (+27.6%) | |
| Raven-Llama-3.2 | DFlash | 1.69 (-62.6%) | 1.60 (-71.1%) | 1.29 (-78.1%) | 1.47 (-72.1%) | 3.15 (-38.0%) |
| LoopSpec | 4.51 (—) | 5.51 (—) | 5.90 (—) | 5.28 (—) | 5.09 (—) | |
| Ours | 5.67 (+25.9%) | 6.05 (+9.7%) | 6.06 (+2.7%) | 5.86 (+11.0%) | 6.19 (+21.6%) | |
| Raven-OLMo-2 | DFlash | 1.93 (-58.5%) | 2.65 (-30.2%) | 1.51 (-73.7%) | 1.94 (-65.2%) | 3.70 (-7.3%) |
| LoopSpec | 4.65 (—) | 3.80 (—) | 5.73 (—) | 5.59 (—) | 3.99 (—) | |
| Ours | 6.01 (+29.4%) | 5.74 (+51.0%) | 6.13 (+6.8%) | 6.22 (+11.4%) | 6.14 (+54.0%) | |
| Raven-TinyLlama | DFlash | 1.85 (-65.8%) | 2.13 (-13.6%) | 1.37 (-79.7%) | 1.70 (-72.7%) | 3.18 (-45.9%) |
| LoopSpec | 5.41 (—) | 2.46 (—) | 6.76 (—) | 6.21 (—) | 5.88 (—) | |
| Ours | 6.69 (+23.5%) | 4.83 (+96.2%) | 7.82 (+15.7%) | 7.47 (+20.3%) | 7.51 (+27.8%) |
Table 1: Greedy decoding speedups ( ) over AR. Results for LoopAhead are highlighted with shading. Parentheses show throughput changes relative to LoopSpec, with increases in green and decreases in red. Bold marks the best result. Timing and aggregation are detailed in Appendix A.5.

(a) Loops / output token

(b) Candidate advances / output token
(c) Candidates advanced / loop
Figure 3: Recurrent computation profiles on Ouro-1.4B, Ouro-2.6B, Raven-Llama-3.2, and Raven-OLMo-2, pooled over five tasks with 3,023 requests per model. (a) Average loops per output token (relative to AR), . (b) Average candidate advances per output token (relative to AR), . (c) Average candidates advanced per loop, .
tion of DFlash (Chen et al., 2026). Its training and development-based block-size selection are detailed in Appendix A.3.
Benchmarks. We evaluate GSM8K (1,319 questions) (Cobbe et al., 2021), MATH500 (500) (Lightman et al., 2024), HumanEval (164) (Chen et al., 2021), MBPP test (500) (Austin et al., 2021), and a fixed BBH held-out split (540 with 20 per subtask) (Suzgun et al., 2023). The BBH evaluation split is disjoint from our training split. These benchmarks cover mathematical reasoning, code generation, and general reasoning, while additional evalu- ations on summarization and broader instruction-following tasks are reported in Appendix B.7.
Metrics. We report speedups of decoding throughput over AR decoding throughput. Timing includes drafting, scheduling, and verification, but excludes prefill, model loading, and warmup. We also report average loops per output token relative to AR, , and average candidate advances per output token relative to AR, . Here is the full target depth, excludes the first output token produced during prefill, counts the total number of loops,
| Model | Method | GSM8K | MATH500 | HumanEval | MBPP | BBH |
|---|---|---|---|---|---|---|
| Ouro-1.4B | DFlash | 1.72±0.03 (-30.4%) | 1.94±0.001 (-18.2%) | 1.24±0.02 (-56.8%) | 1.40±0.03 (-45.8%) | 2.15±0.03 (-5.1%) |
| LoopSpec | 2.47±0.02 (-) | 2.37±0.001 (-) | 2.87±0.01 (-) | 2.58±0.02 (-) | 2.26±0.02 (-) | |
| Ours | 3.03±0.04 (+22.8%) | 3.06±0.01 (+28.9%) | 3.42±0.02 (+18.9%) | 3.00±0.04 (+16.2%) | 3.09±0.03 (+36.4%) | |
| Raven-Llama-3.2 | DFlash | 1.12±0.03 (-52.6%) | 1.16±0.01 (-58.2%) | 1.03±0.03 (-66.6%) | 1.07±0.01 (-61.2%) | 2.00±0.06 (-38.5%) |
| LoopSpec | 2.37±0.05 (-) | 2.78±0.02 (-) | 3.10±0.13 (-) | 2.76±0.08 (-) | 3.26±0.07 (-) | |
| Ours | 3.24±0.03 (+36.8%) | 3.60±0.07 (+29.4%) | 3.80±0.02 (+22.9%) | 3.58±0.02 (+29.9%) | 4.32±0.03 (+32.6%) |
Table 2: Sampling decoding speedups ( ) over AR at T = 1 and top-p = 0.9, reporting mean sample standard deviation over seeds 0, 42, and 271828. Parentheses show average throughput changes relative to LoopSpec under three seeds. Colors and boldface follow Table 1.
and sums the number of candidates advanced in each loop. The average number of candidates advanced per loop is .
4.2 Evaluation Results
Under greedy decoding, LoopAhead outperforms LoopSpec and our DFlash adaptation on all 30 model–benchmark pairs while reproducing AR outputs, as shown in Table 1. Speedups over AR range from to , with the highest on Raven-TinyLlama/HumanEval. The largest additional gains over LoopSpec occur on mathematical or general reasoning tasks for every model, reaching 79.2% on Ouro-2.6B/BBH and 96.2% on Raven-TinyLlama/MATH500. The speedups also extend to HumanEval and MBPP, whose prompts are not used for drafter training, demonstrating LoopA-head's ability to generalize to code-generation benchmarks not used for drafter training.
Under sampling at T = 1 and top-p = 0.9, LoopAhead remains the fastest method on all ten pairs, achieving mean speedups of over AR and throughput gains of 16.2–36.8% over LoopSpec as shown in Table 2. The gains on reasoning tasks persist under sampling, exceeding 28% on both MATH500 and BBH for both models. Results are consistent across three seeds, with LoopAhead speedup standard deviations of 0.01–0.07×. Further 95% interval analysis under both settings is provided in Appendix B.3.
4.3 Ablation and Analysis
We conduct ablation studies using 428 held-out requests across five benchmarks per model to answer the following questions.
Q1: Is our method a simple combination of the LAD drafter and the scheduling policy?
Table 3 and Figure 5 show that LAD alone can slow decoding, while combining it with scheduling gives substantial gains and reduces candidate advances spent on discarded nodes for both models. With budgets, admission rules, and priorities fixed, enabling conflict-based suspension improves speedup on every benchmark for both models. This shows that feedback helps use the execution budget more effectively. LAD and scheduling therefore serve complementary roles, generating candidates early and controlling their computation.

(a) Drafter parameters
(b) Time per loop
Figure 4: Drafter size and per-loop decode cost. (a) Learned parameters on Ouro-1.4B, Ouro-2.6B, and Raven-Llama-3.2, excluding shared target weights and including R4 residual for Raven, . (b) Average decode time per loop, including drafting and scheduling, on Ouro-1.4B and Raven-Llama-3.2, pooled over five tasks with 3,023 requests per model, .
Q2: How much parallel computation is needed? Figure 3 shows that LoopAhead reduces average loops per output token relative to AR from 0.285 to 0.162 on Ouro-1.4B compared with LoopSpec, while increasing average candidate advances per output token relative to AR from 1.14 to 1.91. However, Raven-Llama and Raven-OLMo achieve higher throughput while advancing fewer candidates per loop and making and fewer candidate advances per output token, respectively. LoopAhead also makes fewer candidate advances per output token than DFlash on all four models shown. Thus, wider parallelism and selective execution offer two routes to faster decoding, with the
| Model | LAD | Sched. | Susp. | Vocab. | GSM8K | MATH500 | HumanEval | MBPP | BBH |
|---|---|---|---|---|---|---|---|---|---|
| Ouro-1.4B | × | × | × | — | 2.88× | 2.60× | 3.24× | 2.90× | 2.60× |
| × | ✓ | ✓ | — | 2.87× | 2.60× | 3.23× | 2.89× | 2.59× | |
| ✓ | × | × | × | 2.89× | 2.38× | 2.52× | 2.60× | 2.78× | |
| ✓ | ✓ | ✓ | × | 4.13× | 3.53× | 3.90× | 3.70× | 4.03× | |
| ✓ | ✓ | × | ✓ | 3.86× | 3.19× | 3.43× | 3.45× | 3.71× | |
| ✓ | ✓ | ✓ | ✓ | 4.26× | 3.61× | 4.01× | 3.80× | 4.13× | |
| Raven-Llama-3.2 | × | × | × | — | 4.32× | 4.42× | 4.68× | 4.53× | 4.37× |
| × | ✓ | ✓ | — | 4.30× | 4.42× | 4.67× | 4.52× | 4.36× | |
| ✓ | × | × | × | 3.82× | 3.56× | 3.75× | 3.63× | 4.01× | |
| ✓ | ✓ | ✓ | × | 5.44× | 5.74× | 5.59× | 5.56× | 5.91× | |
| ✓ | ✓ | × | ✓ | 4.79× | 4.61× | 4.80× | 4.67× | 5.04× | |
| ✓ | ✓ | ✓ | ✓ | 5.79× | 6.09× | 5.97× | 5.93× | 6.23× |
Table 3: Greedy decoding speedups ( ) over AR on 428 requests per model. Sched. denotes our full scheduling framework, with conflict-based suspension controlled separately by Susp. Vocab. denotes draft vocabulary reduction with 8,192 base tokens. Each model's last two rows are measured together, varying only suspension with budgets, admission rules, and priorities fixed. Native proposal depths are R1/R2 for Ouro and R4/R8 for Raven. Bold marks the best result per model and task.

(a) Ouro-1.4B

(b) Raven-Llama-3.2
| Metric | Off | On |
|---|---|---|
| 2.19 | 0.93 | |
| D | 0.725 | 0.656 |
| 17.87 | 11.99 | |
| thr | 108.2 | 160.4 |
| Metric | Off | On |
|---|---|---|
| 1.72 | 0.13 | |
| D | 3.867 | 2.709 |
| 22.86 | 13.62 | |
| thr | 70.6 | 109.8 |
Figure 5: Scheduling results with LAD and draft vocabulary reduction held fixed over 428 questions per model across five benchmarks. Bars show , the average number of candidate advances per output token relative to AR, and the dashed line denotes AR. Red annotations indicate the percentage reduction in candidate advances when scheduling is enabled. The tables report candidate advances on subsequently discarded nodes normalized by the same AR reference, ; average loops per output token, ; average candidates advanced per loop, ; and throughput (thr, in tokens/s).
latter reducing target computation on Raven.
Q3: Does each loop become more expensive due to the introduction of the draft model?
As shown in Figure 4, average decode time per loop increases from 7.72 to 9.45 ms on Ouro-1.4B compared with LoopSpec, but decreases from 4.34 to 3.37 ms on Raven-Llama. Ouro compensates for the higher cost with fewer loops per output token, while Raven benefits from cheaper execution. The drafter adds 11.1M parameters on Ouro, compared with 277.9M for DFlash. On Raven-Llama, LAD and its residual adapter together contain 19.5M parameters, compared with 325.1M for DFlash, keeping the additional model storage small. The draft model adds overhead, but fewer loops or candidate advances can more than offset it.
5 Conclusion
We present LoopAhead as a speculative decoding framework for looped language models that uses early-loop states to predict future candidates and intermediate feedback to guide their execution. Experiments show that our framework achieves consistent speedups over AR and LoopSpec under both greedy and stochastic decoding, while remaining lossless. The execution statistics reveal model-dependent tradeoffs between parallel computation and speedups. LoopAhead's key value lies in exploiting early predictions and translating them into useful computation, ultimately delivering substantial inference speedups.
Limitations
We discuss three main limitations of our work: LoopAhead currently requires model-specific adaptations in drafter training and scheduling. Models with fewer recurrent iterations and those with more iterations differ in their intermediate representations and the depths at which useful feedback be-comes available. We therefore adapt the drafter and select feedback depths and scheduling settings for each model family. Applying LoopAhead to a new architecture requires drafter training and scheduling choices based on development data.
Although LoopAhead consistently accelerates decoding in our evaluations, its gains over the training-free LoopSpec baseline are modest on some model–benchmark pairs. Task type and difficulty may affect how reliably the drafter predicts several future tokens. When these predictions are less accurate, additional lookahead can introduce verification work without producing enough accepted tokens to offset its cost. Scheduling helps control this work but cannot fully compensate for poor drafts. The additional training effort therefore does not yield equally large improvements on every task, and understanding these task-dependent differences requires further study.
Our scheduler responds dynamically to intermediate-loop feedback, but its rules and budgets are fixed in advance. Our evaluation uses one request per GPU. Concurrent serving introduces changing request lengths, GPU load, and memory pressure. Wider execution may also become less beneficial when the GPU is already busy. Future work can adapt drafting and execution budgets to candidate quality and changing serving workloads.
References
Zachary Ankner, Rishab Parthasarathy, Aniruddha Nrusimha, Christopher Rinard, Jonathan Ragan-Kelley, and William Brandon. 2024. Hydra: Sequentially-dependent draft heads for medusa decoding. arXiv preprint arXiv:2402.05109.
Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, et al. 2021. Program synthesis with large language models. arXiv preprint arXiv:2108.07732.
Tianle Cai, Yuhong Li, Zhengyang Geng, Hongwu Peng, Jason D. Lee, Deming Chen, and Tri Dao. 2024. Medusa: Simple LLM inference acceleration framework with multiple decoding heads. arXiv preprint arXiv:2401.10774.
Sahil Chaudhary. 2023. Code alpaca: An instruction-following llama model for code generation. https://github.com/sahil280114/codealpaca.
Charlie Chen, Sebastian Borgeaud, Geoffrey Irving, Jean-Baptiste Lespiau, Laurent Sifre, and John
Jumper. 2023. Accelerating large language model decoding with speculative sampling. arXiv preprint arXiv:2302.01318.
Jian Chen, Yesheng Liang, and Zhijian Liu. 2026. DFlash: Block diffusion for flash speculative decoding. arXiv preprint arXiv:2602.06036.
Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde De Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. 2021. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374.
Yunfei Cheng, Aonan Zhang, Xuanyu Zhang, Chong Wang, and Yi Wang. 2024. Recurrent drafter for fast speculative decoding in large language models. arXiv preprint arXiv:2403.09919.
Sang Lyul Cho, Langqing Cui, Sehoon Kim, Dongsu Han, and Insu Han. 2026. LoopSpec: Pipelined self-speculative decoding for looped transformers. arXiv preprint arXiv:2609.17184.
Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, Christopher Hesse, and John Schulman. 2021. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168.
Mostafa Dehghani, Stephan Gouws, Oriol Vinyals, Jakob Uszkoreit, and Łukasz Kaiser. 2018. Universal transformers. arXiv preprint arXiv:1807.03819.
Ning Ding, Yulin Chen, Bokai Xu, Yujia Qin, Shengding Hu, Zhiyuan Liu, Maosong Sun, and Bowen Zhou. 2023. Enhancing chat language models by scaling high-quality instructional conversations. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 3029–3051, Singapore. Association for Computational Linguistics.
Mostafa Elhoushi, Akshat Shrivastava, Diana Liskovich, Basil Hosmer, Bram Wasti, Liangzhen Lai, Anas Mahmoud, Bilge Acun, Saurabh Agarwal, Ahmed Roman, et al. 2024. Layerskip: Enabling early exit inference and self-speculative decoding. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 12622–12642.
Jonas Geiping, Sean McLeish, Neel Jain, John Kirchembauer, Siddharth Singh, Brian Bartoldson, Bhavya Kailkhura, Abhinav Bhatele, and Tom Goldstein. 2026. Scaling up test-time compute with latent reasoning: A recurrent depth approach. Advances in Neural Information Processing Systems, 38:41340–41391.
Fabian Gloeckle, Badr Youbi Idrissi, Baptiste Rozière, David Lopez-Paz, and Gabriel Synnaeve. 2024. Better & faster large language models via multi-token prediction. arXiv preprint arXiv:2404.19737.
Aaron Grattafiori, Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Alex Vaughan, et al. 2024. The llama 3 herd of models. arXiv preprint arXiv:2407.21783.
Hyeongju Ha and Jae-Joon Kim. 2026. Wavefront decoding: Parallelized self-speculative decoding for looped language models. arXiv preprint arXiv:2609.23033.
Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. 2021. Measuring mathematical problem solving with the math dataset. arXiv preprint arXiv:2103.03874.
Coleman Hooper, Sehoon Kim, Hiva Mohammadzadeh, Hasan Genc, Kurt Keutzer, Amir Gholami, and Yakun Sophia Shao. 2025. Speed: Speculative pipelined execution for efficient decoding. In Enhancing LLM Performance: Efficacy, Fine-Tuning, and Inference Techniques, pages 19–32. Springer.
Haoyun Jiang, Junqi He, Feng Hong, Xinlong Yang, Jianwei Zhang, Zheng Li, Zhengyang Zhuge, Zhiyong Chen, Bo Han, Junyang Lin, et al. 2026. Trispec: Ternary speculative decoding via lightweight proxy verification. arXiv preprint arXiv:2601.23180.
Yaniv Leviathan, Matan Kalman, and Yossi Matias. 2023. Fast inference from transformers via speculative decoding. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 19274–19286. PMLR.
Xuechen Li, Tianyi Zhang, Yann Dubois, Rohan Taori, Ishaan Gulrajani, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. 2023. Alpacaeval: An automatic evaluator of instruction-following models. https://github.com/tatsu-lab/alpaca_eval.
Yuhui Li, Fangyun Wei, Chao Zhang, and Hongyang Zhang. 2024a. EAGLE-2: Faster inference of language models with dynamic draft trees. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 7421–7432, Miami, Florida, USA. Association for Computational Linguistics.
Yuhui Li, Fangyun Wei, Chao Zhang, and Hongyang Zhang. 2024b. Eagle: Speculative sampling requires rethinking feature uncertainty. arXiv preprint arXiv:2401.15077.
Yuhui Li, Fangyun Wei, Chao Zhang, and Hongyang Zhang. 2025. EAGLE-3: Scaling up inference acceleration of large language models via training-time test. arXiv preprint arXiv:2503.01840.
Hunter Lightman, Vineet Kosaraju, Yuri Burda, Harrison Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, and Karl Cobbe. 2024. Let's verify step by step. In International
Conference on Learning Representations, volume 2024, pages 39578–39601.
Sean McLeish, Ang Li, John Kirchenbauer, Dayal Singh Kalra, Brian R Bartoldson, Bhavya Kailkhura, Avi Schwarzschild, Jonas Geiping, Tom Goldstein, and Micah Goldblum. 2025. Teaching pretrained language models to think deeper with retrofitted recurrence. arXiv preprint arXiv:2511.07384.
Team OLMo, Pete Walsh, Luca Soldaini, Dirk Groeneveld, Kyle Lo, Shane Arora, Akshita Bhagia, Yuling Gu, Shengyi Huang, Matt Jordan, et al. 2024. 2 olmo 2 furious. arXiv preprint arXiv:2501.00656.
Nikunj Saunshi, Nishanth Dikkala, Zhiyuan Li, Sanjiv Kumar, and Sashank J Reddi. 2025. Reasoning with latent thoughts: On the power of looped transformers. In International Conference on Learning Representations, volume 2025, pages 14855–14881.
Kristian Schwethelm, Daniel Rueckert, and Georgios Kaissis. 2026. Depth-adaptive inference of looped language models via continuous depth batching. arXiv preprint arXiv:2608.09444.
Abigail See, Peter J Liu, and Christopher D Manning. 2017. Get to the point: Summarization with pointer-generator networks. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1073–1083.
Mitchell Stern, Noam Shazeer, and Jakob Uszkoreit. 2018. Blockwise parallel decoding for deep autoregressive models. Advances in Neural Information Processing Systems, 31.
Mirac Suzgun, Nathan Scales, Nathanael Schärli, Sebastian Gehrmann, Yi Tay, Hyung Won Chung, Aakanksha Chowdhery, Quoc Le, Ed H Chi, Denny Zhou, et al. 2023. Challenging big-bench tasks and whether chain-of-thought can solve them. In Findings of the Association for Computational Linguistics: ACL 2023, pages 13003–13051.
Lefan Zhang, Xiaodan Wang, Yanhua Huang, and Rui-wen Xu. 2025. Learning harmonized representations for speculative sampling. In International Conference on Learning Representations, volume 2025, pages 35367–35388.
Peiyuan Zhang, Guangtao Zeng, Tianduo Wang, and Wei Lu. 2024. Tinyllama: An open-source small language model. arXiv preprint arXiv:2401.02385.
Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric. P Xing, Hao Zhang, Joseph E. Gonzalez, and Ion Stoica. 2023. Judging llm-as-a-judge with mt-bench and chatbot arena. Preprint, arXiv:2306.05685.
Jeffrey Zhou, Tianjian Lu, Swaroop Mishra, Siddhartha Brahma, Sujoy Basu, Yi Luan, Denny Zhou, and Le Hou. 2023. Instruction-following evaluation for large language models. Preprint, arXiv:2311.07911.
Yongchao Zhou, Kaifeng Lyu, Ankit Singh Rawat, Aditya Krishna Menon, Afshin Rostamizadeh, Sanjiv Kumar, Jean-François Kagy, and Rishabh Agarwal. 2024. Distillspec: Improving speculative decoding via knowledge distillation. In International Conference on Learning Representations, volume 2024, pages 32011–32050.
Rui-Jie Zhu, Zixuan Wang, Kai Hua, Tianyu Zhang, Ziniu Li, Haoran Que, Boyi Wei, Zixin Wen, Fan Yin, He Xing, et al. 2025. Scaling latent reasoning via looped language models. arXiv preprint arXiv:2510.25741.
A Experimental Setting
A.1 Models
We evaluate six models from the Ouro (Zhu et al., 2025) and Raven (McLeish et al., 2025) families. Table 4 lists the checkpoint identifiers and the revisions recorded in our experiment configurations. All target-model parameters remain frozen during drafter training and inference.
Ouro. We use Ouro-1.4B, Ouro-2.6B, and Ouro-1.4B-Thinking (Zhu et al., 2025). The 1.4B checkpoints contain 24 shared Transformer layers, while Ouro-2.6B contains 48. Their hidden size is 2,048, feed-forward width is 5,632, and attention uses 16 query heads and 16 key/value heads with head dimension 128. The vocabulary contains 49,152 tokens. We fix the target computation to four recurrent passes and disable adaptive early exit.
Raven. We use the recurrence-32 checkpoints (McLeish et al., 2025) retrofitted from Llama-3.2 (Grattafori et al., 2024), OLMo-2-0425 (OLMo et al., 2024), and TinyLlama-3T (Zhang et al., 2024). All three targets execute 32 recurrent passes while retaining their checkpoint-specific prelude, recurrent core, and coda. For example, Raven-Llama-3.2 has four prelude layers, six shared core layers and four coda layers. Raven-TinyLlama has eight layers in its recurrent core. Intermediate proposals are obtained through the corresponding coda readout, rather than by directly applying the vocabulary projection to an unfinished recurrent latent.
Tokenization and thinking mode. Inputs are tokenized separately with each checkpoint's tokenizer. Base-model prompts use add_special_tokens=False, without an additional automatically inserted beginning-of-sequence token. For Ouro-1.4B-Thinking, we wrap the task prompt in the released chat template with enable_thinking=True and a generation prompt. Generation stops when the end-of-sequence token is produced or the task-specific output budget is reached. Task-specific completion delimiters are disabled for this checkpoint to avoid interrupting its reasoning.
A.2 Datasets
Evaluation benchmarks. We evaluate five benchmarks covering mathematical reasoning, code generation, and general reasoning. GSM8K (Cobbe et al., 2021) contains grade-school mathematical word problems. We use all 1,319 test questions with three fixed chain-of-thought demonstrations. MATH500 (Lightman et al., 2024) contains 500 competition-level mathematics problems from the MATH test set, covering several mathematical subjects and difficulty levels. We use four fixed Minerva-style demonstrations, while drafter training draws from the separate 7,500-example MATH training split (Hendrycks et al., 2021). HumanEval (Chen et al., 2021) contains 164 Python function-completion problems with function signatures and specifications. MBPP (Austin et al., 2021) contains short Python programming tasks, and we use its 500 test examples with task identifiers 11–510. Both code benchmarks use zero-shot prompts. HumanEval retains the original function specification, while MBPP includes the task description and first public example assertion. BBH (Suzgun et al., 2023) covers 27 challenging reasoning subtasks. We use 20 held-out questions per subtask, giving 540 evaluation questions, with three fixed chain-of-thought demonstrations for each subtask. Each subtask also contributes 75 training, 10 development, and 10 confirmation questions to the drafter data. These partitions are disjoint, and demonstration questions are excluded from data selection. Table 5 lists sample counts, prompt formats, and output budgets.
Additional evaluation benchmarks. The supplementary experiments cover CNN/DailyMail (See et al., 2017), AlpacaEval (Li et al., 2023), IFEval (Zhou et al., 2023), and MT-Bench (Zheng et al., 2023). CNN/DailyMail pairs news articles with summary highlights and provides our news-summarization prompts. AlpacaEval contains diverse user instructions, while IFEval contains instructions with verifiable requirements such as length and formatting constraints. We select 128 prompts from each of these three datasets. For MT-Bench, we use the first turns of 38 questions from writing, roleplay, extraction, and humanities. The maximum output lengths are 256, 512, 1,024, and 512 tokens for the four datasets, respectively. All evaluated methods use the same selected prompts and output budgets. Results appear in Appendix B.7. For these tasks, Ouro uses its released chat template and Raven uses completion prompts.
Mixed-domain drafter data. All teacher trajectories for training LAD drafters are based on
| Model | Hugging Face checkpoint | Revision |
|---|---|---|
| Ouro-1.4B | ByteDance/Ouro-1.4B | 574fa66cb8bf |
| Ouro-2.6B | ByteDance/Ouro-2.6B | 1ed04250da1a |
| Ouro-1.4B-Thinking | ByteDance/Ouro-1.4B-Thinking | 3aaa2224253a |
| Raven-Llama-3.2 | smcleish/Recurrent-Llama-3.2-train-recurrence-32 | a5f6f126e9d9 |
| Raven-OLMo-2 | smcleish/Recurrent-OLMo-2-0425-train-recurrence-32 | e1208e9af61d |
| Raven-TinyLlama | smcleish/Recurrent-TinyLlama-3T-train-recurrence-32 | 2579b6a0e983 |
Table 4: Target checkpoints. Revisions are abbreviated to their first 12 hexadecimal characters.
| Benchmark | Examples | Prompt | Max. tokens |
|---|---|---|---|
| GSM8K | 1,319 | 3-shot CoT | 512 |
| MATH500 | 500 | 4-shot | 2,048 |
| HumanEval | 164 | 0-shot | 1,024 |
| MBPP | 500 | 0-shot | 1,024 |
| BBH | 540 | 3-shot CoT | 1,024 |
Table 5: Benchmark settings for our evaluation experiments, including example numbers, prompt format and output budgets.
| Source | Train | Dev. | Confirm. |
|---|---|---|---|
| GSM8K train | 2,000 | 128 | 128 |
| Python CodeAlpaca | 2,000 | 128 | 128 |
| MATH train | 2,000 | 128 | 128 |
| BBH custom split | 2,025 | 270 | 270 |
| UltraChat | 1,000 | 128 | 128 |
| Total | 9,025 | 782 | 782 |
Table 6: Training, development, and confirmation prompts used to collect teacher trajectories for model-specific LAD drafters.
the same prompt pool in Table 6. The sources are GSM8K training questions, Python-filtered CodeAlpaca (Chaudhary, 2023) instructions, the original MATH training split, the disjoint BBH partitions described above, and the train_sft split of UltraChat (Ding et al., 2023). CodeAlpaca examples explicitly targeting other programming languages are excluded. For UltraChat, we retain the first user request rather than using the supplied assistant response as the training target. We construct three disjoint prompt sets containing 9,025 training, 782 development, and 782 confirmation prompts. The development set is used to select the checkpoint with the highest average accepted prefix length across the five domains. The selected checkpoint is then evaluated once on the confirmation set, which is not used for checkpoint selection.
Data isolation. We protect evaluation questions and few-shot demonstrations before selecting training, development, and confirmation requests. Exact duplicates are detected after Unicode NFKC normalization, case normalization, and whitespace normalization. Near-duplicate filtering uses token 5-gram Jaccard similarity of at least 0.9 with at least eight shared 5-grams, while retaining punctuation and mathematical operators. For BBH, 5-grams shared by at least of the examples in the same subtask are ignored when computing similarity to reduce the influence of repeated task instructions. These checks remove exact and near-duplicate questions across the data partitions.
A.3 Baselines
Autoregressive decoding. The AR baseline completes all recurrent passes before producing the next token. It uses the same target checkpoint, tokenizer, prompts, and generation settings as the speculative methods. AR provides the full-depth reference for greedy output checks and the denominator for the reported decoding throughput speedups.
LoopSpec. Our principal baseline is the training-free, dual-proposal LoopSpec method (Cho et al., 2026). Its first and second proposal depths are (1, 2) for Ouro and (2, 8) for Raven, with final verification at depths 4 and 32, respectively. We retain its gated second proposal, cascading verification and reuse of accepted speculative descendants, and reproduce the baseline's scheduling semantics from the official implementation and align its target backend with LoopAhead.
DFlash. We train a local adaptation of DFlash (Chen et al., 2026) for each of the six targets, using frozen target features and the mixed-domain training trajectories. The five-layer drafter is trained for 10,000 updates with batch size 32, 32 sampled anchors per sequence, learning rate , maximum sequence length 3,072, and training block size 16. The masked-block cross-entropy uses positional decay scale 7. We evaluate checkpoints every 500 updates on 40 fixed development prompts, with eight from each training domain. We select the checkpoint with
| Model group | R | K | Stride | |||||
|---|---|---|---|---|---|---|---|---|
| All Ouro checkpoints | 1 | 2 | 4 | 3 | 32 | 16 | 2 | 1 |
| Raven-Llama / OLMo | 4 | 8 | 32 | 2 | 32 | 16 | 1 | 2 |
| Raven-TinyLlama | 2 | 8 | 32 | 3 | 48 | 32 | 1 | 2 |
Table 7: Greedy LoopAhead execution parameters.
the highest mean accepted-prefix length across domains, counting the anchor token. Serving block size is selected from on 20 fixed development prompts separately for greedy decoding and sampling. Our implementation of DFlash uses the same target checkpoints, saved evaluation inputs, recurrent depths, and stopping rules as the other methods. We use hidden states from five layers of the target network unrolled to its full recurrent depth. For layer executions, the selected zero-based indices are round for . Raven's layer count includes the prelude and final coda. The selected states are concatenated, linearly projected, and normalized, then supplied to the key and value projections of every drafter layer. For Ouro-1.4B and Ouro-2.6B, the best checkpoints occur at updates 5,500 and 6,000, with development accepted-prefix lengths of 4.59 and 4.84, compared with 4.35 and 4.74 at update 10,000. Ouro-1.4B-Thinking selects the final checkpoint, with its accepted-prefix length increasing only from 3.500 at update 8,000 to 3.503 at update 10,000. For Raven-Llama, Raven-OLMo, and Raven-TinyLlama, the selected checkpoints occur at updates 5,000, 9,000, and 5,500, with development accepted-prefix lengths of 4.14, 5.24, and 4.22. At update 10,000, these values are 3.90, 5.19, and 4.03, respectively.
Across the five greedy benchmarks, DFlash commits an average of 2.47–2.94 tokens per verification across the six models, pooling 3,023 requests per model. Ouro-1.4B and Raven-Llama-3.2 commit 2.88 and 2.47 tokens per verification, with draft-token acceptance rates of 27.1% and 9.9%, respectively. Their development-selected block sizes are 8 and 16. The committed-token counts include correction or bonus tokens.
A.4 Additional Experimental Details
Scheduling-only controls. The LAD-off rows in Table 3 retain native proposals and the same feedback depths as the corresponding LAD-on configurations. Ouro uses R1/R2, and Raven-Llama uses R4/R8. Figure 5 instead holds LAD and draft vocabulary reduction fixed and compares schedul- ing off and on.
Factorial ablation scope. The component ablations use a fixed subset of 428 evaluation requests per model, comprising 128 from GSM8K, 64 each from MATH500, HumanEval, and MBPP, and 108 from BBH. This subset is disjoint from the drafter training, development, and confirmation sets. LAD, scheduling, and the compact vocabulary are toggled within this fixed scope. The scheduling switch jointly controls execution limits, conflict suspension, and the associated admission and priority rules. Raven retains R4/R8 proposals and R32 verification even with LAD disabled.
A.5 Implementation Details
Hardware and inference backend. Experiments use a server with four NVIDIA A40 GPUs, each with 48 GB of memory. Each GPU processes one request at a time, and the GPUs run independent experiment shards. Our local implementation uses PyTorch 2.6.0, Triton 3.2.0, Transformers 4.54.1, FlashAttention 2.8.3.post1, and CUDA 12.4. All methods use BF16 target weights and caches, with FP32 accumulation in target linear kernels.
Drafter architecture. The base drafter consumes a causal window of 64 actual target states and the embedding of a native anchor token. It contains two causal Transformer layers with hidden size 512, eight attention heads, and feed-forward width 1,536, using RMSNorm and a SiLU-gated feedforward network. Its outputs are mapped back to the target hidden dimension and read through the frozen target vocabulary projection described in Section 3.1. Training supervises up to seven future positions, whereas the deployed extension length is smaller and model dependent (Table 7).
Base-drafter optimization. We train each base drafter from scratch for three epochs with cross-entropy supervision over valid future positions. Each epoch samples 32 anchor positions per training request. The microbatch size is eight with eight gradient-accumulation steps, giving an effective batch size of 64. We use AdamW with
, weight decay 0.01, and gradient-norm clipping at 1.0. The learning rate warms up linearly over the first 5% of updates to and then follows cosine decay toward . The training seed is 42.
Development evaluation is performed every 500 optimizer updates and at the final update, using eight fixed anchors per development request. Checkpoint selection maximizes the mean accepted-prefix length across the five development domains, with cross-entropy used to break ties. For each anchor, we count the longest correct prefix consisting of the native anchor followed by up to three drafter predictions, using the full-depth target's greedy trajectory as reference. The selected checkpoint is evaluated once on the separate confirmation split. Target-model parameters remain frozen throughout optimization.
R4 adaptation for Raven. Raven-Llama and Raven-OLMo additionally use a token-conditioned residual head with a 64-dimensional bottleneck, adapted to actual R4 features. The previously trained R2 drafter backbone remains frozen. The residual head applies trainable normalization, projects both the drafter hidden representation and the preceding-token embedding into the 64-dimensional latent space, and maps their combined representation to a vocabulary-logit correction. It is part of the deployed drafter, not a second independently executed language model. For a base hidden prediction h and predecessor token embedding e, the correction is
The matrices and project their inputs into a 64-dimensional latent space, while maps the latent representation to a vocabulary-logit correction. At inference time, the frozen backbone, originally trained on R2 features, takes the actual R4 context window and the native anchor as input and jointly produces the base hidden predictions using the formulation in Section 3.1, with . The R4-adapted residual head then corrects the corresponding vocabulary logits by conditioning each prediction on its predecessor token, using the native anchor for the first prediction and the previously selected draft token for later predictions:
(9)
Here, is the candidate for output position , and is the current request's draft vocabulary. The frozen backbone computes all base hidden predictions jointly. Each logit correction then uses the preceding selected draft token.
For Raven-Llama, the base drafter contains 11,051,008 learned parameters and the residual head adds 8,472,576, giving 19,523,584 learned parameters in total. During residual adaptation, the base drafter is frozen and only the residual head is optimized. For each model, this stage uses 100 training and 16 development requests from each of the five domains, totaling 500 and 80 requests, respectively. It additionally collects at most 16 online windows from each of 32 GSM8K training requests. Each training batch contains 25% online windows and 75% offline trajectory windows.
The residual head is trained for 600 updates with a microbatch size of four, effective batch size 32, and peak learning rate . The objective averages a teacher-forced loss conditioned on teacher-generated predecessor tokens, and a self-rollout loss conditioned on the model's own selected predecessors. The three prediction positions are weighted by . For the self-rollout term, a position is supervised only if all preceding rollout predictions are correct, so supervision is masked after the first rollout error. Development selection is performed every 100 updates using self-generated accepted-prefix length. Raven-TinyLlama instead uses its R2 base drafter without the R4 residual head.
Model-specific execution settings. Table 7 summarizes the adopted greedy LoopAhead configurations. Here, is the native anchor and drafter-feature depth, is the second native proposal depth, R is the final target depth, and K counts additional draft tokens, excluding the native anchor. Stride is the number of loops in each pipeline step.
Ouro uses R2 feedback and prioritizes nodes closer to the committed root. Under sampling, ties are broken by the estimated probability of the candidate path matching the final output. Raven prioritizes paths formed by native proposals, then distance. Raven-Llama/OLMo use R4 feedback fol-lowed by R8, while Raven-TinyLlama uses R2 followed by R8. Suspended nodes are reconsidered as feedback or the root changes. When new feedback arrives, Raven-TinyLlama prunes an uncommitted LAD node and its descendants if its token differs from the parent's deepest available prediction and its subtree contains no nodes on native-proposal paths. Their cached states are released.
For Ouro greedy decoding, LAD is called for an eligible anchor when free retention capacity is available. Each call predicts additional tokens and retains the first predictions, where f is the number of free retention slots.
For Raven, the call and retained lengths are both limited by K, free retention slots, spare execution-batch capacity, and the remaining output budget with one position reserved. The capacity threshold used for LAD admission can expand from 8 to 16 for Raven-Llama/OLMo, and from 16 to 20 or 20 to 24 for Raven-TinyLlama. Successive expansions require at least four newly committed tokens. Raven-Llama/OLMo allow the first expansion immediately, while Raven-TinyLlama waits until four output tokens are committed. These thresholds control draft admission, while limits the number of nodes advanced in each batch.
For Ouro sampling, we calibrate candidate quality and execution costs on 16 development prompts, with eight each from GSM8K and CodeAlpaca. Let estimate the probability that the candidate path through draft position matches the final output. Before drafting, this estimate uses draft position and distance from the root. After drafting, it also uses token confidence over the draft vocabulary, grouped into four equal-width bins. The call length and retained length maximize
where incorporates the observed confidence. Here estimates the time saved per accepted draft token, is the cost of one LAD call, and is the added execution cost per retained candidate. We search and , select zero when the maximum is nonpositive, and favor shorter lengths in ties. The calibrated costs are approximately ms, ms, and ms. We fix these estimates across benchmarks and seeds.
Draft vocabulary. For each target model, we select the 8,192 most frequent tokens in teacher-generated training outputs as the base draft vocabulary, breaking ties by token ID. At inference, we add tokens from the prompt, the EOS token, and already committed outputs. LAD uses the resulting request-specific vocabulary for its output projection. Native proposals and full-depth verification use the complete target vocabulary.
Decoding settings. Greedy evaluation covers all six checkpoints. Sampling evaluation covers Ouro-1.4B and Raven-Llama-3.2 with temperature , top-p = 0.9, and three sampling seeds . For each seed, every example-method pair is executed once. For sampling, temperature scaling and nucleus truncation are applied to each native distribution before constructing residual distributions. LAD uses argmax candidates, while native proposals and full-depth verification provide sampling randomness.
Timing and aggregation. Models and CUDA graphs are loaded, captured, and warmed up before timed generation. Decode time is measured with a wall-clock timer, with CUDA synchronization before and after the timed region. We measure the iterative decoding phase after prompt prefill and initial request setup. Timing includes learned drafting, native readouts, recurrent verification, sampling, branch scheduling, stopping checks, and decode-time candidate-vocabulary maintenance. It excludes model loading, graph capture, warm-up, prefill, post-run checks, and result serialization.
For a fixed model, benchmark, and decoding regime, throughput is computed as
where counts generated tokens in the iterative decoding phase for method m on request i. The first generated token is produced during prefill and is excluded from this count.
B Supplementary Experiments
B.1 Predictions at Intermediate Depths
The depth and LAD diagnostics use the same 310 questions per model, comprising 64 each from GSM8K, MATH500, HumanEval, and MBPP, and

(a) Ouro-1.4B All generated
(b) Raven-Llama-3.2 All generated
(c) Ouro-1.4B Verified
(d) Raven-Llama-3.2 Verified
Figure 6: LAD token quality by extra-token offset i on five benchmarks. Panels (a,b) show full-depth agreement rate among all generated candidates . Panels (c,d) show acceptance rate among candidates checked during verification .

(a) Accuracy
(b) Token agreement
Figure 7: Raven-Llama-3.2 task accuracy at fixed exit depths and token agreement with full-depth predictions across five benchmarks, supplementing Figure 1.
54 from BBH. We measure task accuracy by generating complete answers at a fixed exit depth. Token agreement compares predictions at depth r with full-depth predictions on the same AR prefixes.
Figure 7 extends the Ouro analysis to Raven-Llama-3.2. Exiting at R2 gives 50.0% accuracy on GSM8K and 20.3% on MATH500, compared with 65.6% and 32.8% at R32. Token agreement improves rapidly in the early loops, reaching 97.0–99.1% at R4 and further increasing to 99.3–99.7% at R8 across the five tasks. These results support intermediate-loop drafting and scheduling with full-depth verification.
B.2 Quality of LAD Draft Tokens
Figure 6 evaluates each additional position i beyond the native anchor. We report , the fraction of all generated candidates matching the full-depth prediction under their own prefixes, and , the fraction accepted among candidates checked against their committed parent's final prediction.
Draft quality decreases at later positions. On Ouro/GSM8K, falls from 64.3% at the first extra token to 36.1% at the third, while falls from 68.7% to 55.9%. On Raven/GSM8K, the corresponding values decrease from 51.9% to 34.8% and from 55.1% to 44.3% over two extra positions. Later drafts remain useful, but their lower quality favors short extensions and selective execution.
B.3 Confidence Intervals for Main Results
We compute pointwise 95% confidence intervals from the saved full-benchmark results using 10,000 paired-question bootstrap resamples. Each resample keeps methods and sampling seeds paired by question and recomputes their pooled throughputs. BBH is stratified by its 27 subtasks. Sampling gains are averaged across seeds 0, 42, and 271828 after computing the throughput ratio within each seed. These intervals reflect variation across question samples.
Figures 8 and 9 show throughput gains over LoopSpec, with intervals above zero for 29 of 30 greedy pairs and all ten sampling pairs.
B.4 Choice of Drafting and Feedback Depths
We evaluate 11 combinations of draft depth and intermediate-feedback depth using 428 questions per model from the evaluation set, disjoint from the drafter training, development, and confirmation sets. The main configurations were fixed before these sweeps. Full-depth verification remains at R32, and the other inference settings are unchanged. For each target model, all depth con-

(a) Ouro-1.4B

(b) Ouro-2.6B

(c) Ouro-1.4B-Thinking

(d) Raven-Llama-3.2

(e) Raven-OLMo-2

(f) Raven-TinyLlama
Figure 8: Greedy throughput gains of LoopAhead over LoopSpec across six models and five benchmarks. Points show observed gains and black bars show 95% confidence intervals. The dashed line marks equal throughput.

(a) Ouro-1.4B

(b) Raven-Llama-3.2
Figure 9: Sampling throughput gains of LoopAhead over LoopSpec at T = 1 and top-p = 0.9. Points show mean gains over three seeds, and black bars show 95% confidence intervals. The dashed line marks equal throughput.
figurations share its frozen R2-trained drafter backbone. We use no residual correction at R2, reuse the existing R4 residual heads, and train R6 residual heads following the procedure in Appendix A.5.
As shown in Figure 10, Raven-Llama and Raven-OLMo achieve their highest average relative throughput with R4 drafting and R8 feedback, while R4–R12 performs similarly. Raven-TinyLlama instead favors R2–R8. These results support the model-specific drafting depths and shared R8 feedback used in our main experiments. Deeper readouts do not consistently improve speed, since they also delay candidate generation or scheduling feedback.
B.5 Effect of Draft Length
Using the same 428 requests per model as the component ablation, we vary the number of additional LAD tokens K while keeping the trained drafter and scheduling settings fixed. Throughput is pooled across the five tasks, and confidence intervals use paired question resampling within each task.
In Figure 11, Ouro reaches its highest measured speedup of at , close to at , and falls to at . Raven improves from at to at , with little change at . The benefit of longer drafts therefore levels off at a small , supporting the main settings of three extra tokens for Ouro and
| Model | Method | CNN/DailyMail | AlpacaEval | IFEval | MT-Bench |
|---|---|---|---|---|---|
| Ouro-2.6B | DFlash | 0.94 (-63.4%) | 1.16 (-62.6%) | 1.14 (-63.2%) | 1.06 (-61.6%) |
| LoopSpec | 2.56 (—) | 3.11 (—) | 3.11 (—) | 2.75 (—) | |
| Ours | 2.62 (+2.4%) | 3.43 (+10.4%) | 3.33 (+7.3%) | 2.81 (+2.4%) | |
| Raven-Llama-3.2 | DFlash | 0.94 (-76.5%) | 1.33 (-71.2%) | 1.20 (-76.7%) | 1.17 (-74.0%) |
| LoopSpec | 4.01 (—) | 4.60 (—) | 5.13 (—) | 4.51 (—) | |
| Ours | 4.51 (+12.3%) | 5.31 (+15.4%) | 5.39 (+5.0%) | 5.14 (+14.0%) | |
| Raven-OLMo-2 | DFlash | 1.05 (-73.1%) | 1.34 (-74.3%) | 1.49 (-72.1%) | 1.33 (-70.7%) |
| LoopSpec | 3.89 (—) | 5.22 (—) | 5.32 (—) | 4.55 (—) | |
| Ours | 4.48 (+15.1%) | 5.56 (+6.5%) | 5.70 (+7.3%) | 5.36 (+17.8%) | |
| Raven-TinyLlama | DFlash | 0.99 (-77.7%) | 1.31 (-74.5%) | 1.27 (-76.8%) | 1.18 (-76.1%) |
| LoopSpec | 4.46 (—) | 5.11 (—) | 5.46 (—) | 4.93 (—) | |
| Ours | 5.28 (+18.4%) | 6.05 (+18.4%) | 6.37 (+16.8%) | 5.77 (+17.1%) |
Table 8: Greedy decoding speedups (×) over AR on additional generation tasks, measured using pooled decode-only throughput with one pass per method. We evaluate 128 prompts each from CNN/DailyMail, AlpacaEval, and IFEval, and 38 first-turn MT-Bench prompts from writing, roleplay, extraction, and humanities. Shading, parentheses, and colors follow Table 1.

(a) Raven-Llama-3.2

(b) Raven-OLMo-2

(c) Raven-TinyLlama
Figure 10: Effect of draft depth and intermediate-feedback depth on greedy decoding. Cells show the geometric mean of per-task throughput ratios relative to each model's main configuration. Black boxes mark the configurations chosen for our main results in Section 4.2.
two for Raven-Llama.
B.6 Execution Depth of Discarded Drafts
We compare scheduling on and off using 155 questions per model, comprising 32 each from GSM8K, MATH500, HumanEval, and MBPP, and 27 from BBH. For each discarded LAD candidate, we record its maximum executed loop depth . The distribution pools candidate counts across tasks and normalizes by the total number discarded. Candidates removed by direct rejection or ancestor pruning are included.
Figure 12 shows that scheduling shifts discarded candidates toward earlier depths. On Ouro, the fraction reaching R4 before removal drops from 41.79% to 9.21%. On Raven, the fraction reaching R32 falls from 44.06% to 0.07%, and 98.8% of discarded candidates execute at most eight loops with scheduling enabled. The scheduler thus limits deep execution on unproductive branches, especially in the model with more loops.
B.7 Additional Generation Tasks
We further evaluate Ouro-2.6B and the three Raven models on CNN/DailyMail, AlpacaEval, IFEval, and a first-turn subset of MT-Bench, covering summarization and broader instruction-following tasks. We reuse the main experiments' trained drafters and scheduling settings without further tuning.
Table 8 shows that LoopAhead outperforms LoopSpec and our DFlash adaptation across all 16 model–benchmark pairs, achieving 2.62–6.37× speedups over AR. Throughput gains over LoopSpec range from 2.4% to 10.4% on Ouro-2.6B and from 5.0% to 18.4% on Raven. Raven-TinyLlama shows the most consistent gains, improving by 16.8–18.4% across the four tasks. In comparison, DFlash reaches 0.94–1.49× over AR. These results

(a) Ouro-1.4B
(b) Raven-Llama-3.2
Figure 11: Decode speedup over AR versus additional LAD draft length K, pooled across five benchmarks. Larger circles mark the main settings. Shading and error bars show 95% confidence intervals.

(a) Ouro-1.4B

(b) Raven-Llama-3.2
Figure 12: Distribution of discarded LAD candidates by their executed loop depth , with scheduling off or on. Annotations show the fraction reaching full depth. The Raven bin (8, 32) sums frequencies at depths strictly between 8 and 32.
show that LoopAhead’s benefits extend beyond the reasoning and code benchmarks in the main evaluation, using the same trained drafters and execution policies.
C Proof of Theoretical Analysis
C.1 Proof of Theorem 1
Setup. Consider a length-L draft chain following a correct prefix, and let be the full-depth target's greedy continuation from that prefix. Correctness means agreement with this continuation rather than a dataset reference answer. The chain can contain tokens from several recursive LAD calls. Probabilities are taken over requests and their length-L draft chains.
Let N be the number of consecutive matching tokens and set . The first mismatch is at J, with when all L tokens match. Define
and let , , and .
We compare the same candidate workload with suspension disabled and enabled, using the same admissions, budgets, priorities, and cache rules. A candidate advance runs one recurrent loop for one candidate. For the candidate with prefix , let and count evaluations of loop d in the two executions. The counts cover the candidate's lifetime, including any resumption. The number of avoided advances on the rejected suffix is
where . Each candidate is identified by its full token prefix, so the same advance is matched across the two executions.
Fix a feedback depth . Let be the native greedy prediction for position under prefix , and write
Thus, measures how often intermediate feedback predicts the target token where the draft first goes wrong. Let be a nonnegative lower bound on the expected avoided advances in these cases:
This mean accounts for feedback timing, near-root protection, execution budgets, and resumption.
Proof. Step 1: Locate the first mismatch. The first i tokens match when the preceding i - 1 tokens match and token i also matches. By the chain rule,
For the first mismatch to occur at i, the preceding tokens must match and token i must differ. Hence,
(17)
Each position contributes one to N when the prefix through that position matches. Therefore,
(18)
Step 2: Count avoided advances under correct feedback. Define the event
When , all preceding tokens match the target continuation. The intermediate and full-depth predictions therefore share the same prefix. On , the draft token differs from the target while feedback agrees with it:
This gives a feedback conflict on the draft path. By the definition of , the event has probability
(21)
The events are mutually exclusive because a chain has only one first mismatch. Let contain the remaining cases. Splitting the expectation over these events gives
(22)
Here we use Equation 15 for each conditional mean and drop the nonnegative contribution from . Each term has three parts: the probability of a first mismatch at i, the probability of correct feedback there, and a lower bound on the average advances avoided in those cases. This proves the first bound.
Step 3: Express the bound through the rejected suffix. Suppose and for all , where . Substitution gives
If the first mismatch is at i, the rejected suffix contains tokens. The sum on the right is therefore its expected length. Since the matching prefix and rejected suffix together contain L tokens,
(24)
Equivalently, using ,
(25)
Combining these results yields
which proves the second bound. Here gives the expected rejected-suffix length, while relates that length to the number of avoided advances.
Constant match probability. When at every position, and the expected matching-prefix length has the closed form
Substitution gives the second bound directly in terms of L and .
Multiple feedback depths. For a set of feedback depths , define
This event collects cases in which at least one selected depth predicts the target token at the first mismatch. Let lower-bound . Repeating Step 2 with gives
Each first-mismatch case is counted once, including when several depths predict correctly.
Recursive drafting and variable lengths. The chain may span several LAD calls: a candidate produced by one call can provide the early-loop states for a later call. The conditional probabilities account for the preceding draft tokens across these calls, so the same proof applies to the resulting recursive chain. An early mismatch can therefore affect drafts from several calls.
When the scheduler produces a bounded random chain length , apply the theorem conditional on . Write , and define the match probabilities, feedback probabilities, and conditional savings bounds within each length group. If the uniform bounds and hold in every group, averaging over lengths gives
(30)
Thus, the same bound uses the expected rejected-suffix length when recursive expansion produces chains of different lengths.
D Algorithm Pseudocode
Algorithm 1 uses the trained drafter D* and target , whose components are the prelude, recurrent core, and readout. The retained tree is A, with committed root and KV caches K. Each node b has state , depth , and token prefix . Its readout predicts the next token. The policy includes priorities, admission and cache rules, budgets , , and guard .
For logits , is a point mass at the argmax for greedy decoding, or the distribution after temperature scaling and top-p truncation for sampling. The ordered list stores native proposals and their distributions. Starting from the full-depth distribution , NativeVerify accepts each proposal with probability . After rejection, it updates , where
\begin{align*}(p\ominus q)(v)&=\frac{[p(v)-q(v)]_{+}}{\sum_{u\in\mathcal{V}_{\mathrm{tgt}}}[p(u)-q(u)]_{+}},\\[a]_{+}&=\max(a,0).\end{align*}(31)
If all proposals are rejected, it samples from the remaining p.
SelectWork follows Section 3.2, checking candidate paths against parent feedback at the configured depths. AdvanceBatch advances selected nodes by loops and updates their states, caches, and depths. ReclaimDrafts applies the additional pruning rule only to Raven-TinyLlama, as described in Appendix A.5. FillNativeChildren adds or reuses eligible native-proposal children within . Reroot preserves committed-prefix KV states and keeps the selected subtree, or clears the speculative tree if the selected child is absent. Spawn creates the missing child with depth zero. S checks the output limit and stopping tokens. SelectAnchor chooses an unexpanded native anchor whose parent newly reached . ActualWindow and DraftVocab provide the branch context and request-specific vocabulary. PrecallLength, DraftHorizon, and AdmitLength determine the allowed draft length, actual call length, and retained prefix length, respectively, following the model-specific admission rules in Appendix A.5. GraftChain attaches the retained prefix below the anchor.
E Case Study
Complete decoding trace. Figure 13 shows the full Ouro-1.4B trace for the example in the main system figure. Starting from the anchor dozen, LAD drafts eggs, eggs, and a. Intermediate feedback suspends the conflicting suffix, and full-depth verification commits the first eggs and the correction contain together. A later LAD call also allows the final eggs and period to be committed together. These earlier computations reduce the loop count from 15 with LoopSpec to 13 with LoopAhead.
Code generation. Table 9 illustrates both fully matching and partially matching LAD drafts. One call correctly predicts all three future tokens. Another matches i and in, while lst is corrected to t. LoopAhead reduces the loop count from 40 to 23 and improves throughput by 45.2%. Useful draft prefixes therefore help accelerate generation even when a later draft token is incorrect.
Less work per loop. Table 10 shows a different source of acceleration on Raven-Llama-3.2. LoopAhead uses a similar number of loops to LoopSpec (252 versus 248), but reduces candidate advances from 4,786 to 3,100. Decode time falls from 1,008.1 to 775.3 ms, giving a 30.0% throughput improvement. This case shows the benefit of controlling candidate execution per loop.
Recursive drafting. Table 11 shows how LAD extends its own drafts on a BBH Boolean-expression task. The R1 state of a drafted ) supports another LAD call before full-depth verification. With expressions as the native anchor, this call correctly drafts inside, brackets, and are. LoopAhead completes the request in 55 loops instead of 146, improving throughput by 113.5% over LoopSpec.
Algorithm 1: LoopAhead Inference
Input: Prompt , target , trained drafter , base draft vocabulary , depths , window , extension limit , stride , policy , stopping rule .
Output: Generated tokens .
1
2
3
4 if then
5 | return
6
7
8 while do
9
10
11 AdvanceBatch( ; )
12 foreach do
13 if then
14
15
16
17
18 else if then
19
20
21 if then
22
23
24
25 else if then
26
27 if then
28
29 FillNativeChildren( ; )
30 while do
31
32
33
34 if then
35 | return
36
37
38 if then
39
40
41
42 FillNativeChildren( ; )
43
44 if then
45
46 if then
47
48
49
50
51
52
53 return
Prompt: How many eggs are in two dozen eggs? Output: Two dozen eggs contain twenty-four eggs.
LoopSpec
8 tokens in 15 steps

Ours: LoopAhead
8 tokens in 13 steps
Figure 13: Complete LoopSpec and LoopAhead decoding traces for the example in Figure 2, using Ouro-1.4B under greedy decoding. Rows denote output positions and columns denote global loop steps. LoopAhead produces the eight tokens after prefill in 13 steps, compared with 15 for LoopSpec. Two of the nine LAD calls are shown in detail. Colors and symbols follow Figure 2.
| Case 1: Drafting ahead in code generation | Ouro-1.4B / MBPP |
|---|---|
| Question | Write a function to find tuples which have all elements divisible by k from the given list of tuples. |
| Output excerpt | def find_tuples(tuples, k): return [t for t in tuples if all(i % k == 0 for i in t)] |
| LAD drafts | Context + anchor LAD proposals Verificationdef find_tuples(tuples, k ) : ✓ ←✓ return✓ All three match... == 0 for i✓ in✓ lst× lst → t |
| Execution | Method Loops Decode time (ms)LoopSpec 40 269.7LoopAhead 23 185.8 |
| Observation | 42.5% fewer loops and 45.2% higher throughput. LAD supplies matching continuations ahead of verification, which corrects the mismatched token. |
Table 9: A greedy code-generation case from MBPP (sample 75). Both methods produce the same output. Blue marks the native anchor. ✓ and × mark draft-token matches and mismatches against the full-depth continuation. ← denotes a newline with indentation, and leading token spaces are omitted.
| Case 2: Less work per loop | Raven-Llama-3.2 / GSM8K | ||||
|---|---|---|---|---|---|
| Question | Jane has saved 60? | ||||
| Output excerpt | Jane has saved 32. [...] So she needs to save 32 = 28, she needs to save for 28 ÷ 4 = 7 more weeks. The answer is 7. | ||||
| Execution | Method | Loops | Candidate advances | Candidates per loop | Decode time (ms) |
| LoopSpec | 248 | 4,786 | 19.3 | 1,008.1 | |
| LoopAhead | 252 | 3,100 | 12.3 | 775.3 | |
| Observation | 35.2% fewer candidate advances and 30.0% higher throughput. LoopAhead executes fewer candidates per loop, reducing decoding time with a similar number of loops. | ||||
Table 10: A greedy math-generation case from GSM8K (sample 1134). Both methods produce the same output. Candidate advances count the total candidates advanced across all loops. Candidates per loop gives their average.
| Case 3: Recursive drafting | Ouro-1.4B / BBH | |||
|---|---|---|---|---|
| Question | Evaluate not (True and True) or False. | |||
| Output excerpt | Remember that (i) expressions inside brackets are always evaluated first [... ] Plugging in A and B, we get: Z = A or B = False or False = False. So the answer is False. | |||
| Recursive LAD | Call | Context ending | Native anchor | LAD proposals |
| 1 | Remember | that | ( | i | ) ✓ | |
| 2 | ... (i) | expressions | inside | brackets | are ✓ | |
| Call 2 uses the R1 state of ) drafted in Call 1, before it is fully verified. | ||||
| Execution | Method | Loops | Decode time (ms) | |
| LoopSpec | 146 | 1,070.4 | ||
| LoopAhead | 55 | 501.3 | ||
| Observation | 62.3% fewer loops and 113.5% higher throughput. Earlier drafts become new sources of lookahead before full-depth verification. | |||
Table 11: A recursive-drafting case from BBH Boolean Expressions (sample 148), using greedy decoding. Both methods produce the same output. Vertical bars separate draft tokens. ✓ indicates that all three match the full-depth continuation.