Speculative decoding accelerates LLM inference by using a fast draft model to generate tokens and a more accurate target model to verify them. Its performance depends on the acceptance length, or number of draft tokens accepted by the target. Our studies show that the acceptance length of even state-of-the-art speculators, like DFlash, EAGLE-3, and PARD, degrades with generation length, reaching values close to 1 (i.e., no speedup) within a few thousand output tokens, making speculators ineffective for long-response tasks. Acceptance lengths decline because most speculators are trained offline on short sequences, but are forced to match the target on much longer outputs at inference, well beyond their training distribution.
To address this issue, we propose Test-Time Speculation (TTS), an online distillation approach that continuously adapts the speculator at test time. TTS leverages the key insight that the token verification step already invokes the target model for each draft token, providing the training signal needed to adapt the draft at no additional cost. Treating the draft as the student and the target as the teacher, TTS adjusts the draft over several speculation rounds, with each update improving the draft's accuracy as generation proceeds.
The speedup from speculative decoding depends on the number of draft tokens the target model accepts per round, called the acceptance length. An acceptance length of one means that only a single token is accepted per round, yielding no speedup.
Our studies show that the acceptance length of state-of-the-art speculators (EAGLE-3, DFlash, and PARD) degrades steadily with generation length. For example, on LiveCodeBench with Qwen3-8B, the acceptance length of EAGLE-3 drops to 1.1 after 20K output tokens, effectively eliminating the speedup.
The figure below shows the acceptance length as a function of output length for various speculator and target model pairs. A value close to 1 indicates no speedup with speculative decoding.
0.19.2rc1.dev208 (commit 1e9f19ca3) with a small scheduler patch that logs the drafted and accepted tokens of every speculation round. PyTorch 2.11, NVIDIA H200 GPUs.The trend holds across the speculators and target models above, from 4B to 122B parameters.
Speculators are typically trained on instruction-following datasets such as ShareGPT and UltraChat, which comprise sequences that are typically shorter than 2K tokens. In contrast, reasoning models produce tens of thousands of tokens before arriving at the final answer. Consequently, the speculator is forced to match the target at generation lengths well beyond its training distribution during inference.
Tokens on a log scale. Each dot is one response from Qwen3-8B with thinking enabled.
Generation was capped at 36,864 tokens, so the longest outputs pile up at that limit.
We measure the resulting divergence directly. As the output grows, the entropy of the target decreases, i.e., the target becomes more confident about the next token. At the same time, the cross-entropy of the draft on the target's top-1 token increases, i.e., the draft becomes less able to predict it. This holds both for tokens that already appear in the context and for unseen tokens.

This motivates adapting the speculator at test time.
We propose Test-Time Speculation (TTS), an online distillation approach that adapts the speculator to match the target's distribution at inference time. Our core insight is that the standard speculative decoding workflow already has all the ingredients for on-policy online distillation. In each speculation round, the token verification step invokes the target model on each token in the draft canvas. Therefore, we naturally have access to both the speculator's and the target's probabilities for each token. This provides the supervision needed to adapt the speculator at no additional cost.
TTS leverages this signal by treating the target as the teacher, the speculator as the student, and each generated-and-verified canvas as a distillation sample. After each verification, the speculator takes one gradient step before generating the next canvas. In practice, the update need not be applied after every round and can instead be applied once every \(\mathcal{S}\) rounds, where \(\mathcal{S}\) is the update stride.
The current draft \(q_t\) proposes a canvas of \(C\) tokens, as in ordinary speculative decoding.
The target \(p\) scores the whole canvas in one forward pass and accepts a prefix by rejection sampling. The output distribution is exactly the target's.
The draft takes one gradient step toward the target's distributions on that canvas, with a regularizer that keeps it close to its previous state.
Each update takes one optimization step on the loss below, which contains two terms. The first term is a distillation loss that pulls the speculator toward the target's distribution on the canvas. The second term is a regularizer that prevents the speculator from drifting too far from its current state.
where \(p\) is the target, \(q_t\) is the current speculator, \(q\) is the updated speculator, \(C\) is the canvas length, and \(\lambda\) sets the strength of the regularizer. The weights \(w_k\) decrease with position \(k\), as a rejected token invalidates all subsequent canvas tokens.
Adapting the speculator requires an additional backward pass and optimizer step. Thus, a higher acceptance length does not by itself guarantee higher end-to-end throughput. We address this with two optimizations, both implemented in SGLang v0.5.12, a production inference engine.
TTS updates the draft once every \(\mathcal{S}\) rounds and offloads the update to a dedicated CUDA stream that runs in parallel with the next \(\mathcal{S}-1\) speculate-verify rounds, keeping it off the critical path.
In batched serving, an update driven by one request would corrupt the draft for every other request. TTS freezes the shared speculator and trains a rank-16 LoRA adapter per request, which reduces the overhead of adapting a private speculator from about 2,445 MB to 28.6 MB per request on each GPU for Qwen3.5-122B-A10B. This enables a memory saving of about 86×.

We evaluate TTS with the DFlash, EAGLE-3, and PARD speculators on target models from the Qwen-3, Qwen-3.5, DeepSeek-R1, GPT-OSS, MiniMax, and Llama3.1 families.

Each update improves the draft's accuracy on the current response, so the improvement over the baseline increases as generation proceeds.

We evaluate on multi-turn agentic tasks from OpenThoughts, orchestrated by the Terminus-2 agent protocol with MiniMax-M2.5 as the target. The acceptance length of DFlash falls from 3.1 to 1.8 over the session, whereas TTS sustains it between 3.3 and 3.4, improving over DFlash by 86% at turn 15.

The table below reports throughput (tokens/sec) on Qwen3.5-122B-A10B relative to the DFlash speculator, with per-request LoRA adapters and \(\mathcal{S}=10\). As the baseline acceptance lengths are lower on this large target, TTS has more headroom and improves throughput by up to 2.4×. For a single request, \(\mathcal{S}=5\) improves throughput over DFlash by 1.54× on average and up to 1.71×.
| Benchmark | Approach | Batch Size | |||
|---|---|---|---|---|---|
| 8 | 16 | 32 | 64 | ||
| AIME 2024 | DFlash | 241.2 | 313.5 | 423.1 | 384.9 |
| TTS | 428.61.78× | 551.71.76× | 930.92.20× | 585.11.52× | |
| GPQA Diamond | DFlash | 192.0 | 257.1 | 428.2 | 289.7 |
| TTS | 381.81.99× | 543.92.12× | 728.71.70× | 521.61.80× | |
| TheoremQA | DFlash | 233.8 | 289.1 | 439.9 | 313.0 |
| TTS | 511.92.19× | 661.32.29× | 987.92.25× | 663.52.12× | |
| OlympiadBench-Math | DFlash | 193.9 | 267.7 | 392.9 | 196.8 |
| TTS | 444.82.29× | 575.82.15× | 908.42.31× | 466.92.37× | |
With TTS, the cross-entropy of the speculator on the target's top-1 token no longer increases with output length, as TTS keeps adapting the speculator to the target throughout generation.

@inproceedings{kumar2026test,
title = {Test-Time Speculation},
author = {Kumar, Avinash and Sanghavi, Sujay and Das, Poulami},
booktitle = {Advances in Neural Information Processing Systems},
year = {2026}
}