Skip to content
Exchange

The batching card

1 file2 KB

A look inside

The first lines of batching-many-at-once.md. The whole file is in your library once you get it.

# The batching card

A free card from MenFem's Inference 101, lesson 6: Batching: serving many people at once.
The lesson, with the picture and the examples: https://menfem.com/courses/inference-101/batching-many-at-once

This is what you keep: how batching works on one card, and the question that tells you which of your jobs can wait.

1. Batching is a bus, not a taxi: one read of the model writes the next token for everyone on board.
2. Old batching made a whole group wait for its longest answer. Continuous batching lets each request leave the moment it is done, and a new one take its seat.
3. Seats are memory. Handing out memory in small pages (PagedAttention) wastes less room, so more riders fit on one chip.
4. A fuller bus is cheaper per rider and a little slower for each one. Whoever runs the chip chooses how full.
5. Work nobody is waiting for can go to a batch service: as of November 2026, Anthropic and OpenAI charge half price and promise results within 24 hours.

**The rule:** Sort every AI job into "someone is waiting" and "it can wait a day". Send the second pile as a batch.

## Used once

From the lesson, on a made-up shop: "A customer on your website asks whether the blue wool coat comes in a medium."

Answer: Send it straight away. They are waiting on the page. An answer tomorrow, however cheap, is an answer after they have gone elsewhere.

## Your turn

Write one case from your own work here, then go down the card line by line.
…and 8 more lines.

What is inside

  • batching-many-at-once.md2 KB

How to use it

Open it beside the job and go down the 5 lines in order, then check your answer against the rule at the bottom. It is the card from Inference 101, lesson 6 (Batching: serving many people at once), with one worked example from the lesson and a space for your own case.

Run before it was listed

Tested 2026-11-29: Generated from the lesson's own keep card and checked line by line against it; used once on the lesson's made-up example, which is printed in the file.