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

AILLM inference: batching

The batch size dial

One GPU is serving one chat, and its cores are 99% idle. How many more chats can you add before anything slows down, and what stops you?

Generating one token drags every weight off memory while the cores mostly wait. The panels show how much arithmetic each byte buys, which of the two units is actually busy, and how many chats fit before the cache holding each chat's context fills the card. Add chats and the throughput climbs for almost nothing, until the wall arrives.

Included with a plan

This lab 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.

the lesson Inference (sampling, context, KV cache, hallucination)
The whole idea this lab came from, told start to finish.

on the path Module 2 of 9 in AI: From a model to an app
The lessons, boards and videos around this lab, in reading order.

Board: Inference

see also Attention Is All You Need, Training Compute-Optimal Large Language Models and Efficient Memory Management for Large Language Model Serving with PagedAttention in Papers.