Deploying Trillion-Parameter MoE Models on Two Nodes with Ascend NPUs: A Practical Guide
This article walks through a real-world deployment of a trillion-parameter multimodal MoE model across two nodes with 32 compute dies in total. It covers quantized weight selection, tensor and pipeline parallelism configuration, node onboarding, a two-stage weight distribution strategy, service startup checks, and a three-tier stress test matrix, along with a troubleshooting checklist for memory, bandwidth, and reproducibility issues.
1. Background and Problem Definition
Once ultra-large MoE models enter the trillion-parameter range, the inference challenge shifts from “can it run at all” to “can it run stably and reproducibly within a limited number of nodes.” Take a native multimodal MoE with 2.8T total parameters, roughly 104B activated parameters, and a 1M token context: a single machine lacks both the memory capacity and the inter-card bandwidth to hold the weights and the KV Cache, so a multi-node, multi-card setup is mandatory. Multi-node deployment in turn introduces cross-node communication, weight distribution, and a larger failure domain.
This article uses a typical domestic accelerator topology of two nodes, each with 16 compute dies, for 32 dies in total, and lays out a complete engineering workflow: node onboarding, parameter network setup, quantized weight distribution, parallel strategy selection, service startup, and layered stress testing. All numbers here come from a single real-hardware validation run on this topology; they illustrate the order of magnitude and the method, not a general performance guarantee.
What matters in this kind of practice is not the operational details of one specific platform, but three general engineering problems:
- How to organize multi-node resources into a single logical device within a heterogeneous compute pool.
- How to fit extremely large weights using a combination of tensor parallelism and pipeline parallelism under memory constraints.
- How to prove with a controlled stress test matrix that the service remains usable for long-context and tool-calling scenarios.
2. Model and Quantization Selection
Loading a trillion-scale MoE directly in half precision is not realistic. The common industry approach is low-bit weight compression: weights stored in 4-bit and activations computed in 8-bit (a W4A8-style scheme), combined with per-channel or group quantization and dequantization operators to balance memory footprint against accuracy loss.
In this case, the quantized weights come to about 1.47 TB across 346 shard files. That number drives every downstream decision:
- 32 dies at 64 GiB each give roughly 2 TiB of memory in total; after the weights, the room left for KV Cache and activations is very tight and must be budgeted precisely.
- Distribution time for 1.47 TB of weights becomes the critical path of the deployment process and needs dedicated optimization.
- With so many shards, a single missing shard or a failed checksum will halt loading, so integrity verification and version pinning (revision/digest) are required.
Engineering recommendation: pin versions for both the image and the weights. Fix the image by digest, and record the weight revision and total byte count to avoid irreproducible situations where the same name refers to different content.
3. Environment Topology and Parallel Strategy
The reference topology:
| Item | Configuration |
|---|---|
| Compute nodes | 2 domestic accelerator servers, 16 dies each, 64 GiB per die, 32 dies total |
| Intra-node interconnect | High-bandwidth inter-card interconnect carrying tensor-parallel AllReduce/AllGather |
| Inter-node interconnect | High-speed network carrying point-to-point pipeline-parallel transfers |
| Parallel strategy | TP16 within each node, PP2 across nodes, world size = 32 |
| Weights | 4-bit weight + 8-bit activation quantized version, about 1.47 TB |
| Runtime | Domestic-accelerator-adapted build of a mainstream open-source inference engine |
The reasoning behind the parallel strategy is worth spelling out:
- Tensor parallelism (TP) is communication-heavy and highly sensitive to bandwidth, so it should be strictly confined to the high-speed interconnect domain inside a node. TP16 therefore matches the die count of a single machine.
- Pipeline parallelism (PP) moves little data and is mostly point-to-point, which suits cross-node links. PP2 maps directly onto the two machines.
- world size = TP × PP = 32, exactly matching the physical die count. No cross-node TP is introduced, so bandwidth does not become the bottleneck.
- On top of this, the MoE expert layers can add expert parallelism, placing different experts on different dies and further spreading the per-card memory pressure.
Illustrative startup parameters (structure only, not a specific interface):
python -m vllm.entrypoints.openai.api_server \--model /models/moe-4bit \--tensor-parallel-size 16 \--pipeline-parallel-size 2 \--max-model-len 262144 \--gpu-memory-utilization 0.90 \--enable-expert-parallel
4. Deployment Walkthrough
4.1 Node Onboarding
Generate an install command in the console and run it on each machine to complete onboarding. The platform then automatically detects the number of accelerators, memory capacity, network cards, and storage information, and keeps nodes online via reported heartbeats. The control plane and data plane reuse the same outbound tunnel: nodes dial out themselves, so no inbound port has to be opened on the node side, which is friendly to security and compliance in production.
4.2 Parameter Network Setup
Multi-node inference requires explicitly declaring which cards belong to the same communication domain. In the parameter network configuration, add the inter-card interconnect of both nodes to the same network. The platform runs a connectivity check (bandwidth, latency, topology consistency), and at deployment time it automatically filters nodes that satisfy affinity requirements, avoiding placing an instance on a cross-domain link.
4.3 Weight Distribution Optimization
The 1.47 TB of weights is the biggest bottleneck in the deployment path. Measured comparison:
- Download from public object storage: about 50–57 MB/s, several hours per node.
- Direct node-to-node transfer: about 490 MB/s, close to a 10x improvement.
The recommended approach is therefore a two-stage “download once, then copy between nodes”: download and verify on the primary node first, then transfer directly from the primary to the secondary nodes. If the cluster grows further, peer-to-peer (P2P) distribution or a shared parallel file system can be introduced to reduce egress pressure on the primary node.
4.4 Service Startup and Health Checks
After an instance starts, verify the following in order: processes and ports are ready, all model shards are loaded, the memory watermark is stable, /health responds, and a minimal request returns successfully. Any failing step should emit logs that pinpoint the problem rather than a generic timeout.
5. Stress Test Design and Result Interpretation
The stress test matrix uses three load tiers covering short-request throughput, long-context stability, and agent scenarios:
| Tier | Input/Output | Requests | Focus |
|---|---|---|---|
| Random | 2048 / 512 | Several hundred | Baseline throughput, TTFT, per-card compute utilization |
| Agent long context A | ~80K | Several hundred | Long-sequence memory and scheduling fairness |
| Agent long context B | ~200K | Several hundred | KV Cache limit, preemption and recomputation |
All 836 requests across the three tiers succeeded, with no failures or timeouts. Key takeaways:
- For the long-context tiers, the metric that matters is not throughput but “does not crash.” KV Cache usage grows linearly with sequence length, and the 200K tier sits closer to the memory ceiling, so full success indicates the memory budgeting and preemption strategy are sound.
- Tool calls and reasoning output came back normally, showing that structured output parsing and multi-turn session state management do not degrade under long sequences.
- A marked TTFT increase in the long-context tiers is expected, driven mainly by the growth in prefill computation. Chunked prefill and prefix caching can help.
6. Common Issues and Tuning Checklist
- Out of memory: first lower
max-model-lenand the concurrency limit, then consider raising the memory utilization threshold. - Saturated inter-node bandwidth: confirm TP does not cross nodes and keep the PP depth shallow.
- Slow loading: switch to direct node-to-node transfer or a parallel file system, and enable concurrent shard reads.
- Long requests being preempted: adjust the scheduling policy, reserve blocks for long sequences, and enable prefix caching to reuse system prompts.
- Irreproducibility: record and archive the image digest, the weight revision, and the startup parameters together.
7. Conclusion
Running trillion-scale MoE inference on two nodes and 32 dies is fundamentally about satisfying the constraints of memory capacity, communication bandwidth, and scheduling policy at the same time. TP confined to the node, PP across nodes, two-stage weight distribution, and three-tier stress validation form a combination that carries over directly to larger clusters. Further work can explore expert parallelism, throughput optimization at larger context tiers, and similar deployments on compute platforms such as Baidu AI Cloud using general-purpose containers and object storage.
