Guides · 3 min read

Speculative decoding: a free speed-up

How a small draft model lets a big one write faster with identical output, when it helps and when it does not.

Writing tokens one by one is slow because each token waits on a full pass through the model. Speculative decoding speeds this up with a second, much smaller draft model from the same family. The draft guesses the next several tokens cheaply, and the big model checks all of the guesses in a single pass. Right guesses are kept; at the first wrong one the big model supplies its own token. The output is the same as the big model alone, only faster.

When it helps

When it does not

Cost and how to try it

The draft model takes a little extra memory, usually under a gigabyte for a small one, so it can tip a tight fit over the edge. LM Studio has a draft-model option in its model settings, and llama.cpp’s server accepts a draft model with -md. Support is app- and version-dependent, and some apps built on llama.cpp do not expose it, so check the app first. Pick a draft at a higher quantization than you would use for the big model, because a poor draft lowers the hit rate.

Estimates come from published hardware specs and our open formulas, not from running the model on your machine. Real speed varies with runtime, drivers and settings. Numbers marked “Measured” come from a linked benchmark.