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 08 · AI · Serve the GPT you built · with code: Python · about 11 min to read

Play it as a journeyTutor comes with a plan

Build Your Own Inference Engine

Inference Engineering
Inference Engineering · Open board

The Inference Engineering board draws one message’s whole trip through a serving system. This build makes a small version of that system you can run. Head of the serving series, after the small GPT of Sampling and What Scale Buys.

Before you start. In Sampling and What Scale Buys you made a small GPT write replies, one character at a time, by running the whole model again for every character. That loop is slow, and this series is about the machinery that makes it fast. Later in this track, The Two Clocks (TTFT, TPOT, and why goodput is the number) names the two waits a user feels, time to first token and time per output token, and this build measures both on your own machine. Inference Engineering (serving an LLM is a systems problem) walked a request through a serving system without any code. This series writes that system, six small files of it.

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

  • September 2023: the model was fine, the memory around it was not
  • The engine is everything except the forward pass
  • What the toy can show, and what it cannot
  • Why the cook keeps a notebook
  • Many tickets, one kitchen
  • Never cook the same thing twice
  • The doors open
  • All of it in code

Terms it explains: forward pass, inference engine, key, value, KV cache, context shift.

Review AI