Read the paper
CurveK: Throughput-Curve Estimation for Batched Speculative Decoding
on GitHub
A rule for choosing how many tokens to draft in batched speculative decoding. It estimates the whole throughput curve from the verifier's feedback and picks the peak. In vLLM tests it beats four adaptive baselines on most settings.
| Model | Workload | Vanilla | Standard SD | OTF | TurboSpec | BanditSpec | Nightjar | CurveK |
| LLaMA 3.1-8B | GSM8K | 1959.8±36.8 | 2471.9±44.6 | 2562.3±47.4 | 2573.1±13.0 | 2431.2±51.4 | 1970.9±34.9 | 2821.5±122.6 |
| HumanEval | 1688.5±126.9 | 2416.2±70.5 | 2425.6±90.4 | 2385.5±55.7 | 2251.4±200.5 | 1814.7±60.7 | 2656.0±135.5 | |
| SpecMix | 1732.3±31.4 | 2060.1±9.7 | 2194.1±13.9 | 2124.5±54.0 | 2066.5±29.7 | 1989.4±60.2 | 2275.1±11.8 | |
| Qwen3-8B | GSM8K | 2048.2±34.5 | 2061.0±45.1 | 2745.2±18.1 | 2743.7±9.2 | 2882.9±18.8 | 3071.0±49.7 | 3107.5±17.1 |
| HumanEval | 1892.1±39.3 | 1752.4±48.3 | 2493.6±35.2 | 2416.4±42.8 | 2475.7±42.0 | 2513.6±52.2 | 2672.0±12.5 | |
| SpecMix | 1911.3±34.3 | 1723.9±38.9 | 2429.1±65.9 | 2424.1±5.0 | 2501.1±20.2 | 2418.4±133.7 | 2600.8±8.7 | |
| GPU | Workload | Vanilla | Standard SD | OTF | TurboSpec | BanditSpec | Nightjar | CurveK |
| A100 | GSM8K | 817.1±21.0 | 1204.1±15.5 | 1222.6±5.0 | 1223.2±8.4 | 1262.3±10.0 | 1229.8±112.4 | 1377.2±7.2 |
| HumanEval | 712.2±43.8 | 1199.5±17.2 | 1206.9±30.6 | 1205.2±34.8 | 1262.7±14.6 | 1071.8±69.3 | 1315.6±31.5 | |
| SpecMix | 732.2±14.2 | 958.4±2.0 | 1006.2±8.4 | 980.2±10.9 | 1026.9±26.1 | 1002.0±56.7 | 1088.7±10.4 | |
| H20 | GSM8K | 957.5±4.6 | 1076.0±3.1 | 1372.4±18.5 | 1128.7±26.7 | 1319.2±20.3 | 1292.4±7.4 | 1526.5±18.3 |
| HumanEval | 897.6±45.5 | 1124.5±16.4 | 1379.3±35.3 | 1275.4±38.4 | 1356.6±52.9 | 1169.1±45.3 | 1472.5±65.9 | |
| SpecMix | 912.6±16.8 | 868.4±3.4 | 1117.9±15.4 | 1087.2±51.2 | 1111.4±48.6 | 1068.2±9.3 | 1180.8±64.0 |
Going deeper
Proposition 1 (Unimodality of R(k)). Under this cost model, R(k) increases to a single peak region and then decreases. The rightmost maximizer is k*=max({0}∪{k∈[K]:pk≥crR(k-1)}). Equivalently, the adjacent change is smashR(k)-R(k-1)=(pk-crR(k-1))/(1+kcr), so the curve rises exactly while the marginal acceptance probability smashpk exceeds the cost threshold smashcrR(k-1). The proof is in Sec. B.1.
A kitchen has a fast junior cook who guesses the next few dishes and a head chef who checks them all at once. The chef keeps guesses until the first wrong one. Guess too few and the chef sits idle; guess too many and the junior's work is wasted.
Many tables order at once, and all share one guess count. Some tables are predictable, some are not. Knowing only how often the first guess is right, or the average run of right guesses, can point to the wrong count.
This method keeps a running tally for each table of how far the guesses got. For every possible count it asks how many dishes each table would get, adds up the gain against the cost, and picks the best. Over many dinners it serves more dishes than other rules.
The abstract, word for word, with the six densest phrases unpacked.
Speculative decoding accelerates large language model inference by drafting multiple tokens and verifying them simultaneously, but its efficiency critically depends on selecting an appropriate draft length k1. This choice is particularly challenging in batched serving environments, where diverse requests share a common draft length2 but exhibit different acceptance patterns. Existing methods dynamically adjust k using arm-level rewards, draft-side statistics, or acceptance estimates. However, we theoretically show that these signals remain coarse3: they do not directly represent how acceptance changes across draft positions in the current batch. This position-specific view defines a throughput curve over candidate draft lengths, whose maximum gives the draft length selected by our objective. Motivated by this insight, we formulate dynamic draft-length selection as estimating the batch throughput curve and choosing its peak. We propose CurveK, a lightweight and easy-to-implement method that estimates this curve from accepted-token depths already returned by the verifier4. Importantly, CurveK requires neither additional training nor changes to the verification process5. Experiments with 8B and 70B models in vLLM6 show throughput improvements over baselines across diverse workloads, including mixed-workload settings. Ablation studies validate the design of CurveK, and further analysis shows that its curve estimates consistently select high-throughput draft lengths.
Two lines of work lead here: speculative decoding itself, and rules for choosing its draft length.
Read four parts of it, in this order.
Skip Section 2 and Appendix C if you know adaptive speculative decoding.
If the gains are smaller than they look, start here.
Measured step cost by draft length versus the profiled cost model. LLaMA-3.1-8B + EAGLE-3 on one A100 GPU under greedy decoding, timed with CUDA events in the same vLLM V1 path across k∈{0,…,7} on short-context GSM8K, long-context CNN/DailyMail, and a 96-prompt LMSYS dialogue subset. Step costs are sums of median drafting and verification times on full-batch decode steps, normalized by verification time at k=0; implied cr=(cost(7)-1)/7. Each cost model is applied to the same full-depth acceptance curve and compared against the length maximizing measured end-to-end throughput. Setting | Step cost at k=2/4/7 | Implied cr | Best k: profiled cost | Best k: measured cost | Best k: measured throughput Profiled model | 1.16 / 1.32 / 1.56 | 0.08 | – | – | – B=8, short (GSM8K) | 1.34 / 1.44 / 1.89 | 0.13 | 4 | 4 | 4 B=8, long (CNN/DM) | 1.44 / 1.53 / 1.97 | 0.14 | 3 | 4 | 4 B=8, LMSYS dialogue | 1.35 / 1.45 / 1.87 | 0.12 | 3 | 4 | 3 B=32, short (GSM8K) | 1.52 / 1.98 / 2.30 | 0.19 | 4 | 3 | 3 B=32, long (CNN/DM) | 1.63 / 2.02 / 2.30 | 0.19 | 3 | 3 | 3 B=80, short (GSM8K) | 1.72 / 2.70 / 3.62 | 0.37 | 4 | 2 | 2 B=80, long (CNN/DM) | 2.09 / 2.86 / 3.59 | 0.37 | 3 | 0 | 2
| Batch size | Vanilla | Standard SD | OTF | TurboSpec | BanditSpec | Nightjar | CurveK |
| 16 | 1100.57±40.23 | 1452.98±31.52 | 1481.36±25.21 | 1508.05±20.21 | 1323.87±62.13 | 1337.46±11.64 | 1501.66±6.76 |
| 32 | 1820.57±26.12 | 2098.34±52.16 | 2231.58±35.94 | 2185.65±17.23 | 1994.00±31.42 | 2170.43±62.13 | 2336.40±16.25 |
| 64 | 2569.37±19.52 | 2713.00±17.62 | 2876.12±36.28 | 2790.58±26.18 | 2709.13±19.63 | 2006.01±14.67 | 3027.86±35.01 |
| 128 | 3246.23±25.61 | 2911.19±11.42 | 3156.26±19.62 | 3202.44±20.44 | 3025.38±27.71 | 3151.06±26.71 | 3360.04±12.19 |
| GPU | BanditSpec | TurboSpec | OTF | Nightjar | CurveK |
| A100 | 1184.61±14.79 | 1272.96±11.72 | 1211.99±17.93 | 1211.39±103.97 | 1240.54±6.50 |
| H20 | 1459.80±48.10 | 1351.24±17.60 | 1478.30±31.70 | 1407.35±15.35 | 1642.00±41.20 |
Nothing on this page was recomputed. Every claim points to the paper so you can check it.
Generative AI tools were used to assist with literature search, drafting and revising portions of the manuscript, and formatting. The authors take responsibility for the final content of the paper.
More latest news
Read all