SpecRouter: Reusable Payoff Prediction for Cost-Aware Speculative Decoding
Speculative decoding obtains draft tokens in diverse ways - copying from the context, n-gram lookup, a small draft model, or a learned tree drafter - and which drafter is fastest depends on both the generated text and the hardware and batch size. We introduce ReFit to separate these two factors. A 0.58M-parameter predictor reads the target model's hidden state and estimates each drafter's committed tokens; a separately calibrated cost model prices each drafter on the current hardware; only the drafter with the lowest predicted cost per committed token runs. Training needs no exploration: with deterministic drafters and greedy verification, the output is the same whichever drafter runs, so every drafter's committed length at every prefix can be computed exactly offline; under speculative sampling, its expectation follows in closed form from one target pass. We evaluate on 16 workloads with 100 held-out requests each. Averaged over workloads, ReFit speeds up decoding by $2.75\times$ on Llama-3.1-8B and $2.95\times$ on Qwen3-8B, beating EAGLE-3, the strongest fixed drafter, by 30% and 27%; with every drafter tuned on validation data, its margin over tuned EAGLE-3 is 27.5% and 24.2%.…
- arXiv
- 2612.00644
- Authors
- Shrenik Bhansali, Kumar Gaurav, Amol Ambardekar, Saptarshi Mitra, Karthik Vijayan and 1 more
- Categories
- cs.AI