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

Play it as a journeyTutor comes with a plan

The Two Clocks (TTFT, TPOT, and why goodput is the number)

The Two Clocks
The Two Clocks · Open board

One request laid on a ruler, bracket by bracket, every millisecond computed from the model and the card. Below it, the thing that owns both brackets and its two dials. Below that, ten requests in one second, and the number the run is actually scored on.

Before you start. Inference Engineering (serving an LLM is a systems problem) walked the whole trip a request takes through a serving system and pointed out that a reply hides two different waits inside it. This lesson puts real numbers on both waits and shows the one dial that trades one against the other.

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

  • 2024: a fast dashboard, and a line of angry users
  • The first wait: TTFT
  • The wait after that, over and over: TPOT
  • The promise on paper: the SLO
  • One thing owns both dials, and there is no dial C
  • Goodput: the number that catches the lie
  • Why a token costs 39 ms
  • Why the first token takes 210 ms
  • More seats, or a longer line?
  • Ten requests in one second
  • All of it in code

Terms it explains: TTFT, parameters, GPU, 210 milliseconds, TPOT, step, 39 milliseconds, SLO, scheduler, batch, Goodput, tokens, KV cache, decode, streaming, 122 ms, prefill, 90 ms, p99, continuous batching, capacity, 78 GB, 59, Little's law, Throughput.

Related paper

Review AI