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]
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
- 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
- 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
- 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
- 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