Local Deployment of Large Models on 8 GPUs: Memory Planning and Resource Analysis

    This article explains why adding up nominal VRAM across eight GPUs is not a reliable way to decide whether a large model can run in production. It breaks down the structure of ultra-large MoE models, introduces a four-dimensional VRAM planning model covering backbone weights, conditional memory, KV Cache, and runtime buffers, and discusses how tensor parallelism and expert parallelism should be tuned on real server topologies. A practical deployment checklist is included.

    1. A Common Misconception: Enough VRAM Does Not Mean It Will Run

    For internal enterprise AI assistants, developer productivity tools, and model API gateways, an 8-GPU high-end server is a common starting configuration. After procurement, many teams simply add up the nominal VRAM of the eight cards, compare the total with the model weight size, conclude that the model “fits,” and declare the deployment feasible. This reasoning does not hold up in engineering practice.

    The sum of VRAM across eight GPUs is only an upper bound on capacity, not a unified, shared memory with a single address space. In a real deployment, stable throughput depends on three things: whether weights and experts are evenly distributed across the cards, whether inter-GPU communication becomes a bottleneck, and whether enough headroom is left to absorb concurrency spikes. Capacity is a necessary condition; balance and communication are what determine efficiency.

    2. Structural Characteristics of Ultra-Large MoE Models

    Take a common class of ultra-large mixture-of-experts (MoE) models in the industry. Their parameters usually fall into two parts: the backbone network parameters, on the order of hundreds of billions, and conditional memory parameters that store historical information patterns retrievable on demand, also on the order of hundreds of billions.

    The most critical characteristic of such models is activation sparsity. During the prefill stage, the compute path for each generated token passes through only about ten billion parameters. During the decode stage, single-token activation rises to somewhere between ten and twenty billion parameters in order to preserve quality and context consistency. This order-of-magnitude difference means the two workloads have completely different resource profiles: prefill is compute-intensive and aims for high compute utilization, while decode is memory-access-intensive and aims for VRAM bandwidth and low latency.

    It must be emphasized that the activated parameter count only describes the width of the compute path; it does not mean VRAM only needs to hold that portion of the weights. All backbone weights and conditional memory parameters must reside in VRAM or in a fast-accessible storage tier. The inactive parts simply do not participate in the current matrix operations. Treating the activation count as the VRAM budget is the most common order-of-magnitude mistake in resource planning.

    3. A Four-Dimensional Resource Planning Model

    The rigorous approach is to break VRAM demand into four independent dimensions, estimate each one, and then add headroom.

    1. Backbone weights. Estimated as parameter count multiplied by bytes per parameter, typically in the hundreds of GB under a mixed-precision implementation. Lower-bit quantization can compress this significantly, but it introduces accuracy loss and dequantization overhead, which must be validated on an evaluation set.

    2. Conditional memory access space. These parameters do not always reside entirely in VRAM; they can be placed in host memory or high-speed storage and swapped in on demand. The cost is access latency, so hit rate and swap-in granularity must be evaluated to avoid blocking the decode stage on memory access.

    3. KV Cache. It is roughly proportional to concurrency, context length, number of layers, and number of attention heads, and it is the item most likely to get out of control during load testing. Planning should produce a two-dimensional table over concurrency and context length rather than a single number.

    4. Runtime workspace and communication buffers. This includes temporary operator tensors, sampling and scheduling overhead, and the send/receive buffers for inter-GPU collective communication. This item is often overlooked and scales up quickly under high concurrency.

    A schematic estimation logic can be written as:

    1. def estimate_vram(layers, kv_heads, head_dim,
    2. ctx_len, concurrency, bytes_per_elem,
    3. weight_bytes, engram_bytes, runtime_ratio=0.15):
    4. kv_per_seq = 2 * layers * kv_heads * head_dim * ctx_len * bytes_per_elem
    5. kv_cache = kv_per_seq * concurrency
    6. base = weight_bytes + engram_bytes + kv_cache
    7. return base * (1 + runtime_ratio)

    Note that public materials have cited figures of roughly 600-plus GB as a VRAM planning reference for a specific loading approach. Such numbers only hold under the corresponding placement strategy, quantization scheme, and concurrency settings, and should not be treated as a general baseline.

    4. Parallelism Strategy: Tensor Parallelism and Expert Parallelism

    Tensor parallelism (TP) splits a single large matrix across cards by rows or columns. It suits the larger fully connected and attention projection layers in the backbone and reduces per-layer latency. Its cost is that every layer requires a cross-card reduction, making it sensitive to inter-GPU interconnect bandwidth; its value generally should not exceed the scale of the high-speed interconnect domain within a single machine.

    Expert parallelism (EP) targets the expert networks of an MoE model by distributing different experts across devices. Since each token activates only a few experts, routing decisions and cross-card data exchange become the main variables. Uneven expert distribution overloads a few cards while others idle, so capacity factors and load-balancing strategies are needed.

    The two can be combined, but their values must match the inference framework’s implementation, the model structure, and the server topology. A practical order of progression is to first fix TP within the single-machine interconnect domain, then spread experts with EP, and finally fine-tune the ratio of the two through load testing while watching for inflection points in throughput and tail latency.

    5. Deployment Checklist

    • Validate functional correctness on one and two GPUs before scaling to eight, so implementation defects are not mistaken for insufficient resources.
    • Load test with the length distribution of real business text, not synthetic data of uniform length.
    • Set an upper limit and a rejection policy for KV Cache so long-context requests do not bring down the whole service.
    • Put weight placement, quantization scheme, and concurrency limits under version control to guarantee reproducibility.
    • If using cloud resources, elastic scaling and observability can be built on general capabilities such as container platforms, object storage, logging services, and monitoring and alerting. Model files and configurations are distributed through object storage, and runtime metrics are fed into the monitoring and alerting system.

    In summary, the success of an 8-GPU local deployment does not depend on the sum of nominal VRAM. It depends on separately accounting for the four resource dimensions, correctly understanding activation sparsity, and tuning TP and EP on the real topology. Only when these three things are done solidly can a predictable inference service be delivered reliably on the same hardware.