LLM Inference Speed: Latency, Throughput and Tokens per Second
By LatestLLM Editorial · Published · Facts verified · 9 min read
Also called: tokens per second, time to first token, TTFT, inference speed, memory-bound decoding, prefill and decode, batching
Before this: KV cache, Next-token prediction
In one line
Latency is how quickly one request gets its tokens and throughput is how many tokens a server produces in total; for LLM decoding both are limited mainly by how fast weights can be read from memory.
Latency and throughput, simply and technically
In plain English
Using a chatbot, you notice two kinds of speed: how long you wait before the first word appears, and how fast the words stream out after that. A company running the chatbot cares about a third kind: how many users one expensive graphics card can serve at the same time. These are different, and improving one often hurts another.
The surprising part is what limits the speed. It is usually not how fast the chip can calculate, but how fast it can fetch the model's numbers from memory. To write each word, the card has to read most of the model, so the speed of writing is the speed of reading. That is why the tricks for faster chatbots are mostly about shrinking what has to be read.
Think of it like this: A chatbot's speed is like a restaurant kitchen. Latency is how long your own table waits for the dish; throughput is how many dishes leave the kitchen per hour. The cook is fast, but each dish needs ingredients fetched from a far-away pantry, and the pantry trip dominates. Cooking for a full dining room at once makes one pantry trip serve many plates, which raises throughput but can make each table wait a little longer. A real GPU's trip is to its memory instead of a pantry, but the arithmetic is the same.
Everyday example: One user or fifty
A server can stream 150 words per second to a single user, or serve fifty users at 40 words per second each.
Input:
1 user at 150 words/s vs 50 users at 40 words/s each
Output:
Total: 150 vs 2,000 words/s; per user: 150 vs 40 words/s
What it shows: With one user, the card fetches the model once per word for that person only. With fifty, the same fetch serves fifty people at once, so the total output is higher (2,000 words per second instead of 150) while each person waits somewhat longer for each word. Services choose where on this trade-off to sit.
Technically
A request has two phases. In prefill the whole prompt is processed in parallel, which is compute-bound, and ends when the first token is produced; its duration is the time to first token (TTFT). In decode each new token needs a full forward pass for one position, so the arithmetic per weight read is tiny (about one multiply-add) and the pass is bound by memory bandwidth: every active weight, plus the request's KV cache, is streamed from HBM for every token. At batch size 1, tokens per second is therefore at most bandwidth divided by the bytes of active weights, ignoring the cache and overheads.
NVIDIA lists 3.35 TB/s for the H100 SXM (80 GB), 4.8 TB/s for the H200 (141 GB) and 2,039 GB/s for the A100 80GB SXM. For gpt-oss-120b, which activates 5.13B parameters, the bound is about 650 tokens per second per user at 8 bits on the H100's bandwidth, though its 116.8 GB of 8-bit weights would need an H200 (141 GB) or several cards to fit; at 4 bits it fits one H100. Batching amortises the weight read across requests, raising total throughput until compute or KV-cache reads become the limit, while each request's inter-token latency grows. Continuous batching (Orca), paged KV caches (vLLM) and fused attention kernels (FlashAttention) exist to keep the GPU busy at high batch sizes.
Technical example: The bandwidth bound for real models
Upper bound on single-user decoding speed: GPU memory bandwidth from NVIDIA's pages divided by the active weights' bytes per token, for two models at 16 and 8 bits. It ignores whether the weights fit in one GPU, the KV cache and overheads, so real speeds are lower.
Code (python):
gpus = {"A100 80GB": 2039, "H100 SXM": 3350, "H200": 4800} # GB/s
models = {"gpt-oss-120b": 5.13, "Gemma 4 31B": 30.7} # active parameters, billions
for name, active in models.items():
for bits in (16, 8):
gb_per_token = active * bits / 8
speeds = ", ".join(f"{g} {bw / gb_per_token:4.0f}" for g, bw in gpus.items())
print(f"{name:12s} {bits:>2}-bit {gb_per_token:5.1f} GB/token -> tokens/s: {speeds}")
Output:
gpt-oss-120b 16-bit 10.3 GB/token -> tokens/s: A100 80GB 199, H100 SXM 327, H200 468
gpt-oss-120b 8-bit 5.1 GB/token -> tokens/s: A100 80GB 397, H100 SXM 653, H200 936
Gemma 4 31B 16-bit 61.4 GB/token -> tokens/s: A100 80GB 33, H100 SXM 55, H200 78
Gemma 4 31B 8-bit 30.7 GB/token -> tokens/s: A100 80GB 66, H100 SXM 109, H200 156
What it shows: A dense 31B model at 16 bits reads 61 GB for every token and tops out near 55 tokens per second on an H100. gpt-oss-120b, active 5.13B, has a bound near 650 at 8 bits, because a mixture-of-experts model reads only the experts a token uses (at batch size 1; larger batches touch more experts). The bound moves with bandwidth and bytes per weight, not with arithmetic speed.
Two phases: prefill and decode
In plain English: When you send a message, the model first reads all of it at once, which is quick per word, and then writes the reply word by word, which is slow per word. The wait before the first word is the first phase and the streaming speed is the second.
Technically:
Prefill runs the whole prompt through the model as a batch of n tokens, so each weight read does n times the arithmetic and the GPU is compute-bound; time to first token grows with prompt length, roughly linearly for short prompts and faster for very long ones because of attention. Decode produces one token per step per request, so each weight read does only one token's arithmetic.
Two metrics describe the user experience: time to first token and inter-token latency (or its inverse, tokens per second per user). End-to-end latency is approximately TTFT plus output length times inter-token latency.
What is time to first token?
The delay between sending a request and receiving the first generated token, dominated by prefill and any queueing.
Why decoding is memory-bound
In plain English: To produce one word the card must read essentially the whole active model from memory, do a tiny amount of arithmetic with each number, and discard it. Its calculating units spend most of their time waiting for data.
Technically:
The bound is tokens/s ≤ bandwidth / bytes per token. With 4,800 GB/s on an H200 and 61 GB of bf16 weights for a dense 31B model, the bound is about 78 tokens per second; at 4 bits it would be about 310. The KV cache adds read traffic proportional to context length, which is why long conversations slow decoding (see the KV cache page). Pope et al. built an analytical model of this trade-off to choose how to partition large models across chips.
This is also why active parameters matter more than total parameters for a mixture-of-experts model's speed, and why quantization helps decoding even when arithmetic precision is unchanged: fewer bytes to read.
Everyday example: The pantry trip
A kitchen's pantry is 10 minutes away for a recipe that takes one minute to cook.
What it shows: Speeding up the cooking by half saves 30 seconds out of 11 minutes. Moving the pantry closer, or carrying fewer ingredients, matters far more. For LLM decoding, memory bandwidth plays the part of the pantry trip.
Batching and throughput
In plain English: A card that serves one person wastes most of its calculating power. Serving many people at once shares the memory trip, so the total number of words per second rises sharply. The price is that each person's words come a little slower.
Technically:
With batch size B, one weight read serves B tokens, so throughput scales almost linearly with B until the device becomes compute-bound or the KV caches no longer fit. Each request's cache must still be read, so cache traffic grows with B. Continuous batching adds and removes requests every step instead of waiting for a whole batch to finish, and PagedAttention makes the cache memory efficient so larger batches fit; vLLM reports 2 to 4 times higher throughput than earlier systems at similar latency.
For mixture-of-experts models the effect is subtler: a large batch activates many different experts, so the weights read per token fall less than for dense models. Services therefore tune batch size against a latency target.
Making it faster
In plain English: Almost every speed-up works by shrinking what has to be read, or by getting more words out of each read.
Technically:
Quantization cuts bytes per weight; mixture-of-experts cuts active weights; grouped-query, sliding-window and latent attention cut KV-cache reads; FlashAttention avoids writing the attention score matrix to memory. Speculative decoding drafts several tokens and verifies them in one pass, raising tokens per weight read, and multi-token-prediction modules such as DeepSeek-V3's provide drafts from the model itself.
On the hardware side, newer GPUs raise bandwidth: from 2,039 GB/s (A100 80GB SXM) to 3.35 TB/s (H100 SXM) to 4.8 TB/s (H200), a 2.35 times increase over the A100 that moves the decoding bound by the same factor.
Common misconceptions
Myth: A GPU with twice the arithmetic speed answers twice as fast.
Reality: Single-user decoding is limited by memory bandwidth, so extra arithmetic speed barely helps; bandwidth and bytes per token matter.
Myth: Throughput and latency are the same thing.
Reality: Latency is per request; throughput is the whole server's output. Batching raises throughput and often lowers per-user speed.
Myth: A 120B mixture-of-experts model is as slow as any 120B model.
Reality: At low batch sizes it reads only its active parameters per token, 5.13B for gpt-oss-120b, so it can be much faster than a dense model of the same total size.
Where you'll see this
- gpt-oss architecture: gpt-oss-120b reads about 5.13B active parameters per token, with MXFP4 expert weights that cut bytes read further.
- DeepSeek-V3 architecture: DeepSeek-V3's 37B active parameters, latent attention and multi-token prediction all target decoding speed.
- Gemma 4 architecture: Gemma 4's sliding windows, shared caches and grouped heads reduce KV-cache traffic during decoding.
Key takeaways
- A request has a compute-bound prefill (time to first token) and a memory-bound decode (tokens per second after that).
- At batch size 1, decode speed is at most memory bandwidth divided by the bytes of active weights: roughly 55 tokens per second for a 31B dense model at 16 bits on an H100.
- Batching raises total throughput by sharing each weight read across requests, at the price of slower tokens per user.
- Quantization, mixture-of-experts, grouped or latent attention and speculative decoding all raise speed by reducing bytes read per token.
Frequently asked questions
What is time to first token?
The time from sending a request to receiving the first generated token. It is dominated by processing the prompt.
Why is LLM decoding memory-bound?
Each token requires reading the model's active weights once while performing little arithmetic per weight, so memory bandwidth, not compute, sets the speed.
How do I estimate tokens per second?
Divide memory bandwidth by the bytes of active weights per token. For a 31B dense model at 16 bits on an H100 (3,350 GB/s) it is about 54, before cache and overheads.
What does batching do?
It processes many requests together so each read of the weights serves all of them, raising total throughput while making each request's tokens slightly slower.
How can inference be made faster?
Quantize weights, use mixture-of-experts or smaller models, shrink the KV cache, batch requests and use speculative decoding.
Sources
Facts last verified November 23, 2026.