What is speculative decoding?

Definition

Speculative decoding reduces the sequential work involved in generating text. A cheaper drafting mechanism proposes several tokens, and the target model verifies them in a larger computation. Accepted tokens advance the answer; a rejection limits how far the draft can be reused. Correct sampling rules can preserve the target model's output distribution.

The speed benefit depends on how often proposed tokens are accepted and how much drafting and verification cost. It works best when the draft agrees with the target and verification uses hardware efficiently. It is an inference technique, so using it does not by itself train the target model or guarantee better answers.

ELI5

Speculative decoding speeds up AI text generation by using a cheaper method to draft several likely tokens and letting the main model verify them together. Matching tokens are accepted, while incorrect proposals are discarded or replaced.

For example, a small draft model may suggest the next short phrase and a larger model checks it in parallel. The method helps most when drafts are accurate and verification costs less than generating every token one by one.

Does speculative decoding change the target model?

The method changes how generation is carried out. It does not require changing the target model's trained parameters, although the drafting mechanism may be trained separately.

When does speculative decoding save time?

It can save time when drafting is inexpensive, proposed tokens are often accepted and the target model can verify several tokens efficiently. Hardware, workload and implementation affect the result.

  1. Dylan Bristot and Sujee Maniyam beside the headline Faster Open Models
  2. Matthew Berman in white, Andrej Karpathy in blue and Sam Altman in pink above the blue and white headline GPT-5.6 SOL - EFFICIENCY LOOPS on black.
  3. Nick Saraev against a black background beside the blue-and-white headline “SMARTER OR CHEAPER?”.
  4. Pierce Freeman and Richard Diehl Martinez in blue and white tops against black, alongside the blue and white headline "FASTER TOKENS, SAME TARGET".
  5. Philip Kiely gestures beside the blue-and-white INFERENCE TRADE-OFFS headline on a black background.
  6. Editorial portrait of Károly Zsolnai-Fehér beside the blue-and-white headline DEEPSEEK SPEED HACK against black.
  7. Daniel Walsh in a blue top beside the blue DSpark and white Local Test headline against a black background.
  8. Blue and white token shapes flow toward a processor next to the headline FASTER AI on black.
  9. Sheilah Kirui beside the blue and white headline “SPECULATIVE DECODING - WORTH IT?” on a black background.
  10. Bijan Bowen beside the words HY4 Preview Tested
Definition card for speculative decoding: What is speculative decoding?

Speculative decoding accelerates text generation by proposing several tokens cheaply and checking them together with the target model.