How it works
The technique comes from Google researchers' 2022 paper: a cheaper model drafts several tokens and the large model verifies them in parallel, without changing the output distribution. The paper reports 2–3× faster generation on T5-XXL with identical outputs.
It works because checking several tokens takes the large model about as long as generating one: either way it reads all its weights from memory once. Every accepted draft token is a token the large model didn't have to generate on its own.
Why it suits a Mac
Generation on Apple silicon is limited by memory bandwidth, not compute: a dense model like Llama 3.3 70B (Q4_K_M) manages about 10.7 tok/s on a Mac Studio M5 Max 128GB, and Qwen3 32B (Q4_K_M) about 11.5 tok/s on a Mac mini M5 Pro 64GB (our estimates), with GPU compute to spare. Speculative decoding spends that spare compute to read the big model less often. Mixture-of-experts models are already fast, so the gain there is usually smaller (see mixture of experts, explained).
Turning it on
| Tool | How | Source |
|---|---|---|
| llama.cpp | --model-draft (or -md) plus --spec-draft-n-max (default 3) | docs/speculative.md |
| mlx-lm | --draft-model and --num-draft-tokens (default 3) on generate and server | generate.py / server.py |
| LM Studio | Power User mode, then choose a draft model in the sidebar | LM Studio docs |
| Ollama | MLX engine uses Qwen3.5's MTP head automatically (v0.32.6); draft_num_predict in a Modelfile | release notes, Modelfile docs |
Sources: llama.cpp, mlx-lm, LM Studio, Ollama v0.32.6, Ollama Modelfile.
Choosing a draft model
- It must share the main model's vocabulary, so use a small model from the same family (for example a 1B–4B Qwen for a 32B Qwen).
- It has to be much faster than the main model, or the checks cost more than they save.
- It has to fit in memory alongside the main model.
FAQ
What is speculative decoding?
Does speculative decoding change the model's answers?
Does Ollama support speculative decoding on a Mac?
How much faster is speculative decoding?
See any model on the exact Mac you're considering.
- Leviathan, Kalman, Matias: Fast Inference from Transformers via Speculative Decoding
- llama.cpp: speculative decoding docs
- mlx-lm generate.py
- LM Studio: speculative decoding
- Ollama v0.32.6 release notes
- Ollama docs: Modelfile
Speeds come from published measurements (with source links) or labeled estimates. How we measure