Speculative Decoding Scaling Laws (SDSL): Throughput Optimization Made Simple
Organizations: Independent Researcher · University of Hawai’i at Manoa, Honolulu, HI, USA.
Abstract
Speculative decoding is a technique that uses multiple language models to accelerate infer- ence. Previous works have used an experi- mental approach to optimize the throughput of the inference pipeline, which involves LLM training and can be costly. This study of spec- ulative decoding proposes a theory that ana- lytically connects the key hyperparameters of pre-trained LLMs to the throughput efficiency of a downstream SD-based inference system. The theory allows the prediction of throughput- optimal hyperparameters for the components of an inference system before their pre-training.
Figures & tables
| Draft Model | OPT-125M | OPT-350M | OPT-1.3B | OPT-2.7B | |
| Target Model | Perplexity | 29.79318619 | 25.32799339 | 19.36876869 | 17.36415863 |
| OPT-13B | 15.58453751 | ||||
| OPT-30B | 15.30226898 | ||||
| OPT-66B | 14.58085632 | ||||
| Qwen1.5-14B | 11.7312355 | ||||
| Qwen1.5-32B | 10.41608143 |
| Draft Model | Qwen2.5-0.5B | Qwen2.5-1.5B | Qwen2.5-3B | Qwen1.5-0.5B | Qwen1.5-1.8B | Qwen1.5-4B | |
| Target Model | Perplexity | 17.91464424 | 13.69491291 | 12.5883894 | 18.37218094 | 14.10007191 | 13.90737915 |
| OPT-13B | 15.58453751 | ||||||
| OPT-30B | 15.30226898 | ||||||
| OPT-66B | 14.58085632 | ||||||
| Qwen1.5-14B | 11.7312355 | ||||||
| Qwen1.5-32B | 10.41608143 |
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Parameter | Estimate | Std. Error | Margin of Error | CI Lower (95%) | CI Upper (95%) |
| A | |||||
| B | |||||
| C | |||||
| Model Performance | |||||
| Mean Squared Error (MSE) | |||||
| Target Model | Function | Param 1 | MoE 1 | CI 1 | Param 2 | MoE 2 | CI 2 | MSE | |
|---|---|---|---|---|---|---|---|---|---|
| Linear | -0.008262 | 0.001653 | [-0.009915, -0.006609] | 0.832953 | 0.031375 | [0.801578, 0.864329] | 0.000113 | 0.943203 | |
| Qwen1.5-14B | Logarithmic | -0.165206 | 0.026300 | [-0.191506, -0.138905] | 1.155850 | 0.075721 | [1.080129, 1.231571] | 0.000073 | 0.963273 |
| Power-law | 1.382782 | 0.158956 | [1.223826, 1.541738] | -0.247168 | 0.040405 | [-0.287573, -0.206763] | 0.000073 | 0.963076 | |
| Linear | -0.007686 | 0.001206 | [-0.008892, -0.006480] | 0.804857 | 0.022886 | [0.781971, 0.827743] | 0.000060 | 0.964297 | |
| Qwen1.5-32B | Logarithmic | -0.153441 | 0.017053 | [-0.170494, -0.136388] | 1.104542 | 0.049097 | [1.055444, 1.153639] | 0.000031 | 0.981757 |
| Power-law | 1.302398 | 0.100870 | [1.201528, 1.403268] | -0.235315 | 0.027208 | [-0.262523, -0.208108] | 0.000032 | 0.981142 |
| Target Model | M (target size) | (training target size) | Draft Family | (training draft size) | (Optimal N) | |
|---|---|---|---|---|---|---|
| OPT | 180B | 124039820.3 | 8.947e-11 | |||
| Qwen1.5-14B | 14167290880 | 3T | Qwen1.5 | 2.4T | 115390938.2 | 9.165e-11 |
| Qwen2.5 | 18T | 112685392.4 | 9.235e-11 | |||
| OPT | 180B | 198605884.7 | 4.061e-11 | |||
| Qwen1.5-32B | 32512218112 | 3T | Qwen1.5 | 2.4T | 184494249.2 | 4.154e-11 |
| Qwen2.5 | 18T | 180081907.1 | 4.183e-11 |
| Draft Model | Draft Family | (Optimal N) | TTFT (s) | TTOT (s) | TPOT (s) | |
|---|---|---|---|---|---|---|
| OPT-125M | OPT | 117M | 0.000617 | |||
| OPT-350M | OPT | 117M | 0.01664 | |||
| OPT-1.3B | OPT | 117M | 0.09324 | |||
| OPT-2.7B | OPT | 117M | 0.1972 | |||
| Qwen1.5-0.5B | Qwen1.5 | 109M | 0.0276 | |||
| Qwen1.5-1.8B | Qwen1.5 | 109M | 0.1344 |
| Parameter | Range | Number of Grid Points | Description |
|---|---|---|---|
| to | 10000 | Initial draft model size | |
| to | 8 | Target model size | |
| to | 6 | Number of tokens used in draft model training | |
| to | 6 | Number of training tokens used in target model training |
| Parameter | Estimate | MoE (95%) | 95% CI (lower) | 95% CI (upper) |
|---|---|---|---|---|
| Adj. | ||||
| Parameter | Estimate | MoE (95%) | 95% CI (lower) | 95% CI (upper) |
|---|---|---|---|---|
| Observations | ||||
| Number of Grid Points | ||||
| Regression type | OLS with HC3 robust standard errors | |||
Speculative Decoding
Speculative decoding accelerates generation by drafting multiple tokens and verifying them in parallel with a larger target model.
See all 309 papers