Deploying Trillion-Parameter MoE Models on Two Servers with Domestic AI Accelerators: A Practical Guide
This article walks through deploying a native multimodal MoE model with roughly 2.8T total parameters and 104B active parameters across two servers equipped with domestic AI accelerator cards, supporting million-token context. It covers how to estimate VRAM requirements before deployment, how to combine tensor parallelism and pipeline parallelism (TP16 × PP2), principles for selecting W4A8 quantized weights and runtime images, a three-tier load testing design, and a troubleshooting checklist for common issues such as KV Cache exhaustion, high TTFT, and broken tool calls.
1. Background and Problem Definition
As large models move into the trillion-parameter range, a single card’s VRAM can no longer hold the full set of weights, making multi-node, multi-card coordination the only viable path. This article covers a specific scenario: building an inference service on a domestic AI accelerator platform using two servers to serve a native multimodal MoE model with about 2.8T total parameters and about 104B active parameters, with support for million-token context lengths.
The problem has three layers:
- Resource layer: The weight footprint far exceeds a single machine’s VRAM, so how should the number of cards and machines be planned?
- Parallelism layer: How should tensor parallelism (TP) and pipeline parallelism (PP) be combined to balance throughput and latency?
- Validation layer: How should load tests be designed to prove that real business paths, such as long context and tool calling, actually work?
2. Resource Estimation: Calculate VRAM Before Deploying
The first step in deploying a very large model is not pulling an image but building a VRAM budget. Using W4A8 quantization as an example, meaning 4-bit weights and 8-bit activations, the theoretical weight footprint of 2.8T parameters is around 1.4TB. With runtime overhead added, the actual on-disk and loaded size is typically in the 1.4–1.5TB range.
Assume each server has 8 accelerator cards with 64GB of usable VRAM per card. That is about 512GB of VRAM per machine and about 1TB across two machines, which is below the weight footprint. Therefore, the setup must scale to 16 cards (two 8-card machines) and further leverage the multi-die packaging characteristics to split the logical instance into 32 compute units that share the weights and KV Cache.
Here is a reusable estimation approach:
Per-card VRAM requirement ≈ weight shard + KV Cache + activation/temporary buffer + framework reserveWeight shard ≈ total weight footprint / parallelism degreeKV Cache ≈ num_layers × 2 × sequence_length × hidden_dim × bytes_per_value / parallelism degree
The conclusion: first decide the quantization precision and parallelism degree, then work backward to the number of machines. This avoids the passive situation of “rent machines first and see whether it runs.”
3. Parallelism Topology: The Trade-offs of TP16 × PP2
This scenario uses tensor parallelism of 16 combined with pipeline parallelism of 2. The reasoning is as follows:
- Tensor parallelism first consumes intra-machine bandwidth. TP involves heavy communication and should be confined as much as possible to the high-speed interconnect within a single machine, leaving cross-machine traffic to the small amount of point-to-point transfer caused by a single pipeline split.
- Pipeline parallelism handles cross-machine scaling. PP splits the model into segments by layer. Cross-machine communication is small and not sensitive to bandwidth, making it a reliable approach for scaling across nodes.
- The parallelism degree must divide evenly into the number of attention heads and layers. If the TP value cannot divide the number of attention heads, the split becomes uneven or the service may fail to start. The number of PP segments should also match the layer count to avoid one segment becoming an obvious bottleneck.
Illustrative startup parameters (structure only, not actual commands):
tensor-parallel-size = 16pipeline-parallel-size = 2max-model-len = 200000gpu-memory-utilization = 0.90
Engineering considerations also matter: cross-machine deployment requires strictly consistent environments, drivers, and communication library versions across nodes; a high-speed interconnect is recommended between nodes, with unnecessary firewall blocking disabled; and running a lightweight collective communication self-check with a small model before startup can expose most topology problems early.
4. Principles for Selecting Quantized Weights and Runtime Images
The value of W4A8 is that it compresses weights to about one quarter, allowing trillion-scale models to run within limited VRAM, while 8-bit activations control precision loss. Three points deserve attention during selection:
- Quantization granularity: per-channel or per-group quantization is friendlier to precision;
- Operator support completeness: the quantization format must be covered by corresponding high-performance operators; otherwise it degrades to compute after dequantization, with a major performance drop;
- Binding to the runtime version: the runtime image released officially alongside the model is usually already adapted to the operators and parallelism strategy, while assembling versions yourself is easy to get wrong.
5. Load Testing Design: Three Workloads Covering Real Business
Validation cannot stop at “it produces text”; it must cover different context lengths and invocation patterns. This practice designed three groups: random 2048/512, Agentic 80K, and Agentic 200K, totaling 836 requests, all successful. Key design points:
| Scenario | Input/Output | Focus |
|---|---|---|
| Short request | 2048/512 | Baseline throughput and time to first token |
| Medium Agentic | 80K | Long-context retrieval and tool-calling stability |
| Long Agentic | 200K | KV Cache pressure, peak VRAM, timeout rate |
Load tests must record these metrics: success rate, time to first token (TTFT), per-token generation latency (TPOT), throughput (tokens/s), peak VRAM, and the distribution of failure types under long context. Success rate is the baseline metric, while the latency distribution is the basis for capacity planning.
6. Common Pitfalls and a Tuning Checklist
- Long-context failures caused by insufficient KV Cache: first lower
max-model-lenin tiers to verify, or increase VRAM utilization and enable KV Cache quantization; - High time to first token: check for uneven load across PP segments and, if necessary, adjust the layer split points;
- Interrupted tool calls: mostly caused by template parsing and stop-token configuration issues; check the conversation template and tool-call parser;
- Throughput below expectations: confirm whether the quantized operators are actually in effect and observe whether there is substantial dequantization overhead.
7. Summary
The key to running a trillion-scale MoE model on two servers with domestic AI accelerators is not any single trick, but the closed loop of “VRAM budget → parallelism topology → quantization and runtime matching → tiered load testing.” Only by quantifying every step and validating every step can you reliably deliver long-context, multimodal, tool-callable large model services on domestic compute.
