Deploying a 2.8T-Parameter MoE Model on Dual-Server Domestic Accelerators: A Practical Guide
This guide outlines the practical considerations and parallelization strategies for deploying a massive Mixture-of-Experts (MoE) model with approximately 2.8 trillion parameters, 104 billion activated parameters per token, and 1-million-token context support on a two-server cluster equipped with domestic accelerators. It breaks down the three main resource pressures—weight storage, activation computation, and KV cache—and walks through an example configuration using pipeline, tensor, and expert parallelism across 16 accelerators (8 per server), including a YAML topology snippet. The content focuses on memory estimation, parallel slicing, and load-balancing trade-offs without diving into vendor-specific APIs.
Three Pressures from the Model Scale
The target model has approximately 2.8 trillion total parameters, activates about 104 billion parameters per token, and supports a 1-million-token context. These three numbers create three distinct types of pressure:
Large weight volume. With INT8 storage, the weights of 2.8T parameters occupy roughly 2.8 TB. Even reduced to 4-bit, the theoretical footprint is about 1.4 TB. A single accelerator card typically offers 64 GB of memory, so weights must be sharded across multiple cards and multiple machines.
High activated parameter count. Each token activates 104B parameters, leading to heavy per-request computation and memory-access overhead. Pipeline stage times must be balanced, and expert routing must maintain load balancing.
Long context amplifies KV cache. Under a 1M context, the KV cache grows linearly with sequence length. Without paged management or quantization, concurrency capability drops significantly.
Memory and Compute Estimation
Each of the two servers is equipped with 8 accelerator cards of 64 GB each—16 cards total, giving 1,024 GB (≈1 TB) of combined memory. All numbers below are theoretical estimates; actual usage will be higher.
Weight side. A 4-bit weight theoretical size is about 1.4 TB, already exceeding 1,024 GB. This means the full weight set cannot fit purely in the 16 cards’ memory. Three options are available:
- Use a lower bit-width for expert layers and verify whether accuracy remains acceptable.
- Offload some expert weights to CPU memory or local SSD, at the cost of higher access latency.
- Increase the number of accelerator cards.
For an W8A8 scheme, the theoretical weight size is about 2.8 TB, making a pure-GPU approach even less feasible.
The theoretical volume is only a lower bound. Quantization scale, zero points, alignment padding, and weight replicas from the inference framework all consume additional memory. Plan based on the real memory usage after loading.
KV cache and activations. Reserve 20% to 30% of memory for activations and KV cache, and enable paged attention to reduce memory fragmentation.
Compute side. Forward computation can be estimated at roughly 2× activated parameters per token, i.e., 2 × 104B ≈ 208 GFLOPs. This estimate covers the main matrix operations of expert and linear layers, excluding attention (whose cost grows with context length), multimodal encoding, and communication overhead. Actual time-to-first-token depends on the parallel slicing scheme and memory bandwidth; rely on load-test data for accuracy.
Parallel Slicing: Each Machine as a Pipeline Stage
A typical deployment for a huge MoE model uses multi-dimensional hybrid parallelism. This example sets PP=2, with the two servers acting as two pipeline stages. Each stage occupies 8 cards, and the two stages together use 16 cards.
1. Pipeline Parallelism (PP). Layers are split into 2 stages across the machines. Since inter-server bandwidth is usually lower than intra-server, only activations are passed between stages—this communication is infrequent but carries a concentrated chunk of data per step.
2. Tensor Parallelism (TP). Attention and shared layers use TP=4 within each stage. The 8 cards of a stage are divided into 2 groups of 4 cards. Intra-group communication runs over high-speed internal interconnects, keeping communication cost controllable.
3. Expert Parallelism (EP). Inside each stage, MoE experts are distributed evenly across all 8 cards—EP=8. Tokens routed by the router are sent to the card holding the corresponding expert via All-to-All communication. A larger EP means fewer experts per card and more flexible load balancing, but also a higher proportion of All-to-All communication, which requires careful tuning.
Note: The TP and EP values describe intra‑stage slicing; they are not multiplied directly to get card count. The total number of cards is PP × (cards per stage), i.e., 2 × 8 = 16.
The deployment topology is shown below; the exact field names should follow the documentation of your chosen framework:
parallel_config:pipeline_parallel: 2 # Two servers, each as one stagetensor_parallel: 4# (expert_parallel and other fields omitted for clarity)
