GPU memory is the real serving constraint
GPU specifications are exciting, but a serving engineer needs more than peak arithmetic figures. I want to know how much memory remains when real users send long requests concurrently.
Behind the technology
Inference must hold model weights, activations and key-value cache state in memory; concurrent requests increase runtime memory requirements.
What excites me
Understanding these components helps choose instance sizes and avoid unnecessary overprovisioning.
Where we need caution
A model fitting at startup can still run out of memory under long prompts or concurrent requests.
Engineering walkthrough
A useful back-of-the-envelope calculation starts with model weights. A model with seven billion parameters represented in 16-bit precision needs roughly 14 billion bytes for weights alone, before runtime overhead and caches. Quantization can reduce that component, but the exact memory saving depends on metadata, kernels and the chosen format. For autoregressive decoding, cached keys and values grow with the number of active tokens, layers and key-value head dimensions. This means a model that loads comfortably may fail when several users send long conversations. Measure memory after loading and again under concurrent requests with different input and output lengths. Record time to first token, tokens per second and p95 completion latency. Separate the prefill stage, which processes the input, from iterative decoding, which generates new tokens. A capacity plan based on real request distributions is more informative than a benchmark using one short prompt and no concurrent users.
Put the idea to the test
Benchmark short and long requests at different concurrency levels. Track peak memory, time to first token and tail latency before choosing capacity.
Keep learning
Kubernetes documentation ↗ · Further reading for this subject area; not a claim that the source endorses this editorial.
