Insights · AI
GPU inference infrastructure: sizing, serving and scaling LLMs
By the Cystem X Engineering Team - Published - 5 min read
In this article
Training gets the headlines, but most organizations spend their GPU budget on inference: serving models to users and applications. Capacity planning for inference is a different exercise from training, shaped by memory, concurrency and latency targets. Getting it right determines both user experience and cost.
Memory comes first
A model must fit in GPU memory along with working space. Weights take roughly the parameter count times bytes per parameter, so quantizing from 16-bit to 8-bit or 4-bit reduces the footprint substantially at some cost in precision. On top of that sits the key-value cache, which grows with context length and the number of concurrent requests.
Size memory for the workload you expect at peak, not for a single request.
Understand the two phases
Inference has a prefill phase that processes the input and is compute-heavy, and a decode phase that generates tokens one at a time and is limited by memory bandwidth. Time to first token and tokens per second are separate metrics with different causes.
Set targets for each based on the application: interactive chat needs fast first tokens, while batch summarization cares about throughput.
Inference capacity is a memory and concurrency problem before it is a compute problem.
Use a modern serving engine
Serving engines such as vLLM implement continuous batching and paged attention, which pack many concurrent requests efficiently into GPU memory. They provide far better utilization than naive request-by-request serving.
Tune batch size, maximum context and scheduling policy against measured traffic, and test under realistic concurrency.
Quantize and optimize deliberately
Quantization, speculative decoding, prefix caching and optimized kernels can each improve throughput or reduce cost. Evaluate every optimization on your own tasks, because quality effects vary by model and use case.
Track the results in your evaluation harness so that efficiency changes do not silently degrade answers.
Scale across GPUs and nodes
Models too large for one GPU can be split using tensor or pipeline parallelism, which needs high-bandwidth interconnect inside a node. For capacity, replicate model servers behind a load balancer that is aware of queue depth and cache state.
Plan network design carefully, because east-west traffic and storage throughput for model loading affect start-up and recovery times.
Route and govern traffic
An inference gateway centralizes authentication, rate limits, quotas, logging and routing across models. Route simple requests to smaller models and reserve large models for tasks that need them.
Attribute usage to teams so cost is visible and accountable.
Operate for reliability
Monitor GPU utilization, memory, queue length, latency percentiles and error rates, and set alerts tied to user-facing objectives. Plan for hardware failures, driver and framework updates and rolling model upgrades without downtime.
Keep a staging environment that mirrors production, and run load tests before changes ship.
Key takeaways
- Size GPU memory for weights, KV cache and peak concurrency.
- Track time to first token and throughput separately.
- Use continuous batching and paged attention serving engines.
- Evaluate each optimization against your own quality tests.
- Use an inference gateway for routing, quotas and cost attribution.
Sources and further reading
This article reflects general practice and publicly available guidance. Teams should consult primary sources, including the documentation of your chosen serving framework and GPU vendor, and published research on efficient transformer inference, and adapt the guidance to their own environment, risk appetite and legal obligations.
Keep reading
More engineering guidance from the Cystem X team.
AI
Small language models and edge AI: when smaller is better
Cost, latency, privacy and offline operation: where small models beat large ones.
Read articleAI
Sovereign AI and data residency: what it means and how to deliver it
Keep data, models and operations inside a chosen jurisdiction: drivers, architectures and controls.
Read articleAI
MLOps in production: monitoring models and detecting drift
Models decay after launch. How to monitor drift, trigger retraining and release safely.
Read articleAI Infrastructure & LLMOps
Right-size your AI infrastructure.
We plan, build and operate GPU platforms for LLM serving in cloud, on-premises and air-gapped environments.
Explore AI Infrastructure & LLMOps