Speculative Inference

Speculative Inference (draft-and-verify) accelerates large language model generation by utilizing a smaller Draft Model to propose multiple candidate tokens, which are validated in parallel by a larger Target Model. This method reduces inference latency and computational cost by amortizing the verification step across tokens, yielding efficiency gains proportional to the token acceptance rate.

Mechanism

  • Speculation: Draft model generates tokens sequentially with minimal compute overhead.
  • Verification: Target model processes the entire sequence in a single forward pass to verify token probabilities.
  • Decision: Accepted tokens are appended; rejected tokens trigger backtracking or fallback gen

Implementations & Case Studies

References