Deploying Large MoE Models on 8 GPUs: Weight Distribution and GPU Resource Planning
This article explains why aggregate VRAM across eight GPUs does not equal deployable capacity for large Mixture-of-Experts (MoE) models. It covers the structure of MoE models, the four categories of memory that must be planned separately (dense backbone weights, expert weights, KV cache, and runtime workspace/communication buffers), and placement strategies for tensor parallelism, expert parallelism, and conditional memory modules. It concludes with a practical planning workflow for enterprise deployments.
1. Why Total VRAM Is Not Deployable Capacity
When evaluating whether an 8-GPU server can host a large-scale MoE model, many teams start by adding up the nominal VRAM of all eight cards and comparing the total against the model’s weight size. The direction is right, but the conclusion is often too optimistic. The VRAM on eight GPUs consists of physically separate device memories, not one unified shared pool. If the weights, activations, or caches on any single card exceed that card’s local capacity, deployment fails—even if the other seven cards have plenty of free space.
The real planning problem is therefore: “How do we split and place the model’s components across eight GPUs while keeping inter-GPU communication overhead under control?” That requires understanding the model’s architecture first, and only then deriving the memory and communication layout.
2. MoE Model Structure and Resource Composition
2.1 Total Parameters vs. Activated Parameters
A typical large-scale MoE architecture contains two main parts: a dense backbone network, whose parameter count can reach several hundred billion, and sparse expert layers, where each token is routed to only a small number of experts during inference. Some newer architectures also introduce conditional memory modules that retrieve historical knowledge with very low activation cost. These modules can also hold substantial parameters, but they do not fully participate in every inference step.
A common misconception must be clarified here: marketing materials often state that a model “activates only 8B/16B parameters per token.” Activated parameters describe the size of the path traversed in a single forward pass. They determine the per-token compute cost and throughput ceiling, but they do not mean the deployment only needs that much memory. All expert parameters and backbone weights must reside in memory at all times, because any of them may be selected by the router.
2.2 Four Categories of Memory to Plan Separately
A complete deployment plan should be broken into four parts:
- Backbone weights: Dense weights for attention and shared layers. These must reside in VRAM at all times and are typically sharded across GPUs using tensor parallelism.
- Expert weights: Distributed across GPUs via expert parallelism. Load balance across experts directly affects per-card memory usage and compute pressure.
- KV Cache: Scales with context length and the number of concurrent requests. This is the component most likely to spiral out of control in long-context scenarios. Estimate it with an upper bound of “maximum context × concurrency × number of layers × per-layer KV size,” plus headroom.
- Runtime workspace and communication buffers: Temporary space for activations, AllReduce/All-to-All buffers required by tensor parallelism and expert parallelism, and framework scheduling overhead. This is often underestimated, but under high concurrency it can occupy tens of GB.
For mixed-precision loading implementations, industry practice often uses a VRAM budget on the order of several hundred GB as a reference for specific configurations. Actual requirements vary significantly with quantization strategy (e.g., low-bit quantization of some weights), the placement of conditional memory modules, and serving parameters (context length, concurrency limit). Do not blindly copy a single number—build your own estimation model instead.
3. Placement Strategies for TP, EP, and Conditional Memory Modules
3.1 Tensor Parallelism (TP)
TP splits the internal tensors of a layer across multiple GPUs, so each card holds only 1/N of the weights and performs 1/N of the computation. Its advantage is a fine-grained split suited to very large attention and feed-forward layers; the cost is cross-GPU synchronization at every forward step, meaning high communication frequency and strong sensitivity to interconnect bandwidth. On an 8-GPU server, TP=4 or TP=8 are common configurations, depending on whether a single card can fit the sharded backbone portion and on the interconnect topology (e.g., NVLink domain partitions).
3.2 Expert Parallelism (EP)
EP targets the MoE expert layers by assigning different experts to different devices. Because each token activates only a few experts, routing results cause cross-GPU All-to-All data exchange. Key considerations for EP configuration:
- The number of experts should be divisible by the number of GPUs.
- Expert load should be balanced across cards as much as possible.
If frequently-hit experts happen to land on the same card, a severe hot spot forms. TP and EP can be combined—for example, TP for the backbone and EP for the expert layers—but the combination must match both the inference framework’s implementation capabilities and the hardware topology. Do not assemble these settings arbitrarily.
3.3 Placement of Conditional Memory Modules
The conditional memory module is a new variable in recent architectures. One common approach is to place it in host memory and access it over PCIe on demand, freeing precious VRAM for backbone weights, expert weights, and KV cache. This approach can significantly reduce pressure on individual GPU capacities, but it introduces host-memory bandwidth access latency, requiring a trade-off between throughput and capacity. Another approach is to shard it into VRAM, which suits latency-sensitive scenarios with relatively ample VRAM. Which strategy to choose depends on whether the workload favors long context and high concurrency, or low time-to-first-token.
4. Planning Recommendations for Enterprise Scenarios
For typical enterprise needs such as internal AI assistants, R&D assistance, and self-hosted API services, follow these steps:
- Set context length and concurrency targets first: KV cache size is dictated by the business, which in turn determines the space available for weights.
- Then select quantization and parallelism combinations: Validate per-card peak memory usage under candidate TP/EP settings, considering the eight GPUs’ VRAM capacity and interconnect bandwidth.
- Finally, run load-test calibration: After theoretical estimation, use realistic traffic for stress testing. Observe per-card memory levels, communication overhead, and expert routing distribution, then dynamically adjust expert placement and serving parameters.
Only by reasoning about model structure, parallelism strategy, and hardware resources together can an 8-GPU local deployment move from “barely runs” to “reliably handles production traffic.”
