Use AIUnderstand AIBuild with AI
Understand AI·Explainer·· 3 min read

What Is Speculative Decoding? How AI Replies Get Faster

A plain-English look at speculative decoding: a small model drafts text and a big model checks it, so chatbots can reply faster.

You may have noticed that some AI services type out their answers faster than others, and that the same service gets faster over time. Part of that comes from better hardware. Part comes from clever tricks in how the model produces text. One of the best-known tricks has an odd name: speculative decoding.

The idea is simple, and you don’t need any math to follow it.

Why chatbots are slow in the first place

A chatbot writes its reply one small piece at a time. These pieces are called tokens, and they are often a word or part of a word. To produce each token, the model has to run a big calculation. Then it adds that token to the text and runs the whole calculation again for the next one.

Writing a 300-word answer means hundreds of these rounds, one after another. Each round must wait for the one before it, because the next token depends on the tokens already written. Having a more powerful computer helps, but this one-at-a-time pattern is a built-in bottleneck.

An analogy: the junior writer and the editor

Picture a busy senior editor who writes carefully but slowly. Next to them sits a junior writer who is fast, though not as skilled.

Instead of the editor writing every word, the junior writer quickly drafts the next several words. The editor then reads the whole draft at once. Where the draft is what the editor would have written, the editor accepts it. At the first word the editor disagrees with, the editor fixes it and the process continues from there.

Reading a draft is much quicker than writing from scratch, and checking several words in one look is quicker than writing them one by one. When the junior writer guesses well, several words get approved in the time it would have taken to write one.

The more accurate version

In speculative decoding, the two roles are two AI models:

  • A small, fast draft model guesses the next several tokens.
  • The large target model, the one whose answers you actually want, checks all those guesses in one pass.

The target model keeps the guesses that match what it would have produced and discards the rest from the first mistake onward. Then the cycle repeats. Because the large model is always the one making the final call, the approach is designed so that the output matches what the large model would have written on its own. In the standard version of the technique, you get the same quality of answer, only sooner.

The speedup depends on how often the draft is right. If the draft model guesses well, many tokens are accepted per check, and replies come out noticeably faster. If it guesses badly, there’s little gain, and the extra work of drafting can even slow things down.

Draft models can be built in different ways. Some are separate small models. Others are small add-on components trained to work with a specific large model. Researchers keep proposing new designs, for example ones that draft many tokens in parallel rather than one after another.

What this means for you

  • Faster doesn’t mean smarter. Speculative decoding is about speed, not about making the answers better.
  • It’s mostly invisible. Whether a service uses this trick or others is rarely announced. If you use a chatbot app, you will probably never see a setting for it.
  • It matters most to people running models themselves. Developers and companies who host large models care because faster replies mean the same hardware can serve more people.
  • Speed claims need context. If someone says their method makes a model several times faster, it’s fair to ask what hardware, what kinds of tasks and what settings they measured. Results can differ a lot between, say, writing code and chatting.

What’s well established, and what’s debated

Well established: the draft-and-verify idea is a widely used technique, and in its standard form it is designed to keep the large model’s output unchanged.

Still being worked out: which draft designs give the best speedups, how well they hold up across different kinds of tasks, and how they interact with other speed-up methods. These are active research questions, and results reported by one team may not carry over to your own setup.

The short version

Speculative decoding lets a small, quick model draft a few words ahead while the big model checks the work in one go. When the guesses are good, you get the big model’s answer faster. It’s a bit like an editor who reads a junior writer’s draft instead of writing every word, and it’s one reason AI replies keep getting quicker.

Related