LLM Local Deployment: How to Size VRAM and Concurrency
This article reframes local LLM capacity planning from counting GPUs to building a capacity model. It explains why VRAM must be estimated from total parameters rather than activated parameters in Mixture-of-Experts models, provides estimation formulas for weights and KV cache, and shows how context length, concurrency, and latency targets drive the final configuration. It also covers single-node versus long-context tradeoffs, a six-step rollout process, and common sizing mistakes.
1. Ask the Right Question: Move From “GPU Count” to a Capacity Model
Whenever a new large model is released, the most common question in the community is some version of “can it run on a single node with eight GPUs?” That phrasing compresses a complex capacity planning problem into a single integer. In real deployments, at least four variables decide success: the footprint of the model weights, the cache overhead introduced by context length, the number of concurrent requests, and the business targets for response latency and throughput. The number of GPUs is an output of solving for those variables, not an input.
A more complete way to frame the question is this: given a target context length, a concurrency level, and a response objective, how much VRAM capacity, how much memory bandwidth, and what kind of inter-GPU interconnect are needed to reliably meet the service level objective? Restated this way, hardware selection turns from guessing into calculation.
2. Why You Cannot Estimate VRAM From Activated Parameters
The current generation of models widely adopts large-scale Mixture-of-Experts architectures, and marketing material often cites two numbers: total parameters and activated parameters. Activated parameters describe the portion of parameters that actually participate in matrix computation during a single forward pass. They drive compute demand and memory access pressure, not the storage the weights require.
The reason is that routing is decided dynamically per token. Different positions within the same request may hit different experts, and the distribution of experts hit varies across requests. If only the activated portion were kept in VRAM, the experts that are not hit would have to be moved repeatedly from host memory or remote storage during inference, and the resulting latency jitter usually far outweighs the VRAM saved. The standard engineering practice is therefore to keep all expert weights resident in VRAM, and that is the starting point for any serious capacity estimate.
A rough estimation framework looks like this:
Weight VRAM ≈ total parameters × bytes per parameter / parallelism degreeKV cache ≈ 2 × layers × KV heads × head dim × bytes per element × context length × concurrencyHeadroom = total VRAM − weight VRAM − KV cache − runtime and communication buffers
Bytes per parameter is determined by numerical precision: roughly 1 byte for 8-bit quantization and roughly 2 bytes for half precision. The parallelism degree depends on how tensor parallelism and expert parallelism are combined. Note that quantization introduces precision loss, so a quality regression on your own business evaluation set should come before deployment, rather than relying on generic leaderboard results alone.
3. Context Length: The Underestimated VRAM Consumer
Long context is one of the headline features of this generation of models, but cache usage grows roughly linearly with context length, and grows faster once multiplied by concurrency. To put it in perspective: raising the context from a few thousand tokens to the million-token range can increase the cache footprint of a single request by two to three orders of magnitude. At that point the cache quickly surpasses the weights themselves and becomes the dominant VRAM consumer.
So “supporting very long context” and “serving high concurrency under very long context” are two entirely different engineering problems. The former can be validated with only a small amount of concurrency; the latter requires VRAM capacity, bandwidth, and cache management strategies to be in place at the same time. Common mitigations include paged cache management, prefix reuse (keeping a single copy of the cache for system prompts and shared documents), and tiering by request characteristics: routing long-context requests to a separate resource pool so they do not interfere with short requests.
4. Concurrency and Response Targets Determine the Configuration Shape
With the same weights and context length, serving 5 concurrent requests and serving 50 may require several times the VRAM and compute. Response targets matter just as much: offline batch processing can accept higher latency in exchange for throughput, while online interaction demands stable and controllable time-to-first-token and per-token output rate.
The practical recommendation is to quantify business targets first, for example the upper bound on time-to-first-token, the lower bound on per-request output rate, peak concurrency, and average daily request volume, and then work backward to the maximum batch size. Larger batches yield higher throughput, but VRAM and latency costs rise alongside, so there is an optimum determined by business tolerance rather than “bigger is always better.”
5. Single-Node Path Versus Long-Context Path
As a general engineering judgment, with 8-bit quantization a mainstream single-node eight-GPU configuration usually serves as a fairly clear starting reference, covering most online scenarios with moderate context and moderate concurrency. If full million-token context is a hard requirement, you need accelerators a tier higher in VRAM capacity and bandwidth, and you have to accept that the concurrency a single node can carry drops noticeably.
Specific models, VRAM capacities, and interconnect specifications should be based on information publicly disclosed by hardware and cloud providers; this article does not cite unconfirmed parameters. When deploying on the cloud, it is worth evaluating elastic resource pools on a container platform, models and data in object storage, and an operations loop built from logging, monitoring, and alerting, then determining final specifications through load testing rather than paper calculations.
6. An Actionable Rollout Process
- Define the scenario boundaries: context length distribution, peak concurrency, input-to-output ratio, latency and throughput targets.
- Estimate weight VRAM: calculate from total parameters and quantization precision, and reserve runtime and communication buffers.
- Estimate cache VRAM: calculate from the actual context distribution rather than the maximum, and evaluate the benefit of prefix reuse.
- Run small-scale load tests: increase concurrency gradually, and record time-to-first-token, output rate, VRAM utilization, and error rate.
- Run a quality regression: verify the precision changes introduced by quantization and parallelism strategies on the business evaluation set.
- Build elasticity and degradation strategies: queue, throttle, or switch to a smaller context window when peak load overflows, keeping the core path available.
7. Summary of Common Mistakes
- Estimating VRAM directly from activated parameters and ignoring that expert weights must stay resident.
- Sizing only for the maximum context and ignoring the actual length distribution of requests.
- Treating GPU count as an input rather than an output, and skipping the quantification of concurrency and latency targets.
- Looking only at generic benchmark scores instead of running both quality and performance validation on your own data.
Overall, local LLM deployment is a capacity planning problem to be solved: quantify business targets first, then account for weights and cache, and finally calibrate with load testing. Using the general capabilities of cloud platforms such as Baidu AI Cloud as the foundation, and combining resource pools, storage, and observability into a closed loop, is what lets a new model’s capabilities land reliably in production.
