Skip to content

Inference 101, lesson 6

Batching: serving many people at once

A chip that serves one person at a time is a taxi; a chip that serves many is a bus. This lesson shows how serving systems fill the bus, why memory decides how many fit, and which of your jobs can ride the cheaper night bus.

What do you run?

Every example below changes to fit what you pick. The businesses are made up for teaching.

The picture, one step at a time

Each box is one stage. The picture lights up as you scroll.

Step 1 of 7

A bus, not a taxi

Lesson 2 showed the trick behind cheap tokens: many users share one read of the model. Picture a taxi, which carries one person per trip, and a bus, which carries a crowd for about the same fuel. Serving one request at a time is a taxi. Serving a group at once is a bus, and it is called batching. Where the picture breaks: on this bus, each rider's seat grows longer the further they travel, because their notes grow with every token.

Step 2 of 7

The old bus waited for the last passenger

Early serving systems started a group together and finished it together. So a rider with a one-line answer sat on the bus, done, until the rider with the longest answer got off. Meanwhile new requests queued at the stop, even though seats were doing nothing. Answers come in very different lengths, so a lot of the bus rode empty.

Step 3 of 7

On and off at every stop

The fix is to treat every token as a stop. After each one, any request that has finished gets off, and a waiting request gets on straight away. Nobody waits for the slowest rider, and no seat rides empty for long. This is continuous batching, and serving software such as vLLM is built around it.

The idea comes from the Orca paper (Yu and others, 2022), which scheduled work one step at a time instead of one request at a time. On a 175-billion-parameter model it reported 36.9 times the throughput of a leading system of the day, at the same level of delay.

With continuous batching, what happens when one rider's short answer is finished?

Step 4 of 7

Seats are memory, and they used to be wasted

How many riders fit is set by memory. Each one needs room for its notes on the conversation (lesson 3). Older systems kept a big block for each request, sized for the longest answer it might give, and most of that room sat empty. PagedAttention stores the notes in small pages, handed out only as they are needed, like a library that gives you one shelf at a time instead of a whole room. Less waste means more riders on the same chip.

The vLLM paper (Kwon and others, 2023), which introduced PagedAttention, measured that older systems used only 20.4% to 38.2% of this memory for real notes, and reported 2 to 4 times the throughput of earlier systems at the same delay.

Step 5 of 7

A fuller bus is a slower ride

Each extra rider adds a little work to every stop, so each stop takes a little longer. A full bus is cheapest per rider and a bit slower for each one. Whoever runs the chip chooses how full to run it, trading cost against speed. It is one reason the same open model can feel quicker on one service than on another.

Step 6 of 7

The night bus: work that can wait

Some work has no one waiting for it: a pile of product descriptions, a year of reviews to sort, a nightly report. Providers will take a pile like that, run it when their chips have room, and charge less. You give up speed, which this work does not need, for a lower price.

As of November 2026, Anthropic's batch service costs half the normal price; it says most batches finish within an hour and unfinished requests expire after 24 hours. OpenAI's Batch API also gives a 50% discount, with each batch finished within 24 hours. Check the current terms before you plan around them.

Which job suits a batch service?

Step 7 of 7

What this means for you

List every job you use AI for in answering customers. Mark each one: is a person waiting for this answer, or could it arrive tomorrow? Send the first kind as normal requests. Gather the second kind and send it as a batch. If you run a model on your own chip, check that your serving software uses continuous batching, so the chip is never a taxi.

Now, or as a batch?

Here are four AI jobs in your business. Sort each one: does it need a normal request now, or can it go as a cheaper batch?

  1. 1A customer on your website asks whether the blue wool coat comes in a medium.

  2. 2You need fresh descriptions for 800 new products before the spring catalogue, due in three weeks.

  3. 3You want last year's 12,000 reviews sorted by type of complaint for a meeting next Monday.

  4. 4A courier says a parcel cannot be delivered, and the customer needs a reply within the hour.

0 of 4 right so far, 4 to go.

The batching card

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

The batching card

  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.

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

Next: Lesson 7: Caching: not reading the same thing twice. What a provider can keep from one request to the next, and how to lay out a prompt so it does.