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 03 · AI · Past the basics · about 19 min to read

Play it as a journeyTutor comes with a plan

Inference Engineering (serving an LLM is a systems problem)

Inference Engineering
Inference Engineering · Open board

The board behind this lesson: one message’s whole trip through a fleet of machines, and the two clocks it’s judged on. Inference at Scale (why an LLM is fast, and cheap) made one GPU answer one request fast. This lesson is about what happens when a thousand requests hit that same pool of GPUs at once, and why some of those people feel it as fast while others feel the exact same server as slow.

Before you start. Inference at Scale (why an LLM is fast, and cheap) showed you how to make one GPU answer one request fast: handle several requests together in one go, shrink the model’s dials, page the model’s working notes instead of reserving a fixed slab for them, and guess ahead at the next few words before checking them. This lesson keeps every one of those tricks and asks what happens when a thousand people share that same GPU pool at once, each one noticing a different kind of “slow.”

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

  • Why does “it’s fast” and “it feels slow” both check out?
  • 2023: the same two waits, wearing engineering names
  • January 2024: goodput, the number that was actually missing
  • One message, two kinds of work: prefill and decode
  • Five ways to protect one clock without wrecking the other
  • What the model writes down as it reads
  • The cover sheet every job starts with
  • The giant paste
  • Two rooms, and a cheaper desk
  • Who owns which part of the trip
  • All of it in code

Terms it explains: TTFT, TPOT, goodput, prefill, decode, batch, weights, layer, head, key, value, KV cache, attention, hash.

Review AI