Skip to content

Speculative Execution

Definition

Speculative Execution — a method for accelerating text generation in which a small fast model (drafter) generates several hypothetical tokens, and a larger model (verifier) checks them in parallel. Accepted tokens are output without re-generation.

Process

  1. Drafter generates K hypothetical tokens.
  2. Verifier computes probabilities for all K tokens in parallel.
  3. Tokens matching the verifier distribution are accepted.
  4. Generation continues from the first mismatch.

Comparison

Parameter Normal Generation Speculative Execution
Speed 1 token per step Up to K tokens per step
Quality Benchmark Identical to benchmark
Computational Costs High Higher, but faster

See Also

← All terms