Speculative decoding reduces language-model generation time by pairing a small, fast draft model with a larger target model. The draft model proposes several future tokens in parallel; the target model verifies them and accepts only tokens it would generate itself. Both models must use the same tokenizer, preserving output quality while exploiting parallel Transformer evaluation. section 12.3
Operational requirements and tradeoffs:
- Run two models side by side: a faster draft model and a larger target model. section 12.3
- Use matching tokenizers for the draft and target models. section 12.3
- Expect speedups when the target accepts enough proposed tokens; rejected proposals reduce the benefit. section 12.3
- Configure the feature alongside inference settings such as sampling parameters, context length, seed, and KV-cache quantization. section 12.3
LM Studio pairing
LM Studio demonstrates speculative decoding with Llama 3.2 3B Instruct as the target and Llama 3.2 1B Instruct as the draft model. The feature supports GGUF and Apple MLX models and can serve local requests without an internet or LAN connection after model download. section 12.3 section 12.7
Figure 12.8 Speculative Decoding in action with the Llama 3.2 3B Instruct (target) and Llama 3.2 1B Instruct (draft) models in LM Studio
Shows speculative decoding in action with separate target and draft models in LM Studio. section 12.3

