The Limits of Speculation: Bounding Speculative Decoding in Mixture-of-Experts
Abstract
Speculative decoding in Mixture-of-Experts (MoE) models faces the problem of unstable verification cost caused by input-dependent expert loading. To study the physics of this process, we formulate speculation-budget selection as an offline Stochastic Shortest Path (SSP) problem over reference sequences and build a diagnostic Oracle that uses counterfactual simulation to account for MoE verification cost. A detailed analysis of the Oracle's decisions on the Qwen3-Coder and EAGLE-3 pairing, in the space of marginal deltas (Delta Space), shows that rejected candidates form a strict linear boundary. This result demonstrates that a complex global optimization is locally governed by a necessary condition balancing marginal cost against expected progress (), providing a rigorous mathematical reference point for designing future adaptive online heuristics.
Figures & tables
Appendix figures & tables23 assets
Supplementary material from the paper’s appendix.
Appendix
| Parameter | Value |
|---|---|
| Target | Qwen/Qwen3-Coder-30B-A3B-Instruct; MoE with 128 experts and top- routing |
| Draft head | lmsys/SGLang-EAGLE3-Qwen3-Coder-30B-A3B-Instruct-SpecForge |
| GPU and stack | NVIDIA A100 80GB; vLLM fork with per-round trace; FULL CUDA graphs |
| Mode | , synchronous scheduling |
| Sampling | , top_p , seed |
| Other | bfloat16, max_model_len , gpu_mem_util , max_new_tokens |
| Rounds | Median , ms | Median | Median | ||
|---|---|---|---|---|---|
| 1 | 2 | 127410 | 8.98 | 12.1 | 605 |
| 2 | 3 | 106110 | 10.81 | 15.5 | 606 |
| 3 | 4 | 96819 | 12.63 | 18.2 | 605 |
| 4 | 5 | 90813 | 10.94 | 20.6 | 605 |
| 5 | 6 | 87401 | 11.51 | 22.6 | 600 |
| 6 | 7 | 85147 | 12.07 | 24.5 | 591 |
| Factor | What it measures | Mechanistic hypothesis |
|---|---|---|
| Number of unique experts per pass, averaged across layers | Expert-weight traffic from HBM | |
| Total context, tokens | KV-cache read and attention | |
| Number of positions in the verification pass | Microbatch and CUDA-graph size | |
| Maximum number of tokens per single expert | Load imbalance | |
| KV usage | KV-cache occupancy | Allocator pressure |
| Graph bucket | Size of the captured graph | Padding; at the bucket is equivalent to |
| Factor | OOS , alone | OOS RMSE, ms | RMSE beyond , ms | corr with |
|---|---|---|---|---|
| — | 1.00 | |||
| 0.86 | ||||
| Graph bucket | 0.86 | |||
| 0.75 | ||||
| KV usage | 0.03 | |||
| 0.03 |
| Category | Rounds | OOS : | OOS : | RMSE from , ms | Final |
|---|---|---|---|---|---|
| code_math | 326429 | 0.9993 | |||
| extraction | 5839 | 0.9991 | |||
| math_reasoning | 57788 | 0.9990 | |||
| coding | 47116 | 0.9991 | |||
| translation | 16594 | 0.9991 | |||
| rag | 63141 | 0.9982 |
| , ms/expert | , ms/token | , ms | OOS MAPE | |||
|---|---|---|---|---|---|---|
| 1 | 0.0839 (0.0003) | 1.098 (0.001) | 7.294 (0.003) | 127410 | 0.9896 | 0.44% |
| 2 | 0.0824 (0.0003) | 1.101 (0.002) | 8.854 (0.005) | 106110 | 0.9806 | 0.51% |
| 3 | 0.0779 (0.0004) | 1.106 (0.002) | 10.532 (0.008) | 96819 | 0.9669 | 0.59% |
| 4 | 0.2675 (0.0002) | 1.099 (0.001) | 4.739 (0.003) | 90813 | 0.9977 | 0.33% |
| 5 | 0.2664 (0.0003) | 1.103 (0.001) | 4.780 (0.006) | 87401 | 0.9982 | 0.32% |
| 6 | 0.2654 (0.0001) | 1.106 (0.001) | 4.881 (0.003) | 85147 | 0.9985 | 0.30% |
| Category | at | , | ||
|---|---|---|---|---|
| coding | 0.2625 (0.0005) | 1.110 (0.001) | 47116 | 0.9991 |
| code_math | 0.2640 (0.0001) | 1.096 (0.001) | 326429 | 0.9993 |
| qa | 0.2643 (0.0004) | 1.165 (0.010) | 75787 | 0.9987 |
| stem | 0.2644 (0.0003) | 1.094 (0.002) | 42275 | 0.9986 |
| math_reasoning | 0.2644 (0.0005) | 1.109 (0.003) | 57788 | 0.9989 |
| translation | 0.2647 (0.0005) | 1.190 (0.041) | 16594 | 0.9991 |
| Model | CV RMSE, ms | CV MAPE | |
|---|---|---|---|
| 0.856 | 0.685 | 4.42% | |
| 0.861 | 0.675 | 4.33% | |
| 0.999 | 0.056 | 0.37% |
| Check | at , ms/expert | , ms/token | , ms |
|---|---|---|---|
| OLS, clustered SE | 0.2643 [0.2642, 0.2645] | 1.1022 | 4.938 |
| Bootstrap by generation, 999 | 0.2643 [0.2642, 0.2645] | 1.1022 | 4.938 |
| Huber regression | 0.2644 | 1.1013 | 4.937 |
| 1% outlier trimming | 0.2644 | 1.1008 | 4.936 |
| First half of run | 0.2642 | 1.1003 | 4.942 |
| Second half of run | 0.2650 | 1.1046 | 4.919 |
Speculative Decoding
Speculative decoding accelerates generation by drafting multiple tokens and verifying them in parallel with a larger target model.
See all 311 papers