Deploying a 2.8T MoE Model on Two Domestic NPU Servers: TP16 x PP2 in Practice
This article walks through a real-machine deployment of a 2.8T-parameter sparse MoE model on two domestic (China-made) NPU servers, using a W4A8-quantized release of roughly 1.47 TB. It covers the memory budget behind the 32-die configuration, why tensor parallelism stays inside a node while pipeline parallelism spans nodes, environment and network setup, weight distribution strategy, launch parameters, health checks, and a three-tier load test (short sequences, 80K, and 200K inputs) in which all 836 requests succeeded. It also includes a troubleshooting table and a go-live checklist.
Why “it fits” does not mean “it runs”
After validating the model on a single flagship GPU, the team moved on to domestic accelerators. The platform already stores the adaptation configuration for a very large MoE model as a preset inference template. This article documents the full on-premise validation on two domestic NPU servers: model specs, parallelism strategy, environment setup, load-testing methodology, and troubleshooting. The deployment itself took nothing more than selecting the template and clicking Deploy — the two nodes came up with tensor parallelism of 16 and pipeline parallelism of 2, forming a single 32-die inference instance.
Two baseline facts about the model under test:
- Parameter composition: roughly 2.8T total parameters, about 104B activated per token — a typical fine-grained sparse MoE architecture. Native multimodal input, with a nominal context window of 1M tokens.
- Weight format: the W4A8 quantized version published by the community — 346 safetensors shards totaling about 1.47 TB (1,466,844,769,783 bytes). The image uses the official adapted inference engine released alongside the model, and the template pins the image digest.
The defining characteristic of a MoE model — huge total parameters but little compute per token — means the deployment challenge is not raw compute. It concentrates in three places:
- Memory capacity: all expert weights must stay resident in memory, regardless of how many experts a given token actually activates. Even after quantization, that is about 1.47 TB.
- Communication topology: tensor parallelism (TP) is communication-heavy and sits inside operators, so it is the most sensitive to link bandwidth and latency. Pipeline parallelism (PP) communicates sparsely, passing activations only between adjacent stages, which makes it suitable across nodes. Parallel splits must be aligned with the physical topology.
- Context overhead: in long-context inference, the KV cache can become the dominant consumer of memory. A nominal 1M-token context does not mean memory can support any combination of length and concurrency.
Deployment therefore breaks down into four sequential questions: does the capacity math hold up → does the parallel topology match the hardware → can the weights be staged efficiently → does long-context load testing stay stable. The sections below take them in order.
The memory ledger: budget before you deploy
Total memory vs. weight footprint
Each test server has 16 compute dies, each with 64 GiB of memory — 32 dies and 2048 GiB across the two machines. A rough estimate based on “memory per die × number of dies”:
- Weights average about 42.7 GiB per die, roughly 67% of the per-die memory;
- The remaining ~672 GiB must simultaneously hold the KV cache, activations, communication buffers, and runtime framework overhead;
- Even with perfectly uniform distribution, a single machine’s 16 dies (1024 GiB) cannot hold 1.47 TB of weights. Spanning machines is a hard constraint.
The memory headroom is not generous, which is exactly why W4A8 quantization is required:
- Quantization gain: the same model served in BF16 would need roughly 2.8T × 2 B = 5.6 TB of weights — nearly 4× the W4A8 footprint, which two machines simply cannot hold.
- Relative accuracy: compared with weight-only quantization, W4A8 (4-bit weights, 8-bit activations) is a more balanced point between accuracy and throughput, and is a common way to fit very large MoE models into limited memory.
Nominal context vs. usable context
“Supports 1M tokens” is an architectural ceiling. Actual serving capability is determined jointly by memory and the scheduler, and before going live it has to be pinned down to three parameters:
- max-model-len: the maximum context a single request may use under the engine;
- Total KV cache capacity: determined by the memory budget and the per-token KV cost;
- Maximum number of concurrent sequences.
For long-context, high-concurrency agent scenarios, derive the configuration backward from: total holdable tokens ≥ average context length × concurrency × safety factor. A safety factor of 1.2–1.5 is recommended to absorb KV cache fragmentation and input-length variance.
Note that KV cost scales linearly with the number of layers, the number of attention and KV heads, and the precision used for KV per token. Multimodal input is first encoded into visual tokens before entering the sequence, and images or video significantly amplify KV cost. These coefficients should be taken from the implementation of your chosen inference engine on the target version — do not reuse rule-of-thumb values from other models.
Parallelism strategy: why TP16 × PP2
With world size = 32, there are two main ways to split:
| Split | In-node TP | Cross-node PP | Assessment |
|---|---|---|---|
| TP16 × PP2 | 16 | 2 | Communication-heavy TP stays entirely within a node; only pipeline activations cross the network, so network requirements are low. Used here. |
| TP32 × PP1 | 32 | 1 | No pipeline bubbles, but every layer’s TP collective communication crosses nodes, which is a disadvantage in both bandwidth and latency |
Each token activates only a small number of experts, so per-token arithmetic intensity is low. In that regime, TP collectives are the more likely bottleneck and should be kept off the inter-node link. PP also lets you divide weights evenly by stage, keeping per-stage load as close as possible.
There are middle-ground options, such as expert parallelism and other strategies that shard along the MoE expert dimension, but they likewise depend on high-bandwidth interconnect. Choose based on your actual topology and what the engine supports.
Environment setup: nodes, network, weights
Onboarding nodes: making the control plane aware of the compute
The management platform uses a server + agent architecture, and both are statically linked single binaries. The agent runs on the compute node and dials out to the server; control commands, monitoring metrics, logs, and inference traffic all reuse the same tunnel, so no inbound ports need to be opened on the node.
Domestic NPU nodes onboard exactly like mainstream GPU nodes: generate an install command under “Compute Nodes → Add Node” in the console, run it on the target machine, and the node comes online carrying its NPU, NIC, and storage inventory. The platform automatically detects 16 NPU dies per machine, so a heterogeneous cluster can be managed uniformly.
This architecture also means inference traffic is bound to the control tunnel. In production, guarantee the stability and bandwidth of the tunnel link, and configure reconnect and timeout policies so that a network hiccup does not degrade the management plane and the serving plane at the same time.
Parameter network: putting the cards in one communication domain
Multi-node inference on domestic NPUs runs over the accelerator parameter network. Add the high-speed interconnect ports of both machines to the same parameter network under “Network”; the platform then runs an inter-card connectivity check and automatically selects nodes that belong to that network at deployment time.
This step corresponds to communication-domain partitioning in distributed training/inference:
- Only devices inside the parameter network can form the same TP/PP process groups, which is what guarantees collective-communication semantics;
- Whether the interconnect topology between nodes is symmetric directly determines the stability of the cross-machine PP link;
- Business traffic should go over separate NICs and a separate subnet, so that load-test traffic and collective communication do not contend with each other.
Staging weights: the 1.47 TB download bill
Select the community model repository as the source on the “Models” page and download to the first node. The second node does not need to go out to the public internet — use “Copy to…” to transfer directly from the first node.
| Distribution method | Measured bandwidth | Time to transfer 1.47 TB (approx.) |
|---|---|---|
| Public internet download | 50–57 MB/s | 7.5–8.2 hours |
| Direct node-to-node copy | ~490 MB/s | ~53 minutes |
At around 53 MB/s, pulling a copy of the weights from the public internet takes more than seven hours. When scaled linearly across nodes, that saturates egress bandwidth for a long time and may even run into provider-side throttling. Node-to-node transfer is roughly 9× faster than public download. For larger clusters, use tree-style distribution (layer-by-layer fan-out) or shared file storage to shorten preparation time further.
Once the weights are in place, two verifications remain:
- Shard integrity: at startup the engine reads the safetensors index and loads shard by shard; a missing shard or a hash mismatch fails immediately.
- Version consistency: pin the weight version and the image digest. For this test, the weight revision was fixed at bc63234…0ada and the image digest pinned in the template was sha256:e7c67329…96b7, so any deployment is traceable and reproducible.
Launch and validation: from “it started” to “it’s correct”
Bringing up two nodes: one instance, two identical commands
Once the template parameters check out, click Deploy. The platform starts the inference process on both nodes with identical configuration, forming a single instance with world size 32. Illustrative configuration (parameter names vary by inference engine version):
# Run inside the inference container, with the same command on both nodes# Generic engine parameters are shown below; follow the version of the engine you chosepython -m <inference_engine_entrypoint> \--model /models/k3-w4a8 \--served-model-name local-moe \--trust-remote-code \--quantization w4a8 \--tensor-parallel-size 16 \--pipeline-parallel-size 2 \--max-model-len 262144 \--enable-prefix-caching
The container must mount the accelerator devices (--device or privileged mode) and shared memory, and kernel parameters must be set according to the requirements of the accelerator software stack.
| Parameter | Value | Purpose |
|---|---|---|
| tensor-parallel-size | 16 | Shards each layer across the 16 dies inside a node, so collectives never leave the node |
| pipeline-parallel-size | 2 | Each node takes one pipeline stage; only activations cross machines |
| max-model-len | 262144 | Set from memory headroom and business needs — no need to chase the nominal 1M |
| enable-prefix-caching | On | Reuses system prompts and tool definitions that recur in agent workloads |
In a multi-node deployment, the distributed timeout (e.g., 2400 seconds) should not be left at its default either. A very large MoE takes a long time per step and waits on stage synchronization frequently, so too short a timeout produces NCCL-style timeout errors. Confirm the exact parameters against your chosen engine.
Health check list
An instance that is up is not necessarily an instance that infers correctly. Validate in three layers, shallow to deep:
- Process and link layer: all 32 dies are in the same process group, no rank is missing, and parameter-network links are healthy.
- Inference functionality layer:
- Send a basic chat request and confirm the output is coherent;
- Enable streaming output and confirm tokens return continuously;
- Run a structured output request (e.g., JSON mode) and confirm the format constraint is enforced;
- Build a request containing tool definitions (function calling) and confirm tool calls are recognized and the reasoning fields are returned intact.
- Long-context layer: issue a request with input close to max-model-len and watch KV cache allocation and remaining memory — this is the precondition for load testing.
Load test design: three workloads, 836 requests, all successful
Test case design
Load testing is initiated from the management side, enters the inference instance through the platform gateway, and covers three typical shapes of real business traffic:
| Workload | Input/output tokens | Simulated scenario | Key focus |
|---|---|---|---|
| Random short sequences | ~2048 / 512 | Routine Q&A, summarization | Baseline throughput and latency |
| Agentic long context | ~80K input | Multi-turn tool calls, codebase understanding | KV usage, TTFT, prefix reuse |
| Agentic very long context | ~200K input | Long-document analysis, complex task orchestration | Memory limits, scheduling stability for long sequences |
All 836 requests across the three groups succeeded, with chat, reasoning traces, and tool calls all behaving normally.
- The random short-sequence group validates the engine’s baseline capabilities and serves as a reference for throughput and latency.
- The 80K group is the typical range for agent systems: once system prompts, message history, and tool return values stack up, contexts routinely land somewhere between tens of thousands and just over a hundred thousand tokens.
- The 200K group probes memory limits and scheduling stability under long sequences, guarding against crashes or long-tail timeouts on extreme inputs after launch.
Why “all requests succeeded” is the key result
The most common failure mode for long-context MoE serving is not missing throughput targets — it is that some requests time out or fail at extreme lengths. Causes include KV cache contention, jitter on the cross-machine PP link, and tool-call parsing anomalies. If a load test only reports peak throughput, it hides exactly these problems. Making request success rate the primary acceptance metric, and only then looking at latency distribution, is what reflects real production availability.
What to observe beyond the load test
It is worth collecting the following metrics throughout the run (metric names depend on your engine and monitoring stack):
- Engine side: TTFT, TPOT (time per output token), end-to-end latency P50/P95/P99, throughput, KV cache utilization, preemption/recompute counts;
- Hardware side: per-die memory usage, compute utilization, temperature and power, parameter-network link status;
- Platform side: gateway error rate, exception stacks in instance logs, node heartbeats.
Comparing measured data for TP16 × PP2 against TP32 × PP1 is how you validate the decision to keep communication-heavy operators inside the node.
Common issues and troubleshooting
| Symptom | Likely cause | Where to look |
|---|---|---|
| OOM immediately at startup | Weight footprint higher than expected, or no headroom reserved for KV cache | Recompute with the engine’s memory estimator; lower max-model-len or the concurrency limit |
| Timeout during load or inference | Cross-node collective-communication timeout threshold too small | Increase the distributed timeout parameter appropriately |
| Throughput far below expectations | Uneven PP stage load, prefix cache misses, or business traffic mixing with parameter-network traffic | Check stage partitioning and cache hit rate; separate the parameter network from the business network |
| Very long requests rejected or timed out | Single request exceeds max-model-len, or KV contention triggers queueing | Validate, truncate, or shard over-long inputs |
| Intermittent tool-call failures | Template or parser not matched to the model version | Pin the image digest and weight version; regression-test structured output cases |
| Node dropout makes the instance unavailable | Management tunnel interruption | Configure reconnect and health checks; schedule the instance onto healthy nodes |
Summary and best practices
This validation shows that a MoE model with 2.8T total parameters, after W4A8 quantization, can serve reliably on 2 domestic NPU servers (32 dies). Five takeaways:
- Do the math before deploying: derive die count and parallel splits backward from weight size, KV cost, and concurrency targets;
- Align parallelism with topology: keep TP inside the node and carry PP across nodes;
- Distribute weights node-to-node: replace concurrent public-internet downloads with shared storage or tree-style distribution;
- Keep versions reproducible end to end: pin the weight revision and the image digest;
- Accept long context on success rate: make 80K- and 200K-scale agent workloads mandatory test cases.
Go-live checklist
- Memory ledger computed; max-model-len and concurrency limits match the business
- Parameter-network connectivity check passed; business traffic isolated
- Weight shards integrity-verified; node-to-node or shared distribution in use
- Weight revision and image digest pinned
- Chat, streaming, structured output, and tool calling all validated
- Request success rate met for the short-sequence, 80K, and 200K load test groups
- Engine-, hardware-, and platform-level monitoring in place with alert thresholds configured
