Speculative Speculative Decoding
Organizations: Department of Computer Science, Stanford University · Department of Computer Science, Princeton University · Together AI
Abstract
Autoregressive decoding is bottlenecked by its sequential nature. Speculative decoding has become a standard way to accelerate inference by using a fast draft model to predict upcoming tokens from a slower target model, and then verifying them in parallel with a single target model forward pass. However, speculative decoding itself relies on a sequential dependence between speculation and verification. We introduce speculative speculative decoding (SSD) to parallelize these operations. While a verification is ongoing, the draft model predicts likely verification outcomes and prepares speculations pre-emptively for them. If the actual verification outcome is then in the predicted set, a speculation can be returned immediately, eliminating drafting overhead entirely. We identify three key challenges presented by speculative speculative decoding, and suggest principled methods to solve each. The result is Saguaro, an optimized SSD algorithm. Our implementation is on average 30% faster than optimized speculative decoding baselines and up to 5x faster than autoregressive decoding with open source inference engines.
Figures & tables
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | Dataset | AR tok/s | SD tok/s | SSD tok/s | SSD/SD | SSD/AR |
|---|---|---|---|---|---|---|
| Llama-3.1-Instruct | ||||||
| 70B/1B | HumanEval | 54.7 | 176 | 283 | 1.60 | 5.17 |
| Ultrafeedback | 54.7 | 138 | 215 | 1.55 | 3.93 | |
| Alpaca | 54.7 | 145 | 224 | 1.55 | 4.10 | |
| GSM8k | 54.7 | 188 | 301 | 1.60 | 5.50 | |
| Average | 54.7 | 161.8 | 255.8 | 1.58 | 4.68 |
| SGLang EAGLE-3 ( steps topk ) | |||||
|---|---|---|---|---|---|
| steps topk | 1 | 2 | 3 | 4 | 5 |
| 2 | 122.8 | 124.7 | 127.3 | ||
| 4 | 157.1 | 157.8 | 164.9 | ||
| 6 | 171.3 | 178.9 | 183.0 | ||
| 8 | 172.4 | 183.9 | 192.8 | 190.2 | |
| 10 | 168.7 | 183.0 | 192.5 | 186.9 | |
| Method | ||||||
|---|---|---|---|---|---|---|
| vLLM EAGLE-3 | 143.7 | 181.4 | 197.6 | 197.0 | 191.8 | 187.9 |
| vLLM Standalone | 136.0 | 117.9 | 100.9 | 89.1 | 78.5 | 70.5 |
Speculative Decoding
Speculative decoding accelerates generation by drafting multiple tokens and verifying them in parallel with a larger target model.
See all 291 papers