Deploying Ultra-Large MoE Models on Eight GPUs: Architecture, Parallelism, and Resource Planning
Deploying an ultra-large Mixture-of-Experts model on an eight-GPU server requires more than adding up total VRAM. This guide explains how backbone and expert weights, conditional memory, KV cache, runtime workspace, CPU memory, NUMA, PCIe topology, and GPU interconnects affect deployment. It also covers TP and EP coordination, capacity planning, validation, performance monitoring, and common deployment mistakes.
1. Why Eight-GPU Deployment Cannot Be Planned by Total VRAM Alone
One of the most common mistakes when deploying a large model locally is to simply add the memory of several GPUs and compare the total with the model’s parameter count. In practice, eight GPUs do not automatically form a single pool of shared VRAM with uniform access latency. The final result depends on how model weights are partitioned, which parallelism strategy is used for each computation stage, how expert networks route tokens, and whether the devices have high-bandwidth interconnects.
For enterprise assistants, developer tools, knowledge-based question answering, and model serving, the goal is not merely to load the model. A practical deployment should also provide:
- Acceptable time to first token;
- Stable memory usage under long contexts;
- Consistent throughput with multiple concurrent users;
- Stable GPU utilization, host memory usage, and communication links;
- Sufficient observability and tuning capability when traffic changes.
An eight-GPU deployment should therefore be treated as a system composed of compute, storage, communication, and scheduling—not simply as a hardware purchasing decision.
2. Resource Components of Ultra-Large MoE Models
These models commonly use a sparse Mixture-of-Experts architecture. They contain a large shared backbone along with multiple expert modules. Each input token is processed by only a subset of the experts, so the actual computation per token is much lower than the full parameter count. However, the number of parameters activated during computation is not the same as the total number of weights that must be loaded for deployment.
For an ultra-large model, resources can generally be divided into four major categories.
2.1 Backbone Weights
Backbone weights include attention layers, shared network layers, routing layers, and other non-expert parameters. They typically need to remain resident in GPU memory or distributed memory, making them one of the most stable and fundamental memory costs during deployment.
Weight usage can be roughly estimated as follows:
Weight memory ≈ Number of parameters × Bytes per parameter
Using a lower-precision weight format can reduce the theoretical capacity requirement. However, real deployments also need space for scale factors, alignment, weight-conversion buffers, and runtime copies. Memory planning should therefore not be based only on theoretical bit width.
2.2 Expert Weights and Conditional Memory
MoE expert parameters are often much larger than the parameters activated for an individual token. Expert weights can be distributed across GPUs through expert parallelism, or partially placed in host memory and transferred or cached on demand.
Some newer models may also include conditional memory or externalized parameter modules. These components may not use conventional weight access patterns and can require additional space for indexing, lookup, caching, and data movement.
Placing them in host memory can reduce VRAM pressure, but it introduces additional bottlenecks:
- Is there enough CPU memory?
- Can the memory-channel bandwidth support the access pattern?
- Will memory access cross processor sockets in a dual-socket system?
- Will the path between the GPUs and CPUs become congested?
- Can frequently accessed data be cached effectively?
- Will access latency increase jitter during time to first token or decoding?
Moving data to host memory changes where the resource is consumed; it does not eliminate the resource requirement.
2.3 KV Cache
During autoregressive generation, the attention mechanism stores the keys and values associated with previously processed tokens. This storage is the KV cache. Its size grows as context length and the number of concurrent requests increase.
A rough estimate is:
KV cache ≈ Number of layers × Context length × Concurrent requests × KV dimension × Data precision × Constant factors
The actual calculation also depends on grouped-query attention, paged caching, cache reuse, and framework-specific memory layouts.
For short contexts and low concurrency, weights are usually the primary source of memory pressure. In long-context or high-concurrency services, however, the KV cache can quickly become the factor that determines the maximum usable VRAM.
2.4 Runtime Workspace and Communication Buffers
Model loading, matrix operations, expert routing, data rearrangement, and cross-GPU communication all require temporary memory. This includes operator workspaces, activations, communication buffers, scheduling metadata, quantization-related data, and memory reserved by the framework.
VRAM planning should therefore not target a configuration that only fits the weights. A safer approach is to reserve explicit headroom for runtime operations, concurrency growth, longer contexts, and bursty requests.
3. Coordinating TP and EP
3.1 Tensor Parallelism
Tensor parallelism splits the weights or intermediate tensors of a large computation layer across multiple GPUs. It is suitable for large linear layers, attention projections, and other components that are difficult for a single GPU to handle independently.
Its advantages include:
- Reducing per-GPU weight pressure;
- Distributing large matrix operations across multiple GPUs;
- Supporting balanced partitioning of the backbone network.
However, tensor parallelism generally requires synchronization. Each layer or computation stage may need to aggregate, broadcast, or exchange intermediate results. If the interconnect bandwidth between GPUs is insufficient, communication wait time can offset the benefits of parallel computation.
3.2 Expert Parallelism
Expert parallelism is designed primarily for MoE architectures. Different experts are placed on different GPUs, and the router selects target experts according to token representations. Tokens in a single batch may need to be sent to multiple GPUs and then returned to the device where the original computation was performed.
The key question is not simply whether experts can be distributed, but whether routing is balanced. If many tokens are concentrated on a small number of experts, local hotspots will occur. Some GPUs may become fully loaded while others remain underutilized, and communication volume may increase at the same time.
Important metrics include:
- The number of tokens received by each expert;
- The balance of expert weight sizes across GPUs;
- The communication volume generated by routing and rearrangement;
- Whether expert capacity limits cause token drops or additional latency;
- Whether popular experts remain congested under high concurrency.
3.3 Combining TP and EP
Practical deployments often use tensor parallelism and expert parallelism together. For example, tensor sharding can be used within each parallel group while experts are distributed across different groups. The correct combination cannot be selected independently of the model implementation and hardware topology.
Parallelism should be chosen based on:
- The number of GPUs and the memory capacity of each GPU;
- The dimensions of the backbone and expert layers;
- The physical links available for cross-GPU communication;
- Bandwidth differences between devices within the server;
- The target context length;
- The target concurrency level;
- The inference framework’s support for the selected parallel configuration.
Higher parallelism does not necessarily produce higher throughput. Excessive partitioning increases synchronization frequency and scheduling complexity. This is particularly noticeable for small batches and low-concurrency workloads, where communication overhead can become more significant.
4. VRAM Planning for an Eight-GPU Server
A useful planning method is to divide memory requirements into base capacity, dynamic capacity, and safety headroom.
Base capacity includes backbone weights, expert weights, and required model metadata. Dynamic capacity mainly includes the KV cache, activations, and request scheduling buffers. Safety headroom is reserved for runtime workspaces, communication buffers, framework initialization, and burst traffic.
A planning table can be organized as follows:
| Resource | Main factors | Planning focus |
|---|---|---|
| Backbone weights | Parameter count, precision, partitioning method | Ensure long-term residency |
| Expert weights | Number of experts, EP strategy | Check load balance |
| Conditional memory | Placement and access pattern | Evaluate CPU memory and bandwidth |
| KV cache | Context length, concurrency, precision | Set an explicit limit |
| Runtime memory | Operator and communication implementations | Reserve safety headroom |
| Host memory | Offload volume and caching strategy | Pay attention to NUMA and bandwidth |
| Storage | Weight files and temporary conversion files | Avoid insufficient capacity during loading |
If host-memory offloading is used, remaining parameters should not be placed in memory without a plan. A more practical approach is to identify hot and cold data, prioritize frequently accessed modules for caching, and monitor whether data movement has become a bottleneck.
5. CPU, NUMA, and PCIe Topology
Performance differences between eight-GPU servers often come from hardware topology rather than the number of GPUs alone. In a dual-socket CPU system, each processor typically has its own memory controllers and access to a portion of the PCIe resources. If a GPU connected to processor A frequently accesses memory managed by processor B, additional latency may be introduced.
Before deployment, verify:
- Which PCIe root node each GPU is actually connected to;
- Whether high-speed interconnects exist between the GPUs;
- Whether network adapters, storage devices, and GPUs compete for the same link;
- Whether host memory is installed evenly across processor nodes;
- Whether inference processes and communication threads are bound to appropriate CPU cores;
- Whether the expected data paths between GPUs, CPUs, and memory are available.
Process affinity should not be overlooked. If an inference process moves unpredictably between NUMA nodes, memory access performance may become unstable. For high-concurrency services, communication threads, data-preprocessing threads, and scheduling threads should also be isolated appropriately to prevent the CPU from becoming a hidden bottleneck.
6. Deployment Validation and Tuning
Validation should be performed in stages rather than starting with a full-concurrency stress test.
Stage 1: Loading Validation
Confirm that weights are partitioned correctly, memory usage is balanced across GPUs, host memory does not grow unexpectedly, and model initialization does not create implicit copies.
Stage 2: Single-Request Testing
Test both short and long contexts. Record time to first token, generation speed, peak VRAM usage, and CPU utilization.
Stage 3: Concurrency Testing
Increase the number of requests gradually while observing KV cache growth, expert load distribution, cross-GPU communication, and queueing time.
Stage 4: Stability Testing
Run the system for an extended period and monitor memory fragmentation, cache reclamation, memory leaks, temperature changes, and throughput degradation.
At a minimum, collect the following metrics:
- Time to first token;
- Generation speed per request;
- Total throughput and effective throughput;
- VRAM usage on each GPU;
- Compute utilization on each GPU;
- GPU-to-GPU communication bandwidth and wait time;
- CPU memory usage and NUMA access patterns;
- Expert token distribution;
- KV cache hits, allocations, and reclamation;
- Request queue length and timeout rate.
7. Common Mistakes and Improvements
Mistake 1: Estimating VRAM Only from Activated Parameters
Activated parameters describe the computation path, not the full weight residency requirement.
Improvement: Calculate weights, caches, and runtime workspace separately.
Mistake 2: Treating Eight GPUs as a Shared Memory Pool
In actual execution, every GPU must have enough local capacity for its assigned data and communication requirements.
Improvement: Check the maximum per-GPU usage after partitioning rather than looking only at total capacity.
Mistake 3: Ignoring Expert Hotspots
Expert parallelism does not automatically produce balanced utilization.
Improvement: Examine routing statistics and, when necessary, adjust expert placement, capacity limits, and batching strategies.
Mistake 4: Relying Too Heavily on Host-Memory Offloading
Offloading transfers pressure to CPU memory, PCIe, and NUMA paths.
Improvement: Perform end-to-end bandwidth testing and design a cache for frequently accessed data.
Mistake 5: Testing Only Low Concurrency with Short Contexts
Such tests do not represent the pressure of a real service.
Improvement: Define multiple context-length and concurrency levels based on the target workload.
8. Conclusion
Deploying an ultra-large MoE model on eight GPUs is fundamentally a joint optimization problem. Model size determines base capacity. TP and EP determine partitioning and communication behavior. Conditional memory determines how host memory and GPU memory work together. The KV cache determines the practical limits for context length and concurrency. CPU, NUMA, PCIe, and GPU interconnect topology determine whether data can move efficiently.
A sound planning process should first establish a complete resource model, then select a parallelism strategy based on hardware topology, and finally validate capacity and performance through staged load testing. An eight-GPU deployment can meet enterprise inference requirements only when it is evaluated across three dimensions: whether the model can be loaded, whether it can run stably, and whether it can provide sustained service.
