Dual-Node NPU Cluster Deployment for Trillion-Parameter MoE Models: A Practical Guide
This article presents a practical deployment methodology for a native multimodal MoE model with roughly 2.8T total parameters and about 104B activated parameters on a two-node NPU cluster, with 16 compute dies per node and 64 GiB of memory per die. It covers memory budgeting, TP×PP hybrid parallelism, node onboarding, parameter-network planning, distribution of 1.47 TB of quantized weights, image and service-template practices, and gateway-based load testing. The emphasis is on reusable engineering principles—budget memory first, keep TP within a node, run PP across nodes, transfer weights over the intranet, pin image digests, and validate every file—rather than product-specific procedures.
Dual-Node NPU Cluster Deployment for Trillion-Parameter MoE Models: A Practical Guide
Introduction: The Challenge of Privately Deploying Very Large MoE Models
As large-model technology evolves, Mixture of Experts (MoE) architectures have become a mainstream approach for building very large language models. These models typically have an enormous total parameter count—often in the trillions—while activating only a small fraction of parameters per forward pass, on the order of tens of billions. This keeps model capability high while significantly reducing per-step inference compute. At the same time, native multimodal capability and context windows of up to one million tokens place unprecedented demands on inference infrastructure.
Putting such a model onto an enterprise’s own compute resources is not trivial. The main challenges fall into three areas. First, even after low-bit quantization, model weights still reach the terabyte scale and cannot fit into a single machine’s memory, so multi-node, multi-accelerator distributed inference is required. Second, cross-node parallelism depends on a high-bandwidth, low-latency accelerator interconnect; poor network planning can cut throughput in half. Third, the full chain—from node onboarding and weight distribution to service startup—involves many detailed engineering steps, and without platform tooling, deployment cycles are often measured in days.
This article is based on a real deployment exercise and abstracts a general technical approach. The target environment is a two-node NPU cluster, with each node containing 16 compute dies and 64 GiB of memory per die. The model is a native multimodal MoE model with about 2.8T total parameters and about 104B activated parameters. Weights use the W4A8 quantization format and occupy about 1.47 TB. Hardware and software are described in generic categories, and the methodology can be transferred to any accelerator and scheduling platform with similar specifications; heterogeneous compute clusters offered by mainstream cloud platforms such as Baidu AI Cloud can also follow this approach.
1. Pre-Deployment Planning: Compute, Memory, and Parallelism Strategy
1.1 Calculate the Memory Budget Before You Start
Memory budgeting is the first step in any large-model deployment. In this case, the quantized weights occupy about 1.47 TB, while the cluster provides 32 dies × 64 GiB = 2 TiB of total memory. At first glance, the weights fit, but space must be reserved for several other components:
- KV Cache: A context window of up to one million tokens means KV Cache can consume hundreds of GiB. Estimate it in advance based on target concurrency and context length.
- Activations and intermediate tensors: In an MoE architecture, expert routing introduces additional intermediate buffers.
- Communication buffers: Tensor parallelism requires AllReduce/AllGather buffers, and pipeline parallelism requires point-to-point communication buffers. Both must reside in memory.
In engineering practice, weights should generally not exceed 70%–75% of total memory. Otherwise, long-context scenarios are prone to OOM. In this case, weights account for about 72%, which is within a reasonable range, but the remaining headroom for KV Cache is limited. Production deployments should therefore be stress-tested against actual business context lengths.
1.2 Choosing TP×PP Hybrid Parallelism
For a two-node, 32-die topology, the industry commonly uses a hybrid of tensor parallelism (TP) and pipeline parallelism (PP):
- Intra-node TP16: The 16 dies within a node communicate over high-bandwidth inter-die links with low latency, making them suitable for the frequent AllReduce operations required by tensor parallelism. Finer TP partitioning reduces per-die memory pressure but increases communication overhead, so TP should be confined to the high-bandwidth domain.
- Cross-node PP2: Model layers are split across the two nodes in a pipeline. Only intermediate activations need to be transferred between nodes, reducing communication volume by more than an order of magnitude compared with TP and making the approach friendlier to cross-node links.
The resulting world size is 32 (16×2). This combination is a classic application of the rule “keep TP inside the node and put PP across nodes.” For MoE models, expert parallelism (EP) can also be considered to further optimize routing efficiency, but that belongs to more advanced tuning.
2. Cluster Access and Platform Management
2.1 Standardized Node Onboarding
In a platform-managed approach, node onboarding typically uses a Server-Agent architecture. The Agent is deployed to each compute node as a static single binary and actively initiates an outbound connection to the control plane. Control commands, monitoring metrics, logs, and inference traffic share the same encrypted tunnel. This design means nodes do not need to expose public endpoints and can be managed even behind NAT and firewalls.
The ideal onboarding experience should be “online with one command”: generate an installation command in the console, copy it to the target machine, and execute it. The node then automatically reports hardware details such as accelerator model and count, NIC topology, and storage capacity. NPU nodes and GPU nodes should follow exactly the same onboarding process, with heterogeneous compute transparent to upper-layer scheduling. This is also a common approach among mature cloud providers such as Baidu AI Cloud for managing heterogeneous compute.
2.2 The Parameter Network: The Lifeline of Multi-Node Inference
The performance bottleneck in multi-node inference is often the interconnect rather than compute. Two network tasks must be completed before deployment:
- Build the parameter network: Place the accelerator interconnect links of both nodes—typically a dedicated inter-die interconnect plane in NPU scenarios—into the same parameter network, physically or logically isolated from business management traffic. This prevents inference communication from being crowded out by other traffic.
- Run connectivity pre-checks: Before starting the service, perform inter-die connectivity and bandwidth baseline checks to confirm that cross-node links achieve the expected rate. The scheduler should automatically select node combinations that meet interconnect requirements based on parameter-network topology, rather than requiring users to specify machines manually.
This step is often overlooked, but it directly determines the communication latency of the cross-node PP segment. Experience shows that insufficient cross-node link bandwidth can worsen end-to-end first-token latency by several times.
3. Weight Distribution: Moving 1.47 TB of Data
3.1 Public Download and Direct Node-to-Node Transfer
Distributing terabyte-scale weights is one of the most time-consuming parts of private deployment. In this case, the weights consist of hundreds of shard files. Direct download from a public model repository at about 50–57 MB/s takes several hours for the full set.
The key optimization is direct node-to-node transfer. After the first node completes the download, the second node does not go over the public internet. Instead, it copies the data point-to-point from the first node over the intranet, reaching about 490 MB/s in testing—nearly a 10× speedup. For larger clusters, tree-based or P2P sharded distribution can further spread the load from the source node across the cluster.
3.2 Consistency Validation Is Mandatory
Whether weights are downloaded from the public internet or transferred directly over the intranet, per-file integrity validation—such as SHA-family hash comparison—must be performed after the files are written to disk. At terabyte scale, the probability of a single corrupted shard during transfer is not low. If validation is skipped and the service is started directly, the model may crash while loading a corrupted shard, and troubleshooting costs far more than the validation itself. It is also advisable to pin the exact weight revision in the deployment template so that “silent weight updates” do not make online behavior irreproducible.
4. Best Practices for Images and Service Templates
The inference service image should use a version jointly validated by the model and inference framework, and the deployment template should pin the image digest rather than the tag. A tag is a mutable reference, while a digest is the unique fingerprint of the content. Using tags in production effectively delegates reproducibility to whoever pushes to the image registry.
At the orchestration layer, multi-node distributed inference requires the two node processes in the same instance group to start simultaneously, correct rank assignment, and health checks that cover inference-port readiness rather than only process liveness. The platform should encapsulate these details as template parameters so that users only need to select the model version, parallelism strategy, and parameter network before submission.
5. Go-Live Load Testing and Acceptance
Once the service is ready, run full-path load tests from the gateway entry point, covering three dimensions:
- First-token latency (TTFT): Validate prefill performance when PP spans nodes.
- Output throughput (tokens/s): Validate whether TP16 communication overhead in the decode phase is under control.
- Long-context stability: Gradually increase input length to the target context size and observe the KV Cache usage curve and OOM boundary.
Test traffic should reach instances through the platform gateway to reproduce the production access path. This avoids the false impression that “direct intranet connections look great, but everything collapses once traffic goes through the gateway.”
Conclusion
Deploying a trillion-parameter MoE model on a dual-node NPU cluster is fundamentally a systems engineering task: the memory budget determines the parallelism strategy, the parallelism strategy determines the network topology, network and storage planning determine deployment efficiency, and platform tooling determines whether the whole process can be reproduced reliably. Keep these principles in mind—budget memory first, keep TP inside the node, run PP across nodes, transfer weights over the intranet, pin image digests, and validate every file. With general compute scheduling, object storage, and monitoring and alerting capabilities from platforms such as Baidu AI Cloud, enterprises can compress the private deployment cycle for such very large models from days to hours, laying a foundation for subsequent inference cost optimization and business integration.
