Local Deployment of Large MoE Models on 8 GPUs: A Practical Guide to VRAM Planning

    This article explains why the total VRAM across 8 GPUs does not guarantee a feasible local deployment of large Mixture-of-Experts (MoE) models. Using a model with roughly 552B backbone parameters and 196B conditional memory parameters as an example, it breaks the memory budget into four separate items—backbone weights, conditional memory parameters, KV cache, and runtime workspace plus communication buffers—and shows how tensor parallelism (TP) and expert parallelism (EP) divide the work. It also covers interconnect topology, communication bottlenecks, capacity testing for context length and concurrency, and a deployment checklist for stable resource planning and tuning.

    1. The Starting Problem: Why “Enough Total VRAM” Does Not Mean “Deployable”

    For internal AI assistants, coding assistants, and model API services, placing a large-parameter Mixture-of-Experts (MoE) model on a single 8-GPU server is the most common on-premises route. When selecting hardware, many teams start with addition: sum the nominal VRAM of each card, and if the total exceeds the published model weight size, the plan is considered viable. In practice, however, three problems show up repeatedly: the model overflows during loading, it loads successfully but throughput is extremely low, or latency becomes uncontrollable as soon as concurrency rises.

    The reason is that the combined VRAM of 8 GPUs is not a unified shared memory with a single address space. It consists of 8 independent storage and compute units connected through limited-bandwidth interconnects. What actually determines whether the system runs stably comes down to five variables: how the backbone weights are partitioned and placed, where the conditional memory parameters reside, how experts are distributed across cards, what path and frequency inter-card communication takes, and the dynamic overhead introduced by context length and concurrency. This article uses an ultra-large MoE model with approximately 552B backbone parameters and 196B conditional memory parameters as the analysis target (with roughly 8B and 16B activated parameters per token in the Prefill and Decode stages, respectively), and presents a reusable framework for resource planning and tuning.

    2. How Model Structure Determines VRAM Planning

    2.1 Activated Parameters Are Not Weight Footprint

    The most commonly misread aspect of MoE models is treating “activated parameters per token” as the VRAM requirement. Activated parameters describe the subset of parameters that a single forward pass actually goes through; they determine compute and memory access volume. What VRAM must hold, however, is all expert weights that could possibly be routed to. Therefore, a 16B Decode activation scale does not mean that a dozen or so GB of VRAM is sufficient.

    2.2 Four Resource Categories Must Be Accounted for Separately

    The rigorous approach is to split the VRAM budget into four independent items:

    • Backbone weights: the shared parts such as attention, embeddings, and normalization, usually partitioned via tensor parallelism with high partitioning efficiency.
    • Conditional memory parameters (Engram-like structures): large in capacity but sparse in access. Whether they stay resident in VRAM, sit in host memory, or use tiered storage is the biggest swing factor in VRAM planning.
    • KV Cache: grows linearly with context length and concurrency, and is the only item determined by business workload rather than the model.
    • Runtime workspace and communication buffers: temporary operator tensors, memory pool fragmentation, and cross-card send/receive buffers. In practice, a considerable margin must be reserved here, and ignoring it is the most common cause of overflow.

    A published configuration once showed a VRAM budget of around 614GB as a planning reference for a specific loading approach. This illustrates that the same model can have very different budgets under different placement strategies and quantization methods, so the number should not be copied as a fixed constant.

    2.3 An Actionable Budget Illustration

    1. Per-card budget = Backbone weights / TP + Expert weights / EP share
    2. + KV Cache(context, concurrency, layers, heads, precision)
    3. + Activations and temporary workspace
    4. + Communication buffers
    5. Constraint: Per-card budget <= Per-card VRAM x safety factor (0.85~0.9 recommended)

    Taking 96GB and 72GB per-card specifications as examples, the former is more relaxed in weight placement and can keep more conditional memory parameters resident; the latter needs to offload the sparsely accessed portion to host memory and accept higher first-access latency.

    3. Parallelism Strategy: How TP and EP Divide the Work

    Tensor parallelism (TP) splits a single layer’s operators horizontally. It suits backbone weights and can significantly reduce per-card weight footprint, but every layer requires reduction communication, making it sensitive to inter-card bandwidth. It is generally recommended within a single machine over high-bandwidth interconnects, and the scale should not be expanded indefinitely.

    Expert parallelism (EP) distributes along the expert dimension. Its communication pattern is a sparse all-to-all: each token interacts with only a few experts, so total communication volume stays controllable. The core difficulty is load balancing—the card holding a popular expert becomes a hotspot while cold cards sit idle. A common combination in practice is “TP for the backbone, EP for the experts,” optionally layered with pipeline or data parallelism to improve overall utilization.

    Rules of thumb for setting priorities:

    1. If the backbone weights do not fit on a single card → increase TP first;
    2. If they fit but expert distribution is uneven with clear hotspots → adjust EP and the routing strategy first;
    3. If latency-sensitive (e.g., code completion) → keep TP scale controlled and reduce the number of reductions;
    4. If throughput is the priority (e.g., batch APIs) → raise concurrency and EP parallelism, and amortize communication cost through batching.

    4. Communication and Topology: The Underestimated Bottleneck

    Cross-card communication has two costs: bandwidth and latency. TP reductions are high-frequency, synchronous, and extremely latency-sensitive; EP all-to-all is low-frequency, batchable, and bandwidth-sensitive. If high-frequency communication is placed on a lower-bandwidth link, GPU utilization stays low for long periods, appearing as “all cards occupied, yet compute idle.”

    Recommended troubleshooting order: first confirm that the inter-card interconnect topology and NUMA affinity are correct, then check whether the parallel group partitioning aligns with the physical topology (keep the same TP group within a high-bandwidth domain as much as possible), and finally observe whether communication overlaps with computation. If conditional memory parameters need to be accessed across hosts, design them as an asynchronous, prefetchable path and keep them off the critical path.

    5. Context, Concurrency, and Capacity Testing

    KV Cache is the only item in capacity planning that changes linearly with business load. Planning must pin down two sets of numbers: the maximum context length and the target concurrency, then estimate the peak according to precision (for example, storing KV at lower precision). A stepwise stress test is recommended: fix concurrency and gradually extend context, then fix context and gradually increase concurrency, recording time-to-first-token, per-token latency, throughput, and peak VRAM for each, to find which dimension hits the ceiling first.

    6. Deployment Checklist

    • Are the four VRAM categories accounted for separately with sufficient runtime margin;
    • Does the placement strategy for conditional memory parameters match access frequency;
    • Does the TP/EP combination align with the inter-card topology;
    • Are hard limits set for context and concurrency, with a fallback/degradation strategy;
    • Is there continuous monitoring and alerting for VRAM, utilization, and communication wait time.

    When implementing in the cloud, you can combine a container platform for environment delivery, object storage to hold model files, and monitoring and alerting services to track VRAM and utilization metrics; relevant Baidu AI Cloud product categories can serve as a general capability reference. The overall conclusion is that the success of local deployment does not depend on the sum of nominal VRAM, but on whether resource decomposition is clear, whether the parallelism strategy matches the model structure, and whether the communication path is consistent with the topology.