Trillion-Parameter MoE Deployment on Domestic Accelerators: A Real-World Two-Node, 32-Die Inference Guide
This article documents a real-world deployment of a trillion-parameter MoE model on two domestic accelerator servers with 32 dies in total. It covers the hardware and memory constraints, the parallelization strategy using TP16 within each node and PP2 across nodes, W4A8 quantization considerations, node onboarding, parameter network configuration, weight distribution, deployment settings, and validation results. The setup successfully processed 836 requests across random 2K/512, 80K agentic, and 200K agentic workloads with a 100% success rate, demonstrating that domestic accelerator clusters can support long-context Agent-style inference at this scale.
1. Background: Why Run a Real-Device Test on Domestic Accelerators
We previously tested a similar model on a single flagship accelerator card. However, a single card can only verify whether a model can be loaded. It cannot answer the questions that matter most in production:
- How should a trillion-parameter model be partitioned across multiple machines?
- Can cross-node communication hold up under real inference traffic?
- Are inference and tool calls stable under extremely long contexts?
These questions can only be answered on a real multi-node cluster. In China, many teams are moving large-model applications from short dialogues to Agent scenarios. A single request may carry tens of thousands or even hundreds of thousands of tokens, including conversation history, tool outputs, and reasoning traces. This puts strong demands on the long-context capacity and stability of the inference service. Running this kind of workload on domestic accelerators for a real-device validation is a key step in assessing whether an independent compute stack can support real business workloads.
In this article, we used the “domestic accelerator, two-node” profile already available in a general-purpose compute scheduling platform (referred to as the platform). We deployed the model on two domestic accelerator servers, each with 16 dies per node. After selecting the template and starting deployment, the two nodes launched an instance with tensor parallelism of 16 per node and pipeline parallelism of 2 across nodes, resulting in a world size of 32.
During testing, normal chat, reasoning output, and tool calling all behaved as expected. A total of 836 requests across three load-test groups — random 2048/512, Agentic 80K, and Agentic 200K — all succeeded.
This article provides the complete test environment, preparation steps, configuration considerations, and validation results. It also explains the reasoning behind each decision so that readers can reproduce or migrate the setup in their own environments.
2. Understanding the Model: Hard Constraints for Deploying a Trillion-Parameter MoE Model
The target model is a native multimodal MoE large model:
- Total parameters: approximately 2.8T
- Activated parameters per token: approximately 104B
- Activation ratio: approximately 3.7%
- Native context length: 1M tokens
- Native support for multimodal inputs such as text and images
“Native” means that long-context and multimodal capabilities are not added through post-training or external plugins. From an inference-system perspective, this directly affects resource planning.
The weights we used were the community-released W4A8 quantized version, approximately 1.47 TB, or 1,466,844,769,783 bytes, with 346 shard files. At runtime, we used the official inference engine image released with the model and adapted for domestic accelerators. The template fixed the image digest.
2.1 Memory Budget: Why a Single Node Is Not Enough
| Item | Capacity | Notes |
|---|---|---|
| Model weights | ~1.47 TB | Actual on-disk and load size after W4A8 quantization |
| Single-node accelerator memory | ~1.10 TB | 16 dies × 64 GiB |
| Total accelerator memory across two nodes | ~2.20 TB | 32 dies × 64 GiB |
| Available headroom after loading weights | ~0.73 TB | For KV cache, activations, and framework overhead |
The conclusion is clear:
- A single node has about 1.10 TB of accelerator memory, which is not enough to hold 1.47 TB of weights, so the model must be deployed across nodes.
- After loading, the weights occupy about 67% of total accelerator memory. The remaining ~0.73 TB must simultaneously hold KV cache, activations, communication buffers, and framework overhead.
- In extremely long-context scenarios, KV cache is often the decisive factor consuming the remaining memory.
The sparse activation nature of MoE is actually an advantage here. Each token only computes approximately 104B parameters. Although the total weights are large, the number of parameters actually participating in computation per token is much smaller than that of a dense model of similar parameter size. The trade-off is that expert weights must still reside in accelerator memory. Saving compute does not mean saving memory.
2.2 Parallelism Strategy: Why TP16 × PP2
The core principle of parallelism partitioning is to keep the layer with the largest communication volume on the highest-bandwidth link. There is a significant bandwidth difference between the two available links:
- Inside a node: 16 dies are directly connected through high-speed interconnect. This is suitable for collective communication such as tensor-parallel AllReduce, which is high-frequency and sensitive to latency.
- Across nodes: Communication uses the parameter network RDMA link. This is suitable for transferring relatively controllable amounts of data.
Based on this, we chose:
- Tensor parallelism of 16 per node
- Pipeline parallelism of 2 across nodes
- World size = 16 × 2 = 32
Why TP is 16 instead of 32:
- Tensor parallelism requires repeated AllReduce operations within every layer for each token.
- TP32 would mean that every reduction must cross machines, multiplying communication overhead.
- TP16 keeps all reductions inside each node.
Why PP can cross nodes:
- Pipeline parallelism only transfers intermediate activations at stage boundaries.
- The cross-node data volume is much smaller than the layer-by-layer reductions required by TP.
MoE expert routing:
- With W4A8 quantization, the weight footprint per die is approximately 45.8 GB.
- Expert weights can fit within a node, avoiding frequent cross-node expert dispatch traffic.
Pipeline parallelism also has costs. A pipeline has bubbles, and uneven load across stages can amplify those bubbles. For Agent workloads, which combine long prefill with multi-turn decoding, enough concurrency is required to keep the pipeline filled.
2.3 W4A8 Quantization: Benefits and Costs
W4A8 means 4-bit weights and 8-bit activations. Compared with BF16/FP16 weights, the weight size is approximately one quarter, and it is generally more memory-efficient than W8A8. The cost is potential accuracy regression and a more complex computation path.
Therefore, two things must be verified during deployment:
- Whether the target inference engine and image provide W4A8 dequantization operators and MoE support.
- Whether output quality remains acceptable in accuracy-sensitive scenarios such as long contexts and tool calling.
Both checks passed in this validation.
2.4 Functional Validation Checklist
| Capability | Validation Method | Pass Criteria |
|---|---|---|
| Normal chat | Short Q&A, one streaming round and one non-streaming round | Coherent content, no garbled text or abnormal truncation |
| Multimodal input | Mixed text and image input | Correctly recognizes and answers based on image content |
| Reasoning process | Enable chain-of-thought output | Reasoning fields are complete and coherent, and do not contradict the final conclusion |
| Tool calling | Define tool schemas and trigger multiple calls | Function names and arguments are valid, and results can be returned to the conversation |
| Long context | 80K / 200K-level inputs | Key information is retrieved correctly, and earlier instructions are not lost |
3. Environment and Resource Planning
| Item | Configuration |
|---|---|
| Nodes | 2 domestic accelerator servers, each with 16 dies (64 GiB per die), 32 dies in total |
| Interconnect | Cross-node communication via the parameter network RDMA link; high-speed interconnect inside each node |
| Parallelism | TP16 per node, PP2 across nodes, world size 32 |
| Model | Community W4A8 quantized weights, approximately 1.47 TB, 346 shards |
| Runtime | Official inference image released with the model and adapted for domestic accelerators; digest fixed in the template |
| Platform | Platform nightly version; load tests were initiated from a load-testing machine and reached the instance through the platform gateway |
The platform’s server and agent are statically compiled single binaries, so deployment does not depend on a complex runtime environment. The agent on each node actively establishes an outbound connection to the server. Control, monitoring, logs, and inference traffic all reuse the same tunnel.
This makes deployment simple: domestic accelerator nodes and general-purpose GPU nodes are onboarded in exactly the same way. You copy one installation command from the console and run it on the machine. There is no need to maintain a separate onboarding process for domestic accelerators. When a node comes online, it automatically reports information about NPUs, network cards, and storage, making it immediately available for scheduling.
4. Preparation: Nodes, Network, and Weights
4.1 Node Onboarding: First Confirm That Resources Are Fully Recognized
Go to Compute Nodes → Add Node to generate the installation command, then run it on both domestic accelerator servers. After the nodes come online, confirm that the accelerator count and model are correctly identified on each machine.
In this test, each node recognized 16 dies. This was the prerequisite for TP16. If the recognized count does not match, troubleshoot the driver and firmware first instead of continuing deployment with the issue unresolved.
4.2 Parameter Network: Make Sure Cross-Node Communication Takes the Right Path
Multi-node inference on domestic accelerators depends on the accelerator parameter network. In the Network section, add the high-speed interconnect of the two nodes to the same parameter network. The platform will perform inter-card connectivity checks and automatically select nodes from that network during deployment.
This step is easy to overlook but critical. If cross-node traffic does not use RDMA and instead falls back to ordinary Ethernet, TP/PP communication overhead may increase by an order of magnitude, resulting in sharp throughput drops or even timeouts.
4.3 Weight Distribution: Reducing the Copy Time from 8 Hours to About 1 Hour
In the Models section, choose a public model repository source and download the weights to the first node. The second node does not need to download from the public internet again. Use “Copy to…” to transfer directly from the first node.
| Method | Measured Speed | Expected Time for 1.47 TB |
|---|---|---|
| Public internet download | ~50–57 MB/s | ~7.5–8.1 hours |
| Node-to-node direct transfer | ~490 MB/s | ~50 minutes |
Node-to-node direct transfer was almost 10 times faster. If both nodes downloaded independently from the public internet, total waiting time would increase from about 8 hours to more than 15 hours. With direct transfer, total time is about 9 hours, and the second node remains idle during the copy. Based on this, each additional node would save about 7 hours of public-internet download time.
After the weights are present on both nodes, the platform validates each file for integrity. If even one byte is corrupted in a sharded weight file, loading will fail, and the error location is often far from the real cause. Early validation saves substantial troubleshooting time.
If the platform does not support node-to-node direct transfer, shared storage or object storage can be used as an intermediate step. This also avoids repeatedly downloading from the public internet.
5. Deployment: From Template to Instance
In the inference template, select the domestic accelerator, two-node profile, fill in the model and parallelism parameters, select the parameter network configured in section 4.2 and the weights prepared in section 4.3, then click deploy.
The platform will launch 16 parallel workers on each node, forming an instance with TP16 × PP2 and a world size of 32.
The most time-consuming part of the initial deployment is loading the 1.47 TB weights. During this period, the instance is not ready. Do not send load-test traffic before the health check passes.
The following settings are worth checking manually:
- Context length and KV cache: The model supports a 1M context, but whether the service can expose 1M depends on whether KV cache memory is sufficient. It is recommended to start with a smaller limit, such as 128K, observe memory usage, and then gradually increase the limit.
- Concurrency and batching: Continuous batching can significantly improve throughput, but higher concurrency also increases KV cache usage. Leave enough headroom to avoid request preemption and recomputation.
- Multimodal preprocessing: Image and text inputs consume additional preprocessing and vision-encoding resources. When multimodal concurrency is high, this overhead should be monitored closely.
6. Validation Results: All 836 Requests Succeeded
Load tests were initiated from a load-testing machine and reached the instance through the platform gateway. The three test groups contained 836 requests in total.
| Test Group | Input Size | Output Length | Focus |
|---|---|---|---|
| Random workload | ~2048 tokens | ~512 tokens | Baseline throughput and latency |
| Agentic long context | ~80K tokens | Multi-turn tool calling | Correctness of reasoning and tool calling |
| Agentic ultra-long context | ~200K tokens | Multi-turn tool calling | KV cache capacity and long-range stability |
All 836 requests across the three groups succeeded. Here, “success” means that the complete generation result was returned, the reasoning and tool-calling structures were valid, and the results passed correctness checks.
One notable comparison is that the random workload used only about 2048 input tokens, while the Agentic 200K group used about 100 times more. Both groups maintained a 100% success rate. This shows that the instance could still schedule requests stably at 200K-level inputs without request failures caused by insufficient memory or timeouts.
It is important to note that this article focuses on the deployment path and correctness/stability validation. Metrics such as latency and throughput are strongly affected by concurrency, output length, and tool-calling patterns. For actual capacity planning, load testing should be repeated using your own workloads.
7. Common Pitfalls and Optimization Tips
Align driver, firmware, and image versions
Operator support on domestic accelerators is highly dependent on version combinations. Prefer the official image released with the model, and fix the digest in the template to avoid situations where the system worked yesterday but fails to start today.Verify weight integrity
The weight files are numerous and large. Validate each file before deployment. Do not repeatedly restart the service with corrupted shards.Configure the parameter network first
Configure the parameter network and confirm that connectivity checks pass before deploying the instance. This prevents cross-node communication from taking the wrong path.Match parallelism with memory
The TP degree determines the scope of intra-node reductions, while the number of PP stages determines the number of cross-node transfers. If the model continues to grow, first ensure that TP does not cross nodes, then scale horizontally by increasing PP stages.Cover real workloads in load testing
Testing only short requests such as 2048/512 can easily miss KV cache and scheduling issues that appear under long contexts. Agent scenarios should at least cover the context lengths used in real business traffic.
8. Summary
This real-device validation on a two-node, 32-die domestic accelerator cluster covered the entire workflow from node onboarding, parameter network configuration, and weight distribution to deployment and load testing.
The core conclusions are:
- The partitioning logic is reusable: TP16 within nodes and PP2 across nodes is a reasonable starting point for running a trillion-parameter MoE model on domestic accelerators.
- The weight-copy process can be optimized: Node-to-node direct transfer reduced the time needed to obtain the second copy of the weights from several hours to about 50 minutes.
- Stability can be verified: All 836 requests succeeded, including inputs up to 200K tokens, showing that domestic compute infrastructure already has the foundational capability to support long-context Agent workloads.
Next, we will continue validating larger concurrency, larger node counts, and the impact of quantization accuracy on business results on domestic compute infrastructure.
