Exchange
The speculative decoding card
1 file2 KB
A look inside
The first lines of speculative-decoding.md. The whole file is in your library once you get it.
# The speculative decoding card A free card from MenFem's Inference 101, lesson 9: Speculative decoding: a fast guesser and a careful checker. The lesson, with the picture and the examples: https://menfem.com/courses/inference-101/speculative-decoding This is what you keep: how a fast guesser and a careful checker work together, and when it pays. 1. Writing is slow because each token waits on a full read of memory, while the chip's sums sit idle. 2. A small, fast guesser drafts the next few tokens. The big model checks them all in one go, like reading a prompt. 3. It keeps the guesses up to the first wrong one and writes that token itself, so every check gives at least one token. 4. The answer is word for word what the big model would have written alone. Only the speed changes. 5. It helps most on long, predictable answers on a chip with room to spare. On a packed chip or a one-word answer, it adds little. 6. When you edit a long text, some APIs let you send the old version as the guess (November 2026). Check how wrong guesses are billed. **The rule:** It buys speed, not better answers. Reach for it when the wait for the last word is the problem. ## Used once From the lesson, on a made-up shop: "On your own lightly used server, replies are mostly set phrases: "Thanks for your order. It will be sent within two working days."" Answer: Big speed-up likely. Predictable words are easy to guess, so most of each draft is kept. And a quiet chip has spare sums for the checking. ## Your turn …and 10 more lines.
What is inside
- speculative-decoding.md2 KB
How to use it
Open it beside the job and go down the 6 lines in order, then check your answer against the rule at the bottom. It is the card from Inference 101, lesson 9 (Speculative decoding: a fast guesser and a careful checker), with one worked example from the lesson and a space for your own case.
Run before it was listed
Tested 2026-11-29: Generated from the lesson's own keep card and checked line by line against it; used once on the lesson's made-up example, which is printed in the file.