Local Deployment of Large MoE Models on 8 GPUs: Resource Planning Explained

    This article explains why adding up the nominal VRAM of eight GPUs does not guarantee a deployable configuration for large MoE models. It breaks down the four coupled dimensions that determine feasibility, clarifies the difference between activated parameters and memory footprint, compares tensor parallelism and expert parallelism along with their communication costs, and covers conditional memory placement, server topology checks, and KV cache capacity planning for context length and concurrency.

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

    For internal enterprise AI assistants, developer tooling, and model API services, deploying very large Mixture-of-Experts (MoE) models on-premises has become a common choice. The most frequent mistake during selection is to add up the nominal VRAM of eight GPUs and conclude that sufficient capacity means the model will run.

    In reality, the VRAM on eight accelerators consists of eight independent address spaces that can only exchange data through interconnect links of limited bandwidth. Whether a model runs efficiently depends on four coupled dimensions:

    1. How the backbone weights are partitioned and placed;
    2. Whether conditional memory parameters (the Engram-style structures in the original design) reside in VRAM or host memory;
    3. How MoE experts are distributed across devices and whether routing is balanced;
    4. The cache and communication pressure created by context length and concurrency.

    If any one of these dimensions is out of balance, a configuration that “fits in theory” will show high latency or low throughput in real serving.

    2. Model Structure Determines the Resource Profile

    Take an MoE model with roughly 552B backbone parameters and 196B conditional memory parameters. It activates about 8B parameters per token during Prefill and about 16B during Decode. A common misunderstanding needs clearing up here: the activated parameter count describes the subset of parameters that a single forward pass actually touches, not the VRAM footprint.

    The reason is that all weights must stay resident in a storage tier that can be accessed quickly, regardless of whether a given expert is activated. Otherwise, parameters would have to be fetched from a remote location for every token, and latency would be unacceptable. A complete deployment therefore requires planning four resource categories separately:

    • Backbone weight region: the largest and most frequently accessed, so prioritize keeping it close to the compute;
    • Conditional memory access space: sizable but with a different access pattern, and a candidate for moving down to host memory;
    • KV Cache: grows roughly linearly with context length and concurrency, and is the variable most likely to get out of control;
    • Runtime workspace and communication buffers: temporary operator tensors, activation recomputation buffers, and inter-GPU send/receive queues.

    The “roughly 614GB VRAM budget” often cited in engineering work is only a planning reference for one particular loading scheme. Change the quantization precision, the placement of memory parameters, or the serving configuration, and the actual requirement will shift noticeably.

    3. TP and EP: Division of Labor and Cost

    Tensor parallelism (TP) splits the large matrix operations inside a single layer across multiple GPUs, reducing per-GPU weight and compute pressure. It suits dense large layers such as attention and feed-forward. The cost is a cross-GPU reduction at every layer, which makes communication frequent and sensitive to interconnect bandwidth. This is why the TP degree usually should not exceed what the high-bandwidth interconnect within a single machine can cover.

    Expert parallelism (EP) targets the expert networks of an MoE model by placing different experts on different devices. Since each token activates only a few experts, the actual load depends on the routing distribution: hot experts overload individual devices while the rest idle. The extra cost of EP is exchanging routing metadata and collecting expert outputs, a classic case of “small messages, high frequency.”

    The two can be combined, but their values must match the inference framework’s implementation, the model structure, and the server topology at the same time. A practical order of decisions: first determine the minimum partition degree from VRAM capacity, then tighten TP according to communication bandwidth, and finally validate EP load balance with real production traffic.

    A schematic planning logic can be expressed as:

    1. Per-GPU weight budget ≈ backbone weights / TP + local expert weights / EP + local KV shard
    2. Constraint 1: per-GPU weight budget + runtime buffers ≤ per-GPU VRAM × safety factor (0.85–0.9)
    3. Constraint 2: TP communication volume ≤ what the inter-GPU interconnect can sustain
    4. Constraint 3: EP expert load deviation across devices ≤ acceptable threshold

    4. Conditional Memory Placement: Cost Transfer, Not Cost Removal

    Placing conditional memory parameters in host memory frees scarce VRAM for backbone weights and runtime caches, which is a common practice. But it is not free: the evaluation focus moves to CPU memory capacity, memory bandwidth, NUMA node distribution, PCIe access paths, and cache hit strategy.

    If the process accessing these parameters happens to run on a remote NUMA node, or reads across a PCIe switch link, a single access can become an order of magnitude slower. For Decode, which is token-by-token and memory-access intensive, that latency is amplified directly into end-to-end response time.

    5. Server Integration Checklist: Topology Details That Get Overlooked

    For engineers responsible for integration and deployment, the configuration checklist should not stop at GPU model and count. It should also verify:

    • Whether memory channel population and per-node capacity are symmetric under a dual-socket CPU setup;
    • The PCIe affinity between GPUs and the NICs and storage controllers;
    • CPU/GPU affinity binding for inference processes and interrupt distribution;
    • Whether the inter-GPU interconnect is fully connected or has degraded links.

    With the same number of cards and the same model, measured latency and throughput can still differ significantly depending on topology and data placement alone.

    6. Capacity and Concurrency: Treat Context as a First-Class Resource

    KV Cache often hits the ceiling earlier than weights do. Planning should start by fixing the target context length and concurrency, then work backward to the cache budget, while accounting for paging management, prefix reuse, request queuing, and batching strategy. If an organization runs both long-document analysis and a high-concurrency API workload, a tiered deployment is safer than forcing one set of parameters to handle every scenario.

    7. Practical Recommendations

    Alongside the general capabilities of cloud platforms such as Baidu AI Cloud, an on-premises cluster can be paired with container platforms, monitoring and alerting, and logging services to run load tests and observe runtime behavior. The overall path: measure single-GPU and dual-GPU baselines first, scale parallelism up gradually, calibrate EP balance and cache limits with real production traffic, and end up with a reusable capacity model rather than decisions based on a single Baidu AI Cloud offering or nominal hardware specifications.