CourseTransformers: From Attention to Trained, Served and Interpreted Models · Module 11: Inference and Serving · part 80 of 111
Part 80 · Module 11: Inference and Serving

Lesson 3: Speculative decoding and continuous batching, measured

28 min read·13 Oct 2026
Module 11 · Lesson 3 · About 55 minutes · Needs: Module 2, Lesson 5 (the KV cache idea); the base recipe (course-guide/06, block 19); Module 8's package

The situation

Sol 433 at Aurora Station. The link to Earth is down for three sols, so every crew question goes to the station's own model, base, on small CPU servers. Hana Aoki, the Compute Officer, has two complaints: a reply comes out one character at a time, and when sixteen people ask at once, short questions wait behind long ones.

Her rule: "Faster is fine. A different answer is not." The running example is one maintenance log header, "Log 5107, sol 433, the night shift.", continued for 80 characters.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.