Large-Scale MoE on Eight GPUs: A Resource Planning Guide
Deploying a large sparse mixture-of-experts model on eight GPUs requires more than comparing total nominal GPU memory. This guide explains how to separate resident weights from activated parameters, budget main weights, conditional memory, KV cache, runtime workspaces, and communication buffers, and evaluate tensor and expert parallelism against per-GPU limits and interconnect topology. Using a planning case with roughly 500B main parameters, about 200B conditional-memory parameters, approximately 8B activated parameters per token in prefill and 16B in decode, and a ~614 GB mixed-precision weight-loading reference, it shows how per-GPU peak memory, expert routing balance, and service concurrency determine the real deployment boundary. It also outlines capacity checks, monitoring signals, and a planning sequence for knowledge assistants, R&D assistants, and unified model APIs.
When large sparse mixture-of-experts (MoE) models are deployed inside an enterprise, common goals include knowledge assistants, R&D assistance, and a unified model API service. Eight accelerator cards may look like they have plenty of memory, but the sum of nominal capacities is not one shared memory pool that can be partitioned arbitrarily. Whether weights can be placed in a balanced way, whether expert routing crosses GPUs, whether conditional memory sits in host memory or device memory, and how cache grows with service concurrency all change the real deployment boundary. The following uses a very large sparse model from public discussion as a planning case: the main backbone has roughly 500B parameters, with another roughly 200B conditional-memory parameters; in prefill, about 8B parameters are activated per token, and in decode, about 16B. These numbers show only how thin the compute path is. They are not evidence that the whole model needs only that much GPU memory.
Separate Resident Weights from Activated Parameters
The core of an MoE architecture is that each token passes through only a few experts, not the entire feed-forward network. As a result, single-step floating-point work can be much lower than for a dense model of the same size, and throughput and latency have room to improve. At the same time, expert weights not selected in the current step usually still have to remain somewhere. Otherwise, when the next step routes to them, they must be reloaded, and latency and bandwidth can quickly get out of control.
Activated parameters describe the portion that actually participates in matrix multiplication in one forward pass. A model can be served only if the relevant weights are already placed in a storage tier that can be accessed in time. Planning must answer at least four questions together: which GPUs hold the main weights, which memory tier holds conditional memory, how much KV cache to reserve for a given context length and concurrency level, and how much workspace and communication buffer the inference runtime still needs. Miss any one of these, and it is easy to end up with a configuration where the parameter count adds up but memory runs out as soon as the service starts.
Budget Four Resource Classes Separately
The first class is main weights. Dense layers, routing layers, and resident expert weights form the main body. Mixed precision or quantization changes the number of bytes, but quantization is not free: precision, kernel support, and extra buffers caused by weight repacking all have to be counted. In public discussion, one mixed-precision loading approach used approximately 614 GB as a reference order of magnitude for the whole-model GPU memory budget. That applies only to that loading method. Change the quantization bit width, change where conditional memory is placed, or change the parallel split, and the budget changes. It should not be treated as a fixed specification.
The second class is conditional memory. Modules of this type have a very large parameter scale, but their access pattern is often sparser than the main backbone. They are suitable for tiering in which hot data goes to the device and cold data stays in host memory. If the implementation allows conditional memory to live mainly in host memory, device memory can be prioritized for main weights, KV cache, and compute workspace. The cost is that host-to-device copy bandwidth, page-locked memory, and access hit rate become new bottlenecks. If all conditional memory is placed in device memory, access is more stable, but the total capacity of eight GPUs must hold both the main weights and the memory modules, and headroom shrinks quickly.
The third class is KV cache. It grows approximately linearly with batch size, number of concurrent sequences, context length, and number of layers, and it remains occupied during decode. If an enterprise assistant allows long documents and multi-turn conversations, the cache often reaches its limit earlier than the point where the model “just fits.” Cache should be reserved as a function of the service level, not left to whatever memory remains after weights are loaded.
The fourth class is runtime workspace and communication buffers. Temporary operator tensors, queues for expert dispatch and combine, send and receive buffers for collective communication, and gaps reserved to avoid fragmentation all consume the tens of gigabytes that appear to be left. The higher the parallelism, the less this part can be ignored.
Calculate Eight-GPU Capacity Against the Balanced Bottleneck
Compare two common professional GPU capacities at an order-of-magnitude level. At 96 GB per GPU, eight GPUs nominally total about 768 GB. At 72 GB per GPU, the total is about 576 GB. The former still has roughly 150 GB of nominal headroom over the approximately 614 GB main-weight budget, which can be used for cache, communication buffers, and a small amount of memory data that must remain resident on device. The latter total is already below that main-weight budget. Unless conditional memory is moved off device, weight bytes are further reduced, or resident expert replicas are decreased, it is difficult to satisfy both weight loading and basic service cache at the same time.
Even when total capacity exceeds the budget, eight GPUs cannot be assumed to be equivalent to one large GPU. Each GPU can directly access only its own memory. If the shard of a layer, a group of experts, or a segment of cache exceeds the limit on a single GPU, the entire service fails, and idle capacity on other GPUs cannot help. The acceptance criterion should therefore be “peak usage on each GPU is below that GPU’s available memory, and the gap across GPUs is controlled,” not “the sum of eight GPUs is larger than the model size in bytes.”
Tensor Parallelism: Trade Communication for Per-GPU Weight Reduction
Tensor parallelism splits large matrices within the same layer across multiple GPUs by row or column, so each GPU stores and computes only its own shard. This reduces per-GPU weight and compute pressure. It suits especially wide attention projections and feed-forward layers. The cost is that partial results need to be synchronized within or between layers, and communication volume depends on hidden dimension, batch size, and number of GPUs. As the number of GPUs increases from two to four or eight, each GPU has less work, but the number of collective communication operations and synchronization waits often rises. If intra-node interconnect bandwidth is insufficient or the topology has a slow path across switches, the benefit of tensor parallelism is consumed by communication, showing up as lower compute utilization and greater latency jitter.
As a rule of thumb, tensor parallelism degree should first align with GPU groups connected by high-speed intra-node interconnect, rather than being forced across nodes just to “split more finely.” With eight GPUs in a single node, 2, 4, and 8 are all candidates. The final value depends on whether the layer implementation supports that split and whether the remaining memory is still enough for cache.
Expert Parallelism: Split by Expert, Not by Average Token
Expert parallelism places different experts on different devices. Because each token activates only a few experts, compute can remain sparse, but a selected expert may not be on the local GPU, so dispatch and combine appear: tokens are first sent to the GPUs that host the routed experts according to the routing result, and results are sent back after computation. Whether routing is balanced directly determines whether some GPUs idle and whether others become hot spots. If popular experts cluster on a few GPUs, the theoretical speedup of expert parallelism will not materialize.
The degree of expert parallelism is usually constrained by the total number of experts and the number of experts each GPU can hold. If an expert is too large for a single GPU to hold completely, tensor parallelism must also be used within the expert; otherwise, the only options are lower-byte weights or fewer resident experts. When combining the two, avoid configurations where the two splits conflict: splitting the same tensor repeatedly or nesting communication domains too deeply makes buffers and scheduling harder to predict.
Parallelism Combinations Must Follow Implementation and Topology
Tensor parallelism and expert parallelism can be used together, but there is no universally optimal numerical combination. Selection should verify at least four points: whether the inference implementation actually supports that parallelism degree; whether per-GPU bytes after weight splitting are below available memory with cache left over; whether communication domains fall within the same high-speed interconnect domain; and whether expert routing is balanced under the target traffic. Passing an offline single-request test does not represent online multi-concurrency. Prefill is more compute-oriented, while decode is more oriented toward cache and memory access. The activation scale and bottleneck differ between the two phases, so stress testing should separately examine time to first token, decode speed, and the memory curve under long context.
If conditional memory is on the host side, host memory bandwidth, device copy queues, and CPU-side threads must also be included in the same topology diagram. Otherwise, GPU parallelism may be balanced while the service still stalls on memory lookups.
Reserve Different Headroom by Service Shape
Enterprise knowledge assistants usually have longer contexts and medium concurrency. KV cache and prefix reuse are more critical, and the weight side should remain as stable and resident as possible to avoid frequent swapping. R&D assistance often has shorter requests and denser interaction. It is more sensitive to latency jitter and batch scheduling, so communication buffers and continuous-batching reservations should be more conservative. If a unified model API promises concurrency to multiple tenants, cache should be derived from the promised maximum concurrency and context limit, not from average request length. The three scenarios can share the same weight placement, but cache pools and throttling thresholds should be configured separately.
Recommended Planning Sequence
First, freeze the weight form: precision, whether quantization is used, and whether conditional memory is placed on the host or on the device. From this, derive the byte count of the main backbone and modules that must remain resident. Next, draft the split across eight GPUs, calculate per-GPU weights, and add fixed reservations for communication and workspace. Then estimate KV cache using target concurrency and context length, and confirm that the busiest GPU still has headroom. After that, use representative traffic to check whether expert load is skewed, and adjust expert-to-GPU mapping or limit per-expert concurrency if needed. Finally, set service parameters: maximum batch size, maximum context, and queue length. If the order is reversed, it is easy to fix API parameters first and then discover that cache is pushing weights out of device memory.
A schematic capacity check can be written as the following relationship to align with monitoring, rather than to replace real measurements:
Per-GPU peak ≈ weight shard + local experts + local conditional-memory hot data+ KV cache share + workspace + communication buffers + fragmentation reserveRequirement: per-GPU peak < available memory on that GPU,and the spread across per-GPU peaks is within an acceptable range
For monitoring, retain at least per-GPU memory, expert hit distribution, collective communication time, host-to-device copy volume, and cache hit and rejection rates. When rejections mainly come from cache rather than compute, prioritize shortening the context limit or adding a cache tier instead of blindly increasing parallelism.
If local eight-GPU capacity covers only development and medium concurrency, larger elastic inference can run on cloud GPU instances and container platforms, with object storage for weights and monitoring and alerting for per-GPU headroom. When using general cloud resources such as Baidu AI Cloud, select instance specifications using the same four budgets and parallel bottlenecks described above, rather than comparing only nominal per-GPU memory. Local and cloud deployments can share the same splitting principles: capacity depends on the per-GPU bottleneck, performance depends on whether communication and routing are balanced, and service capability depends on whether cache is reserved for the promised concurrency.
