All glossary terms

Efficiency

Throughput vs latency

Two serving scores: tokens per second across the whole fleet versus how fast one user sees a response. Optimizing one can quietly pay with the other.

Throughput is an operator number: tokens per second across the whole machine or fleet, which decides what a rental hour buys. Latency is a user number: how fast the first word arrives and how steadily the rest follows, which decides whether the product feels broken. They are related - the same GPU, the same software - but they are not the same goal, and nothing they share makes choosing between them optional.

The classic trade is batching, and the direction of the trade is the point. Batching shares each weight read across many users, so aggregate throughput rises several-fold nearly for free; meanwhile each user shares the server with everyone else, so its own stream slows as the batch grows. Push the batch far enough and every user is slow even as the fleet records record throughput.

The way out is to know which number the product actually sells. A batch pipeline selling document processing buys throughput and gives up per-user speed happily. A chat product buys latency and treats aggregate as a cost line. The interview failure is optimizing whichever number was asked about first, before finding out which one the customer can feel.

A worked example

A 70B model in 8-bit on one H100 (3.35 TB/s of bandwidth), one user versus a batch of 16, then a measured batch-128 run in which per-user speed has fallen to a stated 20 tokens per second.

  1. One user: 3.35 TB/s / 70 GB = about 48 tokens per second, all of it for one conversation.
  2. Batch 16: the weights are still read once per step, so the card emits about 766 tokens per second in aggregate, and per-user speed stays near 48 at first.
  3. Batch 128: aggregate climbs further, but cache reads and scheduling crowd the step, and per-user speed is down at the measured 20 tokens per second.

Batching buys aggregate tokens for nothing per read and pays with a slower stream per user - throughput is bought in aggregate, latency is paid per user.

Where this shows up

Test yourself

Related terms