Language models have demonstrated remarkable capabilities in reasoning tasks through test-time scaling techniques like best-of-N sampling and tree search. However, these approaches often demand substantial computational resources, creating a critical trade-off between performance and efficiency. We introduce STAND (STochastic Adaptive N-gram Drafting), a novel model-free speculative decoding approach that exploits the inherent redundancy in reasoning trajectories to achieve significant acceleration without compromising accuracy. Our analysis shows that reasoning paths frequently reuse similar reasoning patterns, enabling efficient model-free token prediction without requiring separate draft models. By introducing stochastic drafting and preserving probabilistic information through a memory-efficient logit-based N-gram module, combined with optimized Gumbel-Top-K sampling and data-driven tree construction, STAND significantly improves token acceptance rates. Extensive evaluations across multiple models and reasoning tasks (AIME-2024, GPQA-Diamond, and LiveCodeBench) demonstrate that STAND reduces inference latency by 60-65% compared to standard autoregressive decoding while maintaining accuracy. Furthermore, STAND consistently outperforms state-of-the-art speculative decoding methods across diverse inference patterns, including single-trajectory decoding, batch decoding, and test-time tree search. As a model-free approach, STAND can be applied to any existing language model without additional training, making it a powerful plug-and-play solution for accelerating language model reasoning.
We measured n-gram overlap across multiple solutions generated by DeepSeek-R1-Distill-Qwen-7B on AIME-2024. Up to 97% of bigrams and 80% of 4-grams recur across 16 reasoning trajectories, and even with only two trajectories, over 90% of bigrams are repeated.
Any n-gram the model is about to generate has likely appeared in an earlier trajectory, so previously generated n-grams can serve as draft sequences without a separate draft model.
N-gram overlap across k reasoning trajectories (AIME-2024).
Reasoning models are usually run with sampling. With deterministic drafting, a drafted token is accepted with probability p(xdraft), which can be low when the target model is uncertain. Sampling the draft from a distribution aligned with the target raises the acceptance probability.
Existing model-free drafters do not store a probability distribution with their n-gram lookups. In our measurements, stochastic drafting gives 5%, 7%, and 8% higher acceptance probabilities than deterministic drafting on AIME, GPQA, and LiveCodeBench.
Acceptance probability with a depth-1, width-3 draft tree (DeepSeek-R1-Distill-Qwen-7B).
(Left) The N-gram module stores logits, which enables stochastic drafting. (Right) Data-driven draft tree optimization starts from a large draft tree, measures node-wise acceptance rates during speculative decoding on real data, and prunes it to retain the most successful paths.
Instead of storing pairs of n-grams and their next tokens, STAND stores the distribution from which the next token was sampled. To keep memory constant, only the top-k token indices and their probabilities are kept. When an n-gram seen k times appears again, the stored distribution is averaged with the new one using weights k/(k+1) and 1/(k+1), and the result is truncated to the top-10 tokens. Like previous n-gram drafters, STAND keeps separate lookup tables from unigrams to 4-grams.
For each position in the draft tree, STAND looks up matching n-grams from 4-grams down to unigrams and uses the first match, which returns the top-10 candidate tokens with their probabilities. It then samples as many tokens as the node needs children, without replacement, and verifies them with standard speculative sampling.
Sampling is done in parallel with the Gumbel-Top-K trick. Gumbel noise is added to each candidate's log probability, φi' = φi − log(−log Ui) with Ui ~ Uniform(0, 1), and the top-k perturbed values are taken. The noise terms are pre-computed and cached, and refreshed when depleted, so sampling overhead is separated from drafting.
Dynamic draft trees adapt to context but add overhead, while static trees are cheap but depend on how they are built. STAND builds its static tree from data. It starts from a large tree with 625 nodes, runs speculative decoding on 30 samples, tracks which nodes are frequently part of accepted paths, and keeps the top-80 nodes as a compact tree.
We evaluate on AIME-2024 (math), GPQA-Diamond (STEM QA), and LiveCodeBench (coding) with DeepSeek-R1-Distill-Qwen-7B and 14B, sampling at temperature 0.6 on a single A100 GPU. Baselines are Prompt Lookup Decoding (PLD), Adaptive N-gram Parallel Decoding (ANPD), Token Recycle (Recycle), SAM-Decoding (SAM), SAM+Recycle, and Eagle-2 as a model-based baseline. All methods share the same codebase adapted from Spec-Bench and a draft length of 80 tokens. We report throughput (T, tokens per second, with speedup over plain decoding) and acceptance length (A, average tokens accepted per speculation step).
When multiple reasoning trajectories are generated sequentially for each problem, STAND has the highest throughput and acceptance length, and both improve as the number of trajectories grows. Token Recycle stays flat as trajectories increase, likely because its lookup table overwrites old entries with information from new trajectories.
| Method | 4 traj. | 8 traj. | 16 traj. | |
|---|---|---|---|---|
| DeepSeek-R1-Distill-Qwen-7B | ||||
| Plain | T | 28.57 | 28.57 | 28.57 |
| Eagle-2 | T | 29.74 (×1.04) | 29.74 (×1.04) | 29.74 (×1.04) |
| A | 2.11 | 2.11 | 2.11 | |
| PLD | T | 46.14 (×1.61) | 47.69 (×1.67) | 48.70 (×1.70) |
| A | 1.77 | 1.84 | 1.90 | |
| ANPD | T | 49.74 (×1.74) | 51.08 (×1.79) | 52.04 (×1.82) |
| A | 1.91 | 1.95 | 2.01 | |
| SAM | T | 47.73 (×1.67) | 49.45 (×1.73) | 51.36 (×1.80) |
| A | 1.84 | 1.91 | 1.98 | |
| Recycle | T | 64.50 (×2.26) | 64.73 (×2.27) | 64.48 (×2.26) |
| A | 2.74 | 2.74 | 2.75 | |
| SAM+Recycle | T | 64.58 (×2.26) | 64.68 (×2.26) | 64.62 (×2.26) |
| A | 2.71 | 2.71 | 2.69 | |
| STAND (Ours) | T | 72.72 (×2.55) | 75.24 (×2.63) | 78.15 (×2.74) |
| A | 3.33 | 3.51 | 3.67 | |
| DeepSeek-R1-Distill-Qwen-14B | ||||
| Plain | T | 17.78 | 17.78 | 17.78 |
| Eagle-2 | T | 24.04 (×1.35) | 24.04 (×1.35) | 24.04 (×1.35) |
| A | 2.56 | 2.56 | 2.56 | |
| PLD | T | 24.78 (×1.39) | 25.59 (×1.44) | 26.58 (×1.49) |
| A | 1.77 | 1.85 | 1.93 | |
| ANPD | T | 26.24 (×1.48) | 27.09 (×1.52) | 27.81 (×1.56) |
| A | 1.90 | 1.96 | 2.03 | |
| SAM | T | 25.89 (×1.46) | 26.96 (×1.52) | 28.17 (×1.58) |
| A | 1.81 | 1.90 | 2.00 | |
| Recycle | T | 36.00 (×2.02) | 35.98 (×2.02) | 36.03 (×2.03) |
| A | 2.74 | 2.74 | 2.74 | |
| SAM+Recycle | T | 35.73 (×2.01) | 35.97 (×2.02) | 36.28 (×2.04) |
| A | 2.69 | 2.69 | 2.69 | |
| STAND (Ours) | T | 39.99 (×2.25) | 42.13 (×2.37) | 44.20 (×2.49) |
| A | 3.29 | 3.46 | 3.64 | |
Average throughput (T) and acceptance length (A) over AIME, GPQA, and LCB, with 4, 8, and 16 trajectories per problem. Per-task results are in the paper.
STAND is designed to use information across trajectories, but it also reaches the highest acceptance length and throughput in most settings when only one long reasoning chain is generated.
| Method | AIME | GPQA | LCB | Avg. | |
|---|---|---|---|---|---|
| DeepSeek-R1-Distill-Qwen-7B | |||||
| Plain | T | 26.63 | 31.34 | 27.75 | 28.57 |
| Eagle-2 | T | 29.91 (×1.12) | 31.69 (×1.01) | 27.61 (×0.99) | 29.74 (×1.04) |
| A | 2.21 | 1.99 | 2.13 | 2.11 | |
| PLD | T | 44.34 (×1.67) | 42.84 (×1.37) | 43.40 (×1.56) | 43.53 (×1.52) |
| A | 1.72 | 1.64 | 1.59 | 1.65 | |
| ANPD | T | 46.18 (×1.73) | 54.05 (×1.72) | 44.79 (×1.61) | 48.34 (×1.69) |
| A | 1.88 | 1.82 | 1.80 | 1.83 | |
| SAM | T | 40.85 (×1.53) | 48.45 (×1.55) | 42.92 (×1.55) | 44.07 (×1.54) |
| A | 1.69 | 1.69 | 1.80 | 1.73 | |
| Recycle | T | 60.61 (×2.28) | 71.00 (×2.27) | 60.12 (×2.17) | 63.91 (×2.24) |
| A | 2.73 | 2.71 | 2.73 | 2.72 | |
| SAM+Recycle | T | 61.15 (×2.30) | 71.51 (×2.28) | 62.78 (×2.26) | 65.15 (×2.28) |
| A | 2.70 | 2.81 | 2.69 | 2.73 | |
| STAND (Ours) | T | 61.79 (×2.32) | 75.39 (×2.41) | 66.41 (×2.39) | 67.86 (×2.38) |
| A | 3.07 | 3.05 | 3.01 | 3.04 | |
| DeepSeek-R1-Distill-Qwen-14B | |||||
| Plain | T | 17.76 | 18.16 | 17.43 | 17.78 |
| Eagle-2 | T | 25.38 (×1.43) | 24.86 (×1.37) | 21.89 (×1.26) | 24.04 (×1.35) |
| A | 2.72 | 2.44 | 2.51 | 2.56 | |
| PLD | T | 21.82 (×1.23) | 24.97 (×1.38) | 21.76 (×1.25) | 22.85 (×1.28) |
| A | 1.61 | 1.64 | 1.58 | 1.61 | |
| ANPD | T | 25.60 (×1.44) | 26.40 (×1.45) | 23.16 (×1.33) | 25.05 (×1.41) |
| A | 1.76 | 1.79 | 1.76 | 1.77 | |
| SAM | T | 23.26 (×1.31) | 25.38 (×1.40) | 22.36 (×1.28) | 23.67 (×1.33) |
| A | 1.63 | 1.65 | 1.63 | 1.64 | |
| Recycle | T | 33.71 (×1.90) | 38.91 (×2.14) | 33.85 (×1.94) | 35.49 (×2.00) |
| A | 2.77 | 2.73 | 2.71 | 2.74 | |
| SAM+Recycle | T | 34.35 (×1.93) | 37.53 (×2.07) | 34.45 (×1.98) | 35.44 (×1.99) |
| A | 2.67 | 2.72 | 2.70 | 2.70 | |
| STAND (Ours) | T | 34.52 (×1.94) | 38.71 (×2.13) | 34.86 (×2.00) | 36.03 (×2.03) |
| A | 2.91 | 3.00 | 2.93 | 2.95 | |
Throughput (T) and acceptance length (A) for generating a single sequence.
In batch decoding, the n-gram drafter can only use content produced up to the current step. STAND still gives clear speedups at batch size 8, while Token Recycle gives marginal gains at batch size 4 and slows decoding at batch size 8. Within Diverse Verifier Tree Search (DVTS), STAND reaches an average speedup of 2.54×.
| Method | AIME | GPQA | LCB | Avg. | |
|---|---|---|---|---|---|
| Batch Size 4 | |||||
| Plain | T | 89.04 | 88.32 | 92.64 | 90.00 |
| Recycle | T | 90.51 (×1.02) | 98.41 (×1.11) | 89.55 (×0.97) | 92.82 (×1.03) |
| A | 1.77 | 1.83 | 1.72 | 1.77 | |
| STAND (Ours) | T | 127.58 (×1.43) | 134.64 (×1.52) | 122.09 (×1.32) | 128.10 (×1.42) |
| A | 2.57 | 2.74 | 2.57 | 2.63 | |
| Batch Size 8 | |||||
| Plain | T | 111.62 | 106.23 | 114.73 | 110.86 |
| Recycle | T | 99.18 (×0.89) | 105.69 (×0.99) | 99.2 (×0.86) | 101.36 (×0.91) |
| A | 1.66 | 1.75 | 1.63 | 1.68 | |
| STAND (Ours) | T | 148.08 (×1.33) | 154.68 (×1.46) | 149.41 (×1.30) | 150.72 (×1.36) |
| A | 2.70 | 2.86 | 2.69 | 2.75 | |
Batch decoding (DeepSeek-R1-Distill-Qwen-7B).
| Method | AIME | GPQA | LCB | Avg. | |
|---|---|---|---|---|---|
| Plain | T | 33.35 | 33.12 | 32.22 | 32.90 |
| Recycle | T | 71.52 (×2.14) | 70.64 (×2.13) | 69.47 (×2.16) | 70.54 (×2.14) |
| A | 2.73 | 2.69 | 2.74 | 2.72 | |
| STAND (Ours) | T | 82.62 (×2.48) | 86.93 (×2.62) | 80.97 (×2.51) | 83.51 (×2.54) |
| A | 3.55 | 3.71 | 3.51 | 3.59 |
Diverse Verifier Tree Search (DeepSeek-R1-Distill-Qwen-7B).
Both speculative decoding methods use trees optimized on OpenThoughts-114k.
Stochastic drafting gives higher acceptance lengths than deterministic drafting on all tasks, and the Gumbel-Top-K implementation keeps a similar acceptance length while reducing latency, giving the highest throughput. A tree optimized on AIME-2024 outperforms the heuristic tree from Token Recycle on AIME-2024 and on out-of-domain GPQA-Diamond.
| Method | AIME | GPQA | LCB | Avg. | |
|---|---|---|---|---|---|
| Plain | T | 26.63 | 31.34 | 27.75 | 28.57 |
| Deterministic | T | 62.13 (×2.33) | 73.67 (×2.35) | 63.44 (×2.29) | 66.41 (×2.32) |
| A | 2.94 | 2.98 | 2.90 | 2.94 | |
| Stochastic | T | 63.44 (×2.38) | 81.20 (×2.59) | 65.90 (×2.37) | 70.18 (×2.46) |
| A | 3.24 | 3.56 | 3.29 | 3.36 | |
| + Gumbel-Top-K | T | 64.99 (×2.44) | 83.47 (×2.66) | 69.70 (×2.51) | 72.72 (×2.55) |
| A | 3.21 | 3.48 | 3.30 | 3.33 |
Effect of stochastic drafting (4 sequences, DeepSeek-R1-Distill-Qwen-7B).
| AIME | GPQA (OOD) | |||
|---|---|---|---|---|
| Heuristic | Optimized | Heuristic | Optimized | |
| Throughput | 59.96 | 64.99 | 77.32 | 83.47 |
| Acc. Lens | 3.17 | 3.21 | 3.35 | 3.48 |
Effect of tree optimization (4 sequences, DeepSeek-R1-Distill-Qwen-7B, with trees optimized on AIME-2024).
The tree optimized for STAND reaches 13 levels, compared to 7 levels for the tree optimized for Token Recycle under the same size budget. A higher acceptance rate favors deeper, narrower trees. The STAND tree also has a long tail of single nodes at depths 8 through 13, which suggests occasional long, deterministic sequences shared across reasoning trajectories.
Number of nodes per depth in trees optimized on AIME-2024.
@inproceedings{song2025stand,
author = {Song, Woomin and Dingliwal, Saket and Jayanthi, Sai Muralidhar and Ganesh, Bhavana and Shin, Jinwoo and Galstyan, Aram and Bodapati, Sravan Babu},
title = {Accelerated Test-Time Scaling with Model-Free Speculative Sampling},
booktitle = {Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing},
year = {2025},
}