Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 09 · AI · Serving LLMs · about 20 min to read

Play it as a journeyTutor comes with a plan

Chunked Prefill (one long prompt must not freeze the room)

Chunked Prefill
Chunked Prefill · Open board

Serving LLMs, the third board. It draws the batch’s schedule twice: once when a long paste runs whole and freezes the room, once sliced into pieces that ride along with everyone else’s replies.

Before you start. The Two Clocks (TTFT, TPOT, and why goodput is the number) gave you the room: 32 people sharing one GPU, each getting a new token every 39 ms, a promise called TPOT that a busy GPU can still break. A token is a word or a piece of one, and producing one means pushing it through the model’s weights, the 7 billion numbers the model learned while it was trained. Prefix Caching (the same start, computed once) then showed the machine skip re-reading a system prompt it has already read once. This lesson is about the prompt it has never read before.

Lesson 79 of 83 in AI

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • Thirty-one people, and one who pastes a book
  • 2023: the freeze that maximised the dashboard
  • The fix: read the book a few pages at a time
  • 2024: naming it, and the dial nobody can dodge
  • Why a word is light and a document is heavy
  • The freeze, priced
  • The slice rides along
  • Who picks the slice size?
  • All of it in code

Terms it explains: weights, prefill, decode step, chunked prefill, piggybacking, stall-free scheduling, KV cache, memory-bound, compute-bound, SLO, TTFT, token budget, head-of-line blocking, slack.

Review AI