Skip to content
IJK

Self-Speculative Decoding: Early Layers Draft, Deeper Ones Verify

By IJK ·

What a Hugging Face post says traditional speculative decoding uses, how self-speculative decoding differs and what must hold for a speedup.

Traditional speculative decoding

Traditional speculative decoding uses two models: a smaller one (draft model) to generate a sequence of draft tokens, and a larger one (verification model) to verify the draft’s accuracy. [1]

The smaller model performs a significant portion of the generation, while the larger model refines the results. [2]

Self-speculative decoding

In self-speculative decoding, the authors build on this concept but use the early layers of a large model to generate draft tokens that are then verified by the model's deeper layers. [3]

replaced byrequiresTraditional speculative decodinga smaller draft model and a larger verification m...Self-speculative decodingearly layers of a large model draft tokens, deepe...Condition for a speedupearlier layers' output close enough to the last l...
How does self-speculative decoding differ?

What must hold for a speedup

In order to obtain an end-to-end speedup, the output of the earlier layers need to be close enough to the last layer. [4]

Sources

  1. The Hugging Face source says: Traditional speculative decoding uses two models: a smaller one (draft model) to generate a sequence of draft tokens, and a larger one (verification model) to verify the draft’s accuracy. Faster Text Generation with Self-Speculative Decoding
  2. The Hugging Face source says: The smaller model performs a significant portion of the generation, while the larger model refines the results. Faster Text Generation with Self-Speculative Decoding
  3. The Hugging Face source says: In self-speculative decoding, the authors build on this concept but use the early layers of a large model to generate draft tokens that are then verified by the model's deeper layers. Faster Text Generation with Self-Speculative Decoding
  4. The Hugging Face source says: In order to obtain an end-to-end speedup, the output of the earlier layers need to be close enough to the last layer. Faster Text Generation with Self-Speculative Decoding

Editorial (AI-assisted; automatically checked, not human-reviewed). Each statement is linked to its source; check the source before relying on a detail.

  • speculative decoding
  • inference
  • layerskip
  • hugging face