VRAM Planning for Local 8-GPU Deployment of Large MoE Models

    This article explains why total VRAM capacity alone does not determine whether a large MoE model can be deployed on an 8-GPU server. It breaks memory demand into four parts—backbone weights, conditional memory access space, KV cache, and runtime workspace—then compares tensor parallelism (TP) and expert parallelism (EP), covers offloading conditional memory to host memory, and gives practical guidance for three workload types along with a pre-launch acceptance checklist.

    1. Why “Enough Total VRAM” Does Not Mean “Deployable”

    For internal enterprise AI assistants, coding assistants, and self-hosted model API services, running a large-parameter Mixture-of-Experts (MoE) model on a single 8-GPU server has shifted from “can it start at all” to “does it stay stable, and what do we do when concurrency plateaus.” Many sizing discussions start with the same arithmetic: multiply nominal VRAM per card by the number of cards and check whether the result exceeds the weight footprint. That shortcut roughly works for small dense models, but on very large MoE models it often leads to the wrong conclusion.

    There are three reasons. First, the 8 cards expose 8 separate address spaces, not one unified memory pool, so any cross-GPU access requires explicit communication. Second, a MoE model’s “activated parameters” are far smaller than its “total parameters,” yet all expert weights must still reside somewhere—the only choice is the tier: VRAM, host memory, or even slower storage. Third, inference is not an instantaneous event: Prefill and Decode have completely different demand profiles for compute, bandwidth, and cache, and a static capacity calculation cannot reflect real runtime behavior.

    This article therefore uses a class of very large MoE models with roughly 500 billion backbone parameters plus roughly 200 billion conditional memory parameters as the analysis target (with per-token activated parameters on the order of about 8B in Prefill and 16B in Decode). It discusses how to allocate resources, choose a parallelism strategy, and verify whole-machine topology under two common 8-GPU professional inference card configurations: 96GB-class per card and 72GB-class per card.

    2. Plan the Model as Four Separate Resource Pools

    The right approach is not to compute a single total, but to split VRAM and memory demand into four parts that are independent yet constrain each other.

    1. Backbone weights. This is the core parameter set, including the attention blocks, routing gates, and all distributed experts. It determines the “minimum loadable footprint” and is usually the main consumer of VRAM.

    2. Conditional memory access space. These conditional memory parameters (Engram-like structures) are not always resident in VRAM in some implementations; they live in host memory and are accessed on demand. This sets the lower bound on host memory capacity and the pressure on access bandwidth.

    3. KV cache. It grows linearly with context length and the number of concurrent requests, and it is the only major item determined by serving parameters rather than the model file. Long-document summarization and multi-turn chat can differ by an order of magnitude in their requirements.

    4. Runtime workspace and communication buffers. This includes temporary operator tensors, intermediate sampling and decoding results, and the send/receive buffers required for parallel communication. It is often overlooked, but under high concurrency it can significantly raise peak usage.

    A rough but practical estimation order is: first determine the backbone weight footprint at the target precision, then use the remaining VRAM for KV cache and workspace, and finally absorb the conditional memory portion with host memory and bandwidth. Public material has shown an approach that uses about 614GB as a VRAM planning reference for a specific loading scheme, which indicates that the industry does have a route that “packs most parameters into VRAM”; but it depends heavily on precision settings, sharding scheme, and parallel degree, and should not be copied as a general conclusion.

    A schematic capacity calculation can be written as the following pseudocode for quick screening during selection:

    1. per_gpu_budget = gpu_memory * 0.90 # reserve 10% for driver and fragmentation
    2. weights_per_gpu = backbone_bytes / tp_degree
    3. expert_per_gpu = expert_bytes / ep_degree
    4. runtime_reserve = base_workspace + comm_buffer(concurrency)
    5. kv_budget = per_gpu_budget - weights_per_gpu - expert_per_gpu - runtime_reserve
    6. max_tokens = kv_budget / bytes_per_token(layers, kv_heads, precision)

    If max_tokens is smaller than the business requirement of “context length × concurrency,” this configuration does not hold at the current parallel degree, and you need to adjust the parallel degree, the precision, or offload part of the state.

    3. TP and EP: Division of Labor and Cost

    Tensor parallelism (TP) splits the tensor dimensions inside a single operator horizontally so multiple cards complete the same layer’s computation together. Its advantage is that it spreads the weights and compute of large layers, and it is especially effective for attention and dense feed-forward layers; the cost is a reduction or all-gather per layer, high communication frequency, and sensitivity to inter-GPU bandwidth. In practice, TP degree is usually kept within a single 8-GPU machine and relies strongly on high-bandwidth interconnect.

    Expert parallelism (EP) targets the MoE routing structure by placing different experts on different devices. Because each token activates only a few experts, EP can significantly reduce the expert footprint each card must hold, but it introduces routing exchange: tokens are sent to the card holding their selected expert and gathered back after computation. When routing is uneven, individual cards become hotspots and overall throughput is determined by the slowest card.

    The two can be combined, commonly as “TP for the dense part, EP for the expert part,” but the specific values must match the inference framework’s implementation, the model file’s layer layout, and the server topology. A practical rule of thumb:

    • Ample inter-GPU bandwidth and a symmetric single-machine topology: increase TP first to reduce cross-machine communication.
    • Many experts, medium per-expert size, relatively balanced routing: increase EP to lower per-card weight usage.
    • Clear expert hotspots: do not blindly add EP; first check the routing policy and capacity factor settings.

    Note that small activated parameters do not mean small compute. Prefill is compute-intensive and Decode is memory-access-intensive; their bottlenecks differ, and so do the benefits of a parallelism strategy for each. When tuning, measure time-to-first-token and per-token latency for both phases separately rather than looking at a single average throughput number.

    4. Offloading Conditional Memory: Moving Pressure from VRAM to the Host

    Placing conditional memory in host memory is a common trade-off: VRAM is freed for backbone weights, KV cache, and workspace, at the cost of every access traversing the PCIe link. The “cost disappears” only on paper, so the evaluation focus shifts to the CPU side:

    • Memory capacity: enough to hold the full conditional memory plus runtime headroom.
    • Memory bandwidth: if the access pattern is random, effective bandwidth can be far below the nominal value.
    • NUMA distribution: on a dual-socket CPU, memory is split into two domains and cross-domain access latency rises noticeably.
    • PCIe topology: which root complex each card hangs under, and whether it is on the same side as the memory domain it uses, directly determines effective throughput.
    • Cache and prefetch policy: whether frequently accessed conditional memory fragments can be kept in a closer tier.

    For server integration and deployment engineers, the configuration checklist cannot list only the GPU model. At minimum, verify the DIMM population under a dual-socket CPU (whether every channel is evenly populated), the PCIe slot and link width for each GPU, the relative position of GPUs and NIC/storage cards, and the CPU/GPU affinity binding of the inference process.

    1. # Check the relative PCIe topology position of GPUs and NICs (illustrative)
    2. lscpu | grep -i numa
    3. lspci -tv | less
    4. # Bind the process to a specific NUMA domain and GPU (illustrative; fill in masks per measured topology)
    5. numactl --cpunodebind=0 --membind=0 <inference process launch command>

    Affinity configuration is a “low effort, high return” tuning item: on the same hardware, correct versus incorrect binding often makes a larger throughput difference in long-context scenarios than moving up one parallel degree.

    5. Practical Recommendations for Three Workload Types

    Internal enterprise AI assistant. Characterized by unstable concurrency, medium context, and sensitivity to time-to-first-token. Set TP to a mid-to-high degree to reduce Prefill latency, add 30% headroom to the KV cache reservation for peak concurrency, and offload conditional memory bound to the NUMA domain on the same side as the GPU.

    Coding and intelligent programming tools. Characterized by long context, dense requests, and short output per request. Here KV cache is the main variable; prioritize the cache budget, shorten the maximum context limit if necessary to trade for concurrency, and raise EP moderately to free VRAM.

    Model API service. Characterized by clear SLAs, multi-tenant isolation, and elasticity. Make capacity planning a two-dimensional “context length—concurrency” table that states the ceiling each configuration tier can carry; also integrate general monitoring, alerting, and logging services to continuously observe VRAM usage, cache hit rate, and per-token latency, and drive scaling with data rather than adding cards on a hunch.

    6. Common Pitfalls and an Acceptance Checklist

    Pitfall 1: judging feasibility by total VRAM. It ignores separate address spaces and communication overhead.

    Pitfall 2: treating activated parameters as the weight footprint. It leads to severely underestimating load requirements.

    Pitfall 3: tuning only the parallel degree without looking at topology. Cross-NUMA and cross-root-complex access eats the theoretical gains.

    Pitfall 4: accepting on a single average metric. Prefill and Decode, single concurrency and peak concurrency, should be accepted separately.

    The pre-launch acceptance checklist can be fixed at five items: cold-start load time, single-request time-to-first-token, per-token latency under peak concurrency, peak VRAM usage at full long-context load, and measured host memory and PCIe link bandwidth. Only when all five retain headroom is this 8-GPU configuration truly deliverable; if any item is at the ceiling, optimize at the parameter and topology level before scaling out.