Reference

Numbers every LLM engineer should know

Tokens, latencies, GPU memory, KV cache sizes and prices, rounded so you can quote them from memory in a system design interview and do the arithmetic live.

You don’t need exact figures in a design interview. You need figures that are right to within a factor of two, so the arithmetic you do on the board leads to the right decision. These are the ones I use.

Hardware and model figures are stable. Prices and API latencies change every few months, so treat those rows as orders of magnitude and say “check current pricing” out loud.

Text and tokens

QuantityWorking figure
1 token (English)≈ 4 characters ≈ 0.75 words
1 page of prose≈ 500–700 tokens
A typical RAG prompt2K–8K input tokens
A typical chat answer200–800 output tokens
Codemore tokens per character than prose; budget 1.3–1.5×

Traffic

QuantityWorking figure
Seconds per day≈ 86,400 ≈ 10⁵ (use 10⁵ for mental math)
1M requests per day≈ 12 QPS average
Peak to average3–10× (business-hours products sit at the high end)
100K daily users × 10 requests≈ 12 QPS average, 40–100 QPS peak

Latency of the pieces

StepTypical
Self-hosted embedding of a short query5–20 ms
Embedding via a hosted API30–150 ms (network dominates)
Approximate nearest-neighbour search, 1M–10M vectors in memory1–10 ms
Same, through a managed vector database over the network10–40 ms
BM25 keyword search5–30 ms
Cross-encoder rerank of 50 passages on a GPU30–100 ms
Time to first token, hosted frontier model, few-K-token prompt0.3–1 s, with a long p99 tail
Output speed, hosted frontier model30–150 tokens/s per stream
Small model classifier or guardrail10–50 ms

The useful pattern: retrieval is cheap, reranking is moderate, and the model call dominates almost every interactive latency budget. Streaming changes what the user perceives: time to first token matters more than total time.

Vectors

QuantityWorking figure
Embedding size768–3,072 dimensions
One 1,536-dim vector in FP326 KB (1,536 × 4 bytes)
1M such vectors≈ 6 GB, plus ~0.1–0.3 KB per vector of HNSW graph links
Same in FP16 / INT8÷2 / ÷4
Typical chunk300–800 tokens, 10–20% overlap

So 10M chunks at 1,024 dimensions in FP16 is about 20 GB: one large-memory node, or a few shards if you need headroom and replicas.

GPUs

Approximate dense figures. Always check the vendor spec sheet for the exact SKU.

GPUMemoryMemory bandwidthBF16 compute
NVIDIA L424 GB0.3 TB/s~121 TFLOPS
NVIDIA A100 80GB80 GB~2.0 TB/s312 TFLOPS
NVIDIA H100 SXM80 GB3.35 TB/s~989 TFLOPS
NVIDIA H200141 GB4.8 TB/s~989 TFLOPS

Realistic efficiency: about 70% of peak memory bandwidth during decode, and 40–60% of peak compute during prefill.

Model memory

Bytes per parameter
FP324
BF16 / FP162
FP8 / INT81
INT40.5

Weights = parameters × bytes per parameter. A 70B model in BF16 is about 141 GB, so it needs at least two 80 GB GPUs before you’ve stored a single token of context.

KV cache

KV bytes per token = 2 × layers × KV heads × head dimension × bytes per value. The 2 is for keys and values.

Model (BF16 KV cache)LayersKV headsPer tokenOne 8K-token sequence
Llama 3.1 8B328128 KB≈ 1.1 GB
Llama 3.1 70B808320 KB≈ 2.7 GB
Llama 3.1 405B1268504 KB≈ 4.2 GB

These models use grouped-query attention (8 KV heads shared by many query heads). Without it, the 70B model’s KV cache would be 8× larger. Try your own numbers in the KV cache calculator.

Decode speed, from first principles

At small batch sizes, generating each token means reading every weight from GPU memory once. So:

Time per output token ≈ bytes read per step ÷ (memory bandwidth × 0.7)

  • Llama 3.1 8B in BF16 on one H100: 16 GB ÷ 2.35 TB/s ≈ 7 ms per token, so about 140 tokens/s for a single stream.
  • Llama 3.1 70B in BF16 on two H100s: about 30 ms per token, so about 33 tokens/s per stream, before communication overhead.

Batching many sequences shares that weight read across all of them. That is why throughput rises with batch size while each user’s speed falls slightly.

Prices (illustrative)

ItemRound figure used on this site
H100, on demand~$2–4 per GPU-hour (we use $2.50)
Frontier API model~$3 per 1M input tokens, ~$15 per 1M output tokens
Small API model~$0.10–0.50 per 1M input tokens
Cached input tokens~10% of the normal input price
Embeddings via API~$0.02–0.13 per 1M tokens

Cost per 1M tokens on your own GPUs = (GPU $/hour × GPUs) ÷ (tokens/s × 3,600) × 10⁶.

Output tokens cost about 5× input tokens on most APIs, and they are also what makes responses slow. Shorter answers are the cheapest optimisation there is.


Most of the hardware and serving figures here come from my book, LLM Inference Math for Interviews, which works through 52 problems like these step by step.