Example

Example of Draft Token Generation in Speculative Decoding

To illustrate the draft generation phase, which is the initial step in speculative decoding, consider a scenario where the draft model predicts a sequence of τ=5\tau=5 candidate tokens. Starting with a given prefix [x,yi][\mathbf{x}, \mathbf{y}_{\le i}], the draft model utilizes its probability distribution Prq()\text{Pr}_q(\cdot) to autoregressively generate a sequence of five tokens: y^i+1,y^i+2,y^i+3,y^i+4,y^i+5\hat{y}_{i+1}, \hat{y}_{i+2}, \hat{y}_{i+3}, \hat{y}_{i+4}, \hat{y}_{i+5}. Each token in this draft sequence is predicted based on the initial prefix and all previously generated draft tokens within the current step.

0

1

Updated 2026-06-19

Contributors are:

Who are from:

Tags

Ch.5 Inference - Foundations of Large Language Models

Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences