How can speculative decoding be made faster? There are effectively three levers, and each has become its own branch of research and new techniques.
Ultimately, every improvement comes down to one of three things: we draft faster, we verify faster or we draft better. The average latency per generated token is the time spent drafting plus the time spent verifying, divided by the number of drafted tokens accepted in each cycle, L = (T_draft + T_verify) ÷ τ. Each lever acts on one of these terms.
To draft faster is to make the draft model quicker to compute its predicted tokens, lowering T_draft. This could mean predicting several tokens in parallel, or using an even smaller draft model.
To verify faster is to make the target model's verification quicker, lowering T_verify. One approach is to avoid spending verification on tokens that are unlikely to survive. If we can cheaply tell that a drafted token will be rejected, we drop it before the target checks it. Every token that is kept is still verified, so the output is unchanged.
Finally, to draft better is to raise τ, the number of drafted tokens the target accepts in each cycle. The cost of running the draft model is amortised across the tokens it predicts, so the more of them the target accepts, the faster the total speed. The closer the draft model's distribution is to the target's, the more tokens survive each cycle.
Each of these three areas is a way to improve the speed of speculative decoding: draft faster, verify faster or draft better.