EngineeringUpdated 2026-10-24

Speculative Decoding

A small model drafts several tokens and a large model verifies them in parallel to speed up generation.

#推理加速#延迟#模型

In plain language

Large models generate one token at a time. Speculative decoding has a cheaper draft model guess several tokens, then the large model verifies them in one forward pass; accepted tokens stay and rejected ones restart at the divergence. It reduces latency without changing the output distribution, making it useful for high-concurrency, latency-sensitive serving. Performance depends on draft-target agreement; a poor draft causes frequent rejection and extra overhead.

Example

A support bot uses a 1B model to draft and a 70B model to verify in batches, reducing time-to-first-token while preserving quality.

Recommended tools

Related terms