Deploying Large MoE Models on 8 GPUs: Memory Planning and Parallelism Strategies

    This article explains why having enough total VRAM does not guarantee a feasible 8-GPU deployment of ultra-large MoE models. It breaks GPU memory into four separate budgets, compares tensor parallelism (TP) and expert parallelism (EP), discusses placing conditional memory (Engram) in host memory, and outlines a practical workflow for capacity and concurrency planning. Readers will learn how to estimate resource usage, choose parallelism settings, and build a repeatable deployment baseline.

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

    For internal AI assistants, coding assistants, and model API services, deploying ultra-large mixture-of-experts (MoE) models locally has become a common requirement. During model selection, many teams start by adding up the nominal VRAM: 8 high-end GPUs, each with tens of GB, which seems large enough to hold a model with hundreds of billions of parameters. In practice, however, this additive thinking often leads to failed deployments or performance far below expectations.

    There are three reasons. First, the VRAM across 8 GPUs consists of 8 independent address spaces, not one unified shared memory pool; any cross-GPU access requires explicit communication. Second, model memory usage is not determined solely by the “activated parameters per token”—weights, conditional memory, cache, and runtime workspace are four separate budgets. Third, even if the capacity is just enough, whether weight distribution is balanced, whether communication is efficient, and whether data placement matches the topology determine whether the system can achieve usable latency and throughput.

    This article uses the deployment of an ultra-large MoE model with roughly 552B backbone parameters and 196B conditional memory parameters on an 8-GPU workstation-class Blackwell architecture GPU as the discussion context, and presents a reusable planning framework.

    2. Model Structure Determines the Resource Profile

    2.1 Activated Parameters vs. Weight Footprint

    This type of model uses an MoE architecture with about 552B backbone parameters and another ~196B conditional memory (Engram) parameters. During the Prefill stage, it activates about 8B parameters per token; during Decode, about 16B. The most easily misread point here is that activated parameters describe the width of the compute path, not the upper bound of memory usage.

    The reason is that all expert weights of an MoE model must stay resident in VRAM or host memory, ready to be hit by routing at any time; the inactive portion simply does not participate in the current matrix multiplication and does not free up space. By analogy, activated parameters determine “how much data is moved per operation,” while total weights determine “how large the warehouse must be.”

    2.2 Four-Part Memory Budget

    Rigorous planning should split memory into four parts:

    1. Backbone weights: attention layers, embedding layers, normalization layers, routing gates, etc., sized according to precision (FP8/BF16/mixed).
    2. Conditional memory access space: if Engram is held in VRAM, a full access region must be reserved; if placed in host memory, the VRAM budget decreases but PCIe access cost is introduced.
    3. KV Cache: proportional to context length, number of concurrent requests, number of layers, and number of KV heads; it is the main growth item in long-context scenarios.
    4. Runtime workspace and communication buffers: temporary operator tensors, AllReduce/All-to-All buffers, and fragmented space reserved by the framework.

    A rough capacity estimate can be written as:

    1. def estimate(weights_gb, engram_gb, layers, kv_heads, head_dim,
    2. ctx_len, concurrency, bytes_per_elem, runtime_overhead=0.15):
    3. kv_per_seq = 2 * layers * kv_heads * head_dim * ctx_len * bytes_per_elem
    4. kv_total = kv_per_seq * concurrency
    5. base = weights_gb + engram_gb + kv_total + runtime_overhead * weights_gb
    6. return {"kv_gb": kv_total / 1e9, "total_gb": base}

    Public configurations have shown a memory budget of about 614GB as a planning reference under a certain loading method, but this is just a single point under specific conditions; the actual value varies significantly with Engram placement, quantization method, context length, and concurrency.

    3. TP and EP: Division of Labor and Combination of Two Parallelism Strategies

    3.1 Tensor Parallelism (TP)

    TP splits the large matrices inside a single layer across multiple GPUs by row or column. Each GPU holds a weight shard and processes part of the intermediate results, which are then merged via AllReduce. The advantage is that it significantly reduces per-GPU weight and compute pressure, making it suitable for dense large layers such as attention and feed-forward. The cost is that synchronization is required at every layer, communication frequency is high, and it is sensitive to inter-GPU bandwidth; therefore, the TP degree usually should not exceed the number of GPUs within a single machine’s high-speed interconnect.

    3.2 Expert Parallelism (EP)

    EP targets the MoE expert networks by placing different experts on different devices. Since each token hits only a few experts, routing results determine the actual data flow, and All-to-All exchange becomes the critical path. The benefit of EP is that expert capacity can scale with the number of GPUs; the risk is load imbalance—the GPU hosting popular experts becomes a bottleneck while GPUs with cold experts idle.

    3.3 Combined Strategy

    TP and EP can be stacked. A common approach is to use TP for dense layers within a node and EP for expert layers, keeping TP groups within the same high-speed interconnect domain. The values must match three factors: inference framework support, model implementation details, and server topology; do not copy others’ configurations. A simplified decision logic:

    1. if a single GPU can hold the dense layer shard and inter-GPU bandwidth is sufficient: increase TP
    2. elif the number of experts is far greater than the number of GPUs and routing distribution is relatively even: increase EP
    3. else: prioritize reducing context/concurrency, or switch to host memory for conditional memory

    4. Placing Conditional Memory: From a VRAM Problem to a Memory Architecture Problem

    Placing Engram in host memory is a common trade-off: more VRAM is left for backbone weights and runtime cache, reducing per-GPU pressure. But the cost does not disappear; it shifts to the CPU side, and the evaluation focus expands to: whether host memory capacity is sufficient, whether memory bandwidth can support the access frequency, whether NUMA distribution under a dual-socket CPU overloads one path, whether PCIe link width and topology become bottlenecks, and whether cache and prefetch strategies are effective.

    For integration and deployment engineers, the configuration checklist should not only list the GPU model but also verify: whether the number of memory sticks and channel population are balanced, which CPU and which PCIe channel each GPU is attached to, whether there is QPI/UPI traversal across CPUs, and whether the CPU/GPU affinity of the inference process is correctly bound.

    1. # Example: view the topology between GPUs and NICs/storage
    2. nvidia-smi topo -m
    3. # Example: bind the process to specified CPUs and GPUs to avoid cross-NUMA access
    4. numactl --cpunodebind=0 --membind=0 <inference process command>

    5. Scenario-Oriented Capacity and Concurrency Planning

    Different workloads stress the system in different directions: internal knowledge base Q&A favors long context and low concurrency, with KV Cache as the main cost; coding assistance involves medium context and bursty concurrency, sensitive to first-token latency; external API services require stable throughput and isolation. During planning, it is recommended to first determine the target context length and concurrency limit, work backward to derive the KV Cache, and then decide how to allocate the remaining memory between weights and conditional memory.

    The practical path can be summarized in four steps: first, test whether a single GPU’s weight shard fits; then, stress-test first-token latency and throughput under different TP/EP combinations; next, observe whether expert load is skewed; finally, lock in affinity and topology configurations to form a repeatable deployment baseline. At the same 8-GPU scale, differences in topology and data placement can lead to several-fold differences in final performance—this is precisely the value of engineering deployment.