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 27 min to read

Play it as a journeyTutor comes with a plan

Stop and Resume (the button that has to reach the card, and the stream that has to come back)

The picture: two small stories about a chat reply, one with a button and one with a tunnel. In the first, a person presses Stop and the screen obeys at once, while the machine behind it does not. In the second, a phone loses signal for ten seconds and the reply has to come back whole. Both are told on the same bus of 32 seats from Batching: A Slot That Frees Early, with the same memory blocks from Paged Attention: The Cache in Blocks.

Before you start. The Two Clocks (TTFT, TPOT, and why goodput is the number) gave the machine its numbers: a 7 billion parameter model on an A100, 32 conversations sharing each step, one step taking 39 milliseconds, a reply of 200 tokens taking 7.8 seconds. Paged Attention: The Cache in Blocks showed that a conversation’s saved notes, its KV cache, live in small blocks handed out from a pool. Design Claude, in the interview has one paragraph about a client that reconnects and says “I have words up to 214, send the rest”. This lesson is the deeper version of that paragraph, plus the button that paragraph never mentions.

Lesson 83 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

  • The button that only stops the screen
  • Stop is three things, not one
  • Stop must not wait in line
  • Freed has to wait for work already launched
  • Stop racing the end of the reply
  • Now the tunnel: the stream that has to come back
  • Two cursors that disagree
  • The log is the truth, and the card is not
  • The crash between two writes
  • What the tiny copy keeps and drops
  • Four ways to break it
  • All of it in code

Terms it explains: boundary, applied, freed, control message, launch, event, cursor, server's cursor, client's cursor, log, same commit.

Review AI