Local Deployment of Large MoE Models on 8 GPUs: Memory Planning and Parallelism Strategies

    This article explains why total VRAM capacity alone does not guarantee a feasible local deployment of large Mixture-of-Experts (MoE) models on 8 GPUs. It breaks capacity planning into four parts—backbone weights, conditional memory, KV cache, and runtime buffers—shows how to size each one, and compares tensor parallelism (TP) with expert parallelism (EP), including how to combine them. It also outlines planning approaches for two 8-GPU Blackwell platforms and a server integration checklist covering memory population, PCIe topology, affinity, interconnect bandwidth, and observability.

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

    When deploying very large Mixture-of-Experts (MoE) models locally, a common mistake is to focus only on the nominal VRAM capacity: add up the memory of 8 GPUs, get a large number, and assume the model will fit. The real engineering picture is more complicated.

    First, memory across multiple GPUs is not a single unified address space. Unless there is explicit support for interconnect and unified memory, each GPU can only directly access its own local VRAM, and cross-GPU data must be moved over high-speed interconnects or through the host. Second, the memory footprint of an MoE model is determined by the weights of all experts, while the compute is determined by the few experts activated per token; the two differ by orders of magnitude. For example, in one class of very large MoE designs, the backbone has about 552B parameters, with roughly 196B additional conditional memory parameters, while the number of activated parameters per token is about 8B during Prefill and 16B during Decode. A small number of activated parameters only means the compute path of a single forward pass is short; it certainly does not mean you only need to provision VRAM for 8B/16B.

    Capacity planning therefore has to be split into four parts that are independent yet interdependent:

    1. Backbone weights: resident in VRAM; determine whether the model can start at all.
    2. Conditional memory access space: can stay in VRAM or be offloaded to host memory; determines the memory architecture.
    3. KV Cache: grows linearly with context length and concurrency; determines how many users can be served.
    4. Runtime workspace and communication buffers: activation tensors, temporary operator outputs, and parallel communication send/receive areas; determine whether peak usage overflows.

    Public materials have mentioned a VRAM budget of about 614GB as a planning reference for a certain mixed-precision loading scheme. The value of this number is not as a hard standard, but as an indication of scale: the VRAM needed for a full deployment is far larger than what the activated parameters suggest, and it varies significantly with the quantization scheme, where conditional memory is placed, and service parameters.

    2. How to Size the Four Resource Categories

    1. Backbone weights: decide precision first, then partitioning

    Weight usage ≈ number of parameters × bytes per parameter. In mixed-precision implementations, different layers may use different bit widths, so the actual value must be measured according to implementation details rather than estimated with a single coefficient. Once the total is known, decide how to partition it across GPUs: finer partitioning reduces per-GPU pressure but increases synchronization overhead and implementation complexity.

    2. Conditional memory: the tradeoff between VRAM and host memory

    Placing conditional memory in host memory frees up valuable VRAM for backbone weights and cache, at the cost of higher access latency and greater demands on CPU memory capacity and bandwidth. The evaluation then expands from “is VRAM enough” to: total memory capacity, how memory channels are populated, NUMA node placement, PCIe link width and generation, and whether caching and prefetching strategies are friendly.

    3. KV Cache: converting capacity into concurrency

    KV Cache usage depends on the number of layers, attention head dimension, context length, and number of concurrent requests. Engineering practice should define a clear upper bound:

    1. KV_total ≈ 2 × layers × kv_heads × head_dim × bytes_per_elem
    2. × max_seq_len × concurrent_requests

    A more robust approach in practice is to set max_seq_len and the maximum concurrency, then work backward to the VRAM that must be reserved, leaving headroom for burst traffic. If the headroom is insufficient, prefer limiting per-request context, enabling paged cache management, or lowering the concurrency limit rather than blindly adding GPUs.

    4. Runtime buffers: the most easily overlooked source of overflow

    Communication buffers, operator workspaces, and intermediate sampling and decoding results all stack up at peak time. A common practice is to reserve a certain percentage of the weight footprint (for example, 10%–20%) as runtime space, and to observe peaks rather than averages during load testing.

    3. TP and EP: Roles and Combinations of Two Parallelism Strategies

    Tensor parallelism (TP) splits the large matrix operations inside a single layer horizontally across multiple GPUs. It suits wide linear layers and attention projections. The benefit is lower per-GPU weight and compute pressure; the cost is that each layer may require cross-GPU reduction, with frequent communication on the critical path, making it sensitive to inter-GPU bandwidth.

    Expert parallelism (EP) targets the expert networks of MoE models by placing different experts on different devices. Because each token only goes through some experts, the actual load depends on routing distribution: routing skew can overload individual GPUs while others idle. Cross-GPU All-to-All exchange therefore becomes a key variable for throughput.

    The two can be combined, but the values must be consistent with the inference framework implementation, the model layer structure, and the server topology. A practical order of decision is:

    • If inter-GPU bandwidth is ample and the implementation is mature, prioritize TP to lower the per-GPU threshold;
    • If there are many experts and routing is relatively balanced, use EP to improve memory utilization and scalability;
    • When the topology has cross-node bottlenecks, avoid letting high-frequency communication dimensions cross slow links.

    Illustrative launch parameters (conceptual only, not a specific product interface):

    1. # Illustrative combination of tensor and expert parallelism
    2. serve --model /models/moe-large \
    3. --tensor-parallel-size 4 \
    4. --expert-parallel-size 2 \
    5. --max-model-len 32768 \
    6. --gpu-memory-utilization 0.90

    4. Planning Approaches for Two 8-GPU Blackwell Platforms

    For enterprise internal AI assistants, development support, and model API services, two 8-GPU platforms can be compared: one with 96GB per GPU and about 768GB per node; another with 72GB per GPU and about 576GB per node.

    • 96GB platform: relatively generous VRAM, allowing backbone weights and some conditional memory to stay resident at the same time, with more room reserved for KV Cache; suitable for longer contexts and higher concurrency.
    • 72GB platform: tighter VRAM, usually requiring conditional memory to be offloaded to host memory and stricter limits on context and concurrency; CPU memory capacity, bandwidth, and NUMA distribution become hard constraints.

    Note that the above is only a directional judgment at the capacity level. With the same number of GPUs, whether weight and expert allocation is balanced and whether communication is efficient often determines actual latency and throughput more than total capacity does.

    5. Server Integration Checklist: Look Beyond the GPU Model

    • Memory distribution: whether memory is symmetrically populated under dual-socket CPUs, avoiding halving per-node bandwidth.
    • PCIe topology: which CPU the GPUs, NICs, and storage controllers are attached to, and whether link width is downgraded.
    • Affinity settings: CPU/GPU/memory affinity binding for inference processes to reduce cross-NUMA access.
    • Interconnect capability: measured completeness and bandwidth of inter-GPU links, not just nominal specs.
    • Observability: use monitoring, alerting, and logging services to collect metrics such as peak VRAM, routing skew, and queue wait time.
    1. Define business metrics: context length, concurrency, time to first token, and output rate.
    2. Build a capacity table for the four resource categories, marking “resident in VRAM / offloaded to host memory”.
    3. Choose a TP/EP combination, validate correctness at low concurrency first, then increase load gradually.
    4. Use load testing to observe peak VRAM and routing distribution, and adjust parallelism and cache limits accordingly.
    5. Lock in topology and affinity settings, and include them in delivery documentation and inspection checklists.

    In cloud or hybrid environments, model services can run on a container platform, with object storage distributing weights and message queues smoothing request spikes, forming an elastically scaling inference service; local deployment emphasizes topology determinism and resource reservation. The resource planning logic is the same for both paths; the difference lies in the tradeoff between elasticity and determinism.