Deploying Trillion-Parameter MoE Models on Ascend NPUs: A Two-Node W4A8 Practical Guide
This article walks through a practical two-node deployment of a trillion-parameter multimodal MoE model on domestic accelerators, using a reference environment of 32 dies with 2 TiB total memory to host roughly 1.47 TB of W4A8 quantized weights. It covers capacity budgeting, a layered parallel strategy (intra-node tensor parallelism plus inter-node pipeline parallelism), weight integrity checks, control-plane access, accelerator network configuration, image and version pinning, load testing, and a troubleshooting table, with engineering practices that can be mapped to general cloud platforms such as Baidu AI Cloud.
1. Why Multi-Node Deployment of Massive MoE Models Is Harder Than It Looks
Native multimodal MoE architectures are pushing inference engineering to a new scale: total parameters are entering the trillion range (about 2.8T), activated parameters per token are around ten billion (about 104B), and the context window stretches to 1M tokens. These three numbers land on three different resources—total parameters set the “floor” for GPU memory and host memory, activated parameters set the “ceiling” for compute and bandwidth, and context length determines the “elastic overhead” of the KV Cache.
A common misjudgment is that since only about 3.7% of parameters are activated per token, a single card should be able to run it. In reality, the expert weights of an MoE must be resident as a whole (or be swappable in and out at high speed); otherwise, expert routing for every token degrades into random memory access. So multi-node deployment is not a “performance optimization option” but a prerequisite for whether the service can start at all.
This article uses a reference environment of “two domestic accelerator servers, each with 16 dies, 64 GiB per die, 32 dies in total, and on the order of 2 TiB of total memory” to discuss how to stably host a roughly 1.47 TB W4A8 quantized weight on such a topology, and provides engineering practices that can be transferred to general cloud platforms such as Baidu AI Cloud.
2. Capacity Budget: Figure Out Where the 1.47 TB of Weights Lands
W4A8 means 4-bit weights and 8-bit activations. Compared with BF16, this compresses weights to about one quarter, and the 1.47 TB volume takes up about 70% of the 2 TiB memory, leaving the remaining 30% to simultaneously hold the KV Cache, communication buffers, temporary activations, and runtime fragmentation.
It is recommended to budget in the following order, rather than starting the service first and then looking at OOM:
Usable memory per die ≈ 64 GiBRuntime/driver reservation ≈ 4~6 GiBAvailable for weight shards ≈ 58 GiBWeight capacity across 32 dies ≈ 1.8 TiBActual weight usage ≈ 1.47 TiBLeft for KV Cache and buffers ≈ 0.3 TiB scale
There are two conclusions. First, the average weight shard per die is about 46 GiB, which looks comfortable, but the expert distribution of an MoE is not naturally even and must rely on shard alignment in the loader. Second, the KV Cache for a 1M context is the main variable and should be constrained jointly by maximum sequence length, concurrency, and block-based cache recycling, rather than being opened up without limit.
3. Parallel Strategy: Tensor Parallelism Within Nodes, Pipeline Parallelism Across Nodes
It is not advisable to run a single-layer tensor parallelism with world size 32 directly across 32 cards. Tensor parallelism has the highest communication frequency, and once it crosses the node boundary, both latency and bandwidth become bottlenecks. A more stable approach is to split in layers:
- Intra-node TP16: split a single layer’s matrices across 16 dies over the high-speed inter-card interconnect, keeping communication inside the chassis;
- Inter-node PP2: split into two pipeline stages by layer, passing only activation tensors across nodes, reducing communication volume by one to two orders of magnitude;
- world size = 16 × 2 = 32, corresponding one-to-one with the physical topology.
Pipeline parallelism requires attention to load balancing: the stage split point should make the compute, number of experts, and KV Cache usage of the two stages as symmetric as possible; otherwise, bubbles get amplified. In engineering, it is recommended to factor the extra overhead of the embedding with the first stage and the last stage with the output head/LM Head into the split weights, rather than simply halving by layer count.
Illustrative startup parameters (only expressing structure, not representing any specific implementation):
python -m vllm.entrypoints.openai.api_server \--model /models/kimi-k3.1-pro-w4a8 \--tensor-parallel-size 16 \--pipeline-parallel-size 2 \--max-model-len 262144 \--gpu-memory-utilization 0.88 \--trust-remote-code
Here, --gpu-memory-utilization is recommended to start from 0.85~0.90 and gradually probe upward; do not fill in 1M for --max-model-len right away—first validate the pipeline with 256K, then gradually scale up while observing the KV Cache growth curve.
4. Weight Preparation: Shard Integrity Matters More Than Download Speed
Quantized weights are usually released as hundreds of safetensors shards; in this case, 346 shards totaling 1,466,844,769,783 bytes. In multi-node scenarios, the most common problem is not a failed download but “one node is missing a shard, or a shard has the wrong byte count,” which then produces hard-to-locate shape or dtype errors during loading.
Recommended process:
- Pin the version: record the revision hash to ensure the weights on both nodes are exactly identical, avoiding the two PP stages using different weights;
- Single-point download: pull from the public network on only the first node; public bandwidth is usually only tens of MB/s, and 1.47 TB takes several hours;
- Direct node-to-node transfer: use the cluster’s high-speed network to copy from the first node to the second, measured at about 490 MB/s, nearly ten times faster than the public network;
- Per-file verification: compare file names, byte counts, and digests, and proceed to deployment only after all pass;
- Storage medium: prefer local high-speed disks, avoiding multiple nodes reading the same network storage simultaneously and causing bandwidth contention.
When implementing on Baidu AI Cloud, this layer can be mapped to a combination of object storage plus high-speed parallel file storage: the source sits in object storage, nodes cache to local or parallel file systems, and inter-node copies go over the internal network, avoiding repeated consumption of public network egress.
5. Control Plane and Access: One Tunnel Reusing Four Types of Traffic
The complexity of multi-node inference operations often lies not in the model but in the control plane. A simpler approach is to run a static single-file proxy process on each node, with the node actively establishing an outbound long connection, and control commands, monitoring metrics, logs, and inference requests all reusing the same tunnel. This brings three direct benefits: no inbound ports need to be opened on nodes, the inference service does not need to be exposed to the public network, and node online/offline is transparent to the platform.
The access steps can be abstracted as: generate an install command in the console → execute it on the target machine → the node automatically registers carrying accelerator card, network card, and storage information. The access experience for domestic accelerators and general accelerators should be consistent, with differences only reflected in resource description fields.
Security recommendations: the tunnel should enable mutual authentication and least-privilege tokens; inference ports should be exposed only through a gateway; avoid printing full prompts in logs to prevent sensitive data leakage.
6. Parameter Network: Bring Inter-Card Interconnect into Orchestration
Multi-node deployment must distinguish the “business network” from the “accelerator network.” The former carries management traffic, and the latter carries the collective communication of TP/PP. The correct approach is to explicitly create a parameter network in the platform, add the inter-card interconnect of the two nodes to the same network, and perform connectivity and bandwidth checks, with automatic node selection based on that network during deployment.
If this step is ignored, the scheduler may place the two PP stages on ordinary cross-machine Ethernet, manifesting as “can start but extremely low throughput.” The way to judge is simple: observe the tokens per unit time and the proportion of collective communication time; if communication accounts for more than 30%, the network selection is basically wrong.
7. Pin Images and Versions
Reproducibility of large model services depends on the dual fixing of images and weights. It is recommended to:
- Pin images by digest rather than using floating tags;
- Keep the inference framework version consistent with the version recommended by the model publisher;
- Include driver, firmware, and communication library versions in the same baseline document;
- Roll out changes gradually: first validate loading on a single node, then scale to two nodes.
8. Load Testing and Tuning: Start from the Gateway Side, Not Local Loopback
Load testing should be initiated from an independent machine, hitting the instance through the platform gateway to cover the real link. It is recommended to proceed in four steps:
- Functional validation: a single request with a short prompt, confirming multimodal input and long context do not error;
- Single-concurrency latency: measure first-token latency and per-token latency to locate PP bubbles;
- Stepped concurrency: apply load progressively at 8/16/32/64, recording throughput inflection points and memory levels;
- Long context: gradually scale from 256K to 1M, observing KV Cache and preemption rate.
The recommended tuning priority is: network selection > parallel splitting > memory utilization > batching and scheduling parameters. Reversing the order often leads to twice the effort for half the result.
9. Common Fault Reference Table
| Symptom | High-Probability Cause | Handling Direction |
|---|---|---|
| Shape error during loading | Missing shards or version mismatch | Per-file verification, lock the revision |
| Can start but extremely low throughput | Cross-node traffic went over ordinary network | Fix parameter network and node selection |
| OOM during runtime | KV Cache limit set too wide | Lower max-model-len or concurrency |
| Large jitter in first-token latency | Uneven PP split | Recompute split point, factor in output head overhead |
| Node dropout | Tunnel interruption | Check proxy process and authentication token |
10. Conclusion
Bringing trillion-parameter MoE to multi-node deployment on domestic accelerators is essentially the convergence of three things: capacity budgeting must leave enough headroom, parallel splitting must fit the physical topology, and weights and images must be verifiable and reproducible throughout. Doing these three solidly, combined with unified node access and parameter network orchestration, turns hosting 1.47 TB-class quantized weights on two nodes and 32 cards from “luck” into a “repeatable engineering process.”
