Local Deployment of Large Language Models on 8 GPUs: A Practical Guide to VRAM Planning
This article explains why total VRAM capacity alone is a misleading metric for local LLM deployment, and breaks memory planning into four layers: backbone weights, conditional memory access space, KV cache, and runtime/communication buffers. It compares tensor parallelism (TP) and expert parallelism (EP), shows how context length and concurrency multiply KV cache pressure, and outlines a step-by-step sizing workflow for two 8-GPU server configurations (768GB and 576GB total VRAM), including capacity watermark thresholds and hybrid local-cloud options.
1. Why “Is Total VRAM Enough?” Is the Wrong Question
In three common scenarios—internal enterprise assistants, coding assistants for R&D teams, and model API services—the first question during hardware selection is usually “Can these cards fit the model?” But in real deployments, stability is never determined by total VRAM alone. It is the combined result of five variables: placement strategy, parallelism partitioning, inter-GPU communication patterns, context length, and concurrency scale. The same hardware can either trigger frequent out-of-memory errors and request queuing, or sustain full throughput with headroom, depending on configuration.
One frequent misconception needs clearing up first: the activated parameter count describes the subset of parameters actually triggered during forward computation. It determines compute and memory-access paths, not the size of the weights that stay resident in VRAM. Take a certain open-source MoE (Mixture of Experts) model with roughly 552B backbone parameters plus about 196B conditional memory (Engram) parameters. During Prefill and Decode, the activated parameters per token are about 8B and 16B respectively. Estimating VRAM based only on the activated portion yields a dangerously optimistic number—and the system crashes on day one.
This article uses two common single-node 8-GPU server configurations as references. Configuration A: 8×96GB-class Blackwell architecture inference cards (768GB total). Configuration B: 8×72GB-class cards of the same architecture (576GB total). The total VRAM differs by less than 25%, yet the context length and concurrency they can support may differ by several times. The reason lies in the four-layer resource model broken down below.
2. The Four-Layer VRAM Model: Turning “Does It Fit?” into a Calculation
A complete deployment plan must account for four resource categories separately. Missing any one of them distorts capacity estimates.
Layer 1: Backbone weights. Under mixed-precision loading, weight memory is roughly the parameter count multiplied by bytes per parameter. A public configuration has cited a VRAM budget of about 614GB as a planning reference for a specific loading method. The significance of this number: it is already in the “infeasible zone” relative to the 576GB physical limit on Configuration B, meaning quantization or a different placement strategy is mandatory—tuning parameters alone cannot squeeze it in.
Layer 2: Conditional memory access space. Engram-like structures are typically not fully resident but retrieved on demand. This requires reserving space for “index + hit-page cache + miss fallback buffer.” This layer is the most commonly overlooked and the most likely source of jitter under long-context, high-concurrency workloads.
Layer 3: KV Cache. Its size can be approximated as:
KV_bytes ≈ 2 × layers × kv_heads × head_dim × dtype_bytes × ctx_len × batch
The factor of 2 accounts for the Key and Value tensors. Note that ctx_len and batch are multiplicative: doubling concurrency and doubling context length exert equivalent pressure on VRAM.
Layer 4: Runtime workspace and communication buffers. This includes temporary operator tensors, sampling and decoding buffers, and send/receive buffers required for parallel communication. As a rule of thumb, reserve 10%–15% of total VRAM. The lower the inter-GPU interconnect bandwidth, the more communication buffers and streams are needed.
3. TP and EP: Division of Labor and Boundaries
Tensor Parallelism (TP) partitions weight matrices within a single layer. It solves the problem of “backbone weights not fitting on one GPU,” with the advantages of regular communication patterns and even VRAM distribution. The cost is that every layer’s forward pass requires reduction communication, making it sensitive to inter-GPU bandwidth. Within a single 8-GPU node, TP is typically set to 2, 4, or 8—values that evenly divide the number of attention heads.
Expert Parallelism (EP) distributes experts across GPUs so each card holds only a subset of expert weights. The advantage is significantly reduced per-GPU weight pressure and higher expert throughput. The cost is all-to-all communication from token routing; under load imbalance, “hot experts” create hotspot GPUs.
In practice, the two are usually combined: a smaller TP degree ensures intra-layer partitioning and even memory distribution, while a larger EP degree handles the expert scale. Illustrative configuration logic:
# Pseudocode: parallelism degree and VRAM accountingtotal_mem = 8 * 96 # GBweight_mem = params_b * bytes_per_param / 1e9engram_mem = engram_index + engram_page_cacheruntime_ratio = 0.12for tp in (2, 4, 8):for ep in (1, 2, 4, 8):if tp * ep > 8:continueper_gpu = weight_mem / tp + engram_mem / 8kv_budget = total_mem * (1 - runtime_ratio) - per_gpumax_ctx_batch = kv_budget / (2 * layers * kv_heads * head_dim * 2 / 1e9)print(tp, ep, round(per_gpu, 1), round(max_ctx_batch, 1))
The selection criteria can be summarized in three rules: when per-GPU weight usage exceeds 70% of physical VRAM, increase TP first; when expert hotspots keep individual GPUs at sustained high load, adjust EP and routing strategy first; when interconnect bandwidth is insufficient, avoid maxing out both TP and EP simultaneously.
4. Context and Concurrency: The Real Capacity Amplifiers
In enterprise scenarios, long-document summarization and repository-level code Q&A push context into the tens of thousands of tokens. Since KV Cache scales linearly with both ctx_len and batch, “double the context plus double the concurrency” means 4× the pressure. Viable mitigations include: paged KV management to reduce fragmentation, prefix caching to reuse system prompts and shared context, early release of cache for completed requests, and dedicated queues with stricter concurrency caps for long-context requests.
Capacity watermark management should follow a three-tier scheme: normal watermark no higher than 70%; the 70%–85% elastic band triggers queuing and rate limiting; above 85%, reject new requests and alert. Combined with monitoring, alerting, and log services that collect per-GPU VRAM, routing skew, and queue duration metrics, “occasional overflow” becomes a predictable problem.
5. Implementation Workflow and Trade-offs Between the Two Configurations
Recommended sizing order: determine precision and weight budget → select TP/EP combination → subtract runtime and communication reserves → derive available KV budget → validate against target context and concurrency → calibrate with load testing.
On the 768GB-class configuration, mixed precision can preserve higher concurrency and longer context, making it suitable as a unified model API service platform. On the 576GB-class configuration, a more realistic approach is to introduce weight quantization, reduce the resident ratio of conditional memory, and route long-context requests to a separate resource pool. If an organization lacks in-house build and tuning capability, it can also evaluate cloud-based general container platforms, object storage, message queues, and monitoring/alerting services to host the elastic portion, forming a “stable local baseline + cloud elasticity” hybrid architecture.
