Zenaique

Throughput, for an LLM serving system: give the working definition

Flashcard·Easy·4.0 · 0·~30s·Asked atBraintrustDeloitteGroq·Relevant atOpenAI
Attempt it
TL;DR

Throughput is total output tokens per second across all concurrent requests on the server; it drives cost per token and trades off against per-request latency as batch size grows.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Picture a coffee shop. Throughput is how many cups the shop serves per hour across every customer at once. Latency is how long your particular drink takes from order to hand-off. A bigger espresso machine and a larger batch pull raise the shop's hourly capacity but might mean your individual drink waits a bit longer in the queue. An LLM server has the same shape. Throughput counts every output token the server produces per second across all the chats it is handling. Latency is one user staring at their own chat window. Operators and finance teams watch throughput because it sets cost per token. Product designers watch latency because it sets whether the chat feels alive or sluggish. Both metrics are real; they just answer different questions.

Key concepts

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

Throughput and latency are the two metrics every inference operator lives with, and they answer fundamentally different questions. Throughput asks 'how much work can this box do per hour'. Latency asks 'how does one user's request feel'. Both matter, but they trade off against each other in ways that surprise people.

This deep dive defines throughput precisely, explains how it differs from latency, walks the prefill / decode decomposition, covers the batching tradeoff with hard numbers, and connects throughput to the cost per token math that drives capacity planning.

Defining throughput precisely

System throughput is the rate of output token production, summed across all in-flight requests on the server, measured over a time window. The standard unit is output tokens/sec. Many dashboards also report total tokens/sec (input + output) for hardware utilization analysis, and tokens/sec/GPU for cross-deployment comparison.

The scoping matters. Single-stream throughput, the rate of one isolated request's decode, is roughly 1 / TPOT and tracks user-perceived speed. System throughput, the rate across many concurrent requests, is what cost models use. The two diverge once batching kicks in: single-stream throughput stays roughly constant or drops slightly with batching, while system throughput multiplies.

When a vendor says '4,000 tokens/sec on H100', they almost always mean system throughput at a batch size large enough to saturate the hardware. They are not promising that any one of your requests will decode at 4,000 tokens/sec. Production benchmarks always report both numbers; popular open-source benchmarks like genai-perf (NVIDIA) and llm-benchmarks (Hugging Face) emit a full latency-throughput curve.

Time window matters too. A short window catches bursts and quiet periods; a long window smooths them out. Production dashboards use a 1-minute rolling average for throughput and report p50 / p95 / p99 for latency alongside it.

Throughput vs latency: scope, scale, and the tradeoff
Prefill vs decode throughput
Throughput drives cost; latency drives UX
Production traps and how to avoid them
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.

Real products, models, and research that use this idea.

  • vLLM on an H100 can hit 4,000+ output tokens/sec aggregate on Llama 3 70B with continuous batching and FP8 weight quantization.
  • OpenAI's Batch API offers ~50% cheaper pricing because relaxed 24-hour latency lets them run at the throughput-optimal batch size.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QWhy is decode throughput limited by HBM bandwidth, not tensor-core FLOPS?
A

Each decode step reads the entire weight matrix from HBM to multiply with a tiny activation vector (batch size times hidden size). Compute per byte read is low, so the kernel sits waiting on memory. Batching raises arithmetic intensity until the bottleneck shifts to compute.

2 more follow-ups an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Reporting single-stream tokens/sec as system throughput. Single-stream is one request's decode rate; system throughput is summed across every concurrent request on the GPU.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • Define throughput as system-wide output tokens per second aggregated across requests.

  • State the canonical unit (tokens/sec or tokens/sec/GPU).

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
What is the KV cache in transformer inference?
Flashcard·Easy