AdvancedAbout 19 min

    Speculative Decoding

    Read the full article on Substack

    6 min read.

    Let a small draft model guess K tokens ahead and have the real model check them all in one pass. Drive the accept-reject loop, see why the verification is close to free, and reproduce DeepMind's Chinchilla-70B result — half the latency, identical output.

    Think of it this way: A junior drafting a letter for a senior to sign. The senior reads the whole draft in one pass and signs off everything down to the first thing they disagree with, fixes that line themselves, and hands it back. Reading is fast; writing is slow; and the senior's signature means the final letter is exactly what they would have written.

    Draft proposes, one at a timet+1t+2t+3t+4Target checks all of them in one passKeptkeptkeptdrop+1

    About 1.77 proposals kept, so 2.77 tokens per loop for 1.52 target passes. 1.82× faster than plain decoding.

    Check your understanding

    Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.

    Draft and verify

    Sequence

    Order one round of speculative decoding.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    1. 1Drop a step here
    2. 2Drop a step here
    3. 3Drop a step here
    4. 4Drop a step here
    5. 5Drop a step here
    5 pieces left to place

    Quiz

    20 questions
    Question 1 of 20
    Score: 0

    In speculative decoding, the draft model's job is to:

    Done with this lesson?

    Sign in free to keep your progress, streak and quiz scores.

    Keep going