Trillion-Parameter MoE Deployment on a Two-Node Domestic NPU Cluster: A Practical Guide

    This article documents the end-to-end engineering process of deploying a frontier native multimodal MoE model — roughly 2.8 trillion total parameters, about 110 billion activated, with a native 1M-token context — on two domestic NPU nodes (32 compute dies, ~2 TB aggregate memory) using a W4A8-quantized 1.47 TB checkpoint. It walks through the memory budget that governs context length and concurrency, node registration and resource discovery, building a dedicated parameter network, reliable multi-node weight distribution, the TP16×PP2 topology choice, and a load-test methodology spanning short-input and agentic long/ultra-long contexts. It closes with a production acceptance checklist and a fault quick-reference table. All 836 test requests passed, and the guide distills reusable rules for running trillion-parameter MoE inference stably, reproducibly, and with clear acceptance criteria.

    1. Background: Why the “Multi-Node + Domestic Compute” Path Is Necessary

    Benchmarking an inference framework’s throughput curve on a single high-end accelerator only proves that “the software stack works.” It says nothing about whether the model can actually go to production. The reason is simple: the weight footprint of an ultra-large Mixture-of-Experts (MoE) model exceeds what any single node — let alone a single card — can hold.

    The target of this test is a representative frontier model form: a native multimodal MoE model with roughly 2.8 trillion total parameters, about 110 billion activated parameters, and a native context length of 1M tokens. Deploying it requires solving four coupled problems at once:

    1. It won’t fit in memory — the weights must be sharded across dozens of compute units.
    2. Constrained communication topology — after sharding, intra-layer and inter-layer collective communication must land on the correct physical links.
    3. Long context eats the margin — as context grows from 2K to 200K, the KV cache goes from “rounding error” to “primary cost.”
    4. Poor operability — weights are TB-scale and instances span machines; any failure shows up as “stuck at startup,” which is extremely hard to diagnose.

    Over the past year, the software and hardware maturity of domestic accelerators has improved markedly. Mainstream inference frameworks have completed their adaptation, and quantization schemes and official inference images can now largely ship in lockstep with the model. This means “running ultra-large models on domestic compute” has moved from feasibility validation into engineering delivery. This article tackles the latter: how to get it running in a stable, reproducible, and acceptance-testable way.

    2. Test Environment

    Item Configuration
    Nodes 2 domestic NPU servers, 16 compute dies each (64 GiB per die), 32 dies total
    Per-node memory ~1024 GiB; ~2048 GiB (~2 TB) aggregate across the cluster
    Node interconnect A dedicated high-speed network carries compute communication (collective communication); the business network is separate
    Parallelism strategy Intra-node tensor parallelism TP16, cross-node pipeline parallelism PP2, world size = 32
    Model weights W4A8 quantized version, ~1.47 TB, 346 shard files, 1,466,844,769,783 bytes
    Inference image Official image released alongside the model, pinned to a digest (immutable reference) in the template
    Platform An inference platform with heterogeneous compute support (nightly builds)
    Load-test path Load generator → platform gateway → inference instance, identical to the production path

    First, look at the resource ledger — it is the starting point for every decision that follows.

    1. Cluster total memory ≈ 2048 GiB
    2. Weight footprint ≈ 1434 GiB (1.47 TB / 32 dies ≈ 46 GiB/die)
    3. ─────────────────────────────────────
    4. Remaining headroom ≈ 614 GiB (~19 GiB/die)

    This 614 GiB is not a “KV-cache-only budget.” It must also be shared among the framework’s own memory pool and activation buffers, communication buffers, intermediate tensors at each pipeline stage, memory-fragmentation reserve, and peak temporary tensors during the long-context prefill phase. The portion actually available for the KV cache is clearly smaller than 614 GiB. That number is the core variable that decides “how long a context you can enable and how high you can push concurrency” — and the single most important subtraction in this article.

    The common engineering estimate takes the form:

    1. Available KV ≈ (total memory − weights − framework & activation overhead − safety margin) / per-token KV bytes

    “Per-token KV bytes” is determined by the model structure: models that use low-rank joint compression attention (compressing KV into low-dimensional latent vectors) have a per-token cost an order of magnitude lower than standard multi-head attention, which is the prerequisite that makes 200K-level context feasible within limited headroom. Conversely, with conventional grouped-query attention, KV usage at the same length would be several times higher, so this number must be calculated before deployment.

    3. Preparation Step 1: Node Registration and Resource Discovery

    The first step in a multi-node deployment is not launching the model, but letting the platform “see” the hardware clearly.

    The standard flow: generate an install command under “Compute Nodes → Add Node” in the console and run it on the target machine. The resident agent on each node initiates an outbound connection to the control plane and establishes a long-lived connection; control signaling, logs, monitoring metrics, and inference traffic all reuse the same tunnel. The direct benefits of this design are:

    • No need to open separate inbound ports for each use case, minimizing firewall and security-policy changes;
    • Machines across network domains and regions can join the same resource pool, as long as they are outbound-reachable;
    • The control plane and data plane are decoupled, so a brief control-plane outage does not affect inference instances that are already running.

    Once a node comes online, it automatically reports the accelerator count and model, per-card memory, NICs, storage, and so on, from which the platform generates a schedulable resource view. In a heterogeneous cluster, this step must be paired with node labels (accelerator type, memory spec, interconnect domain, firmware and driver versions); otherwise the scheduler may place nodes of different architectures into the same distributed instance, which fails only at initialization — and these problems are extremely costly to troubleshoot because the error message is often far removed from the real cause.

    4. Preparation Step 2: The Parameter Network (the Most Overlooked Step)

    Collective communication for multi-node inference does not travel over the business network. A dedicated high-speed interconnect must exist between nodes, and in the platform’s “Network” configuration the relevant network for these nodes must be added to the same parameter network. When building the network, the platform runs a connectivity check, verifying pairwise reachability and whether bandwidth meets expectations on that network.

    This network determines three things:

    • Node selection at deployment time: the platform automatically picks nodes by parameter-network label, mechanically ruling out “network-incompatible” combinations;
    • Feasibility of parallel sharding: cross-node pipeline parallelism is sensitive to both bandwidth and latency, and a substandard link shows up directly as a throughput collapse;
    • Failure-domain boundary: with the parameter network separated from the business network, load-test traffic won’t squeeze out collective-communication bandwidth.

    Without this constraint, the typical failure mode of a distributed instance is: all processes start, weight loading begins, and then it silently hangs at the first collective communication until timeout. This is one of the most common and hardest-to-self-diagnose failures in distributed inference — solve it at the network-building stage, not at deployment.

    5. Preparation Step 3: Quantization Trade-offs and Distribution for 1.47 TB of Weights

    5.1 Why W4A8

    W4A8 refers to a quantization scheme with 4-bit weights and 8-bit activations. Its value has two layers:

    • Capacity: at roughly 0.5 bytes per parameter, 2.8 trillion parameters correspond to about 1.4 TB, matching the measured 1.47 TB total shard size. Without quantization, the same model at BF16/FP8 would be several times larger, and this hardware scale simply couldn’t hold it.
    • Bandwidth: the decode phase is a classic memory-bound workload — every generated token requires reading the activated expert weights. Halving the weight bit width directly eases memory pressure, and its impact on throughput is often more significant than the compute peak.

    The cost is precision risk: low-bit quantization is sensitive to outliers and must be paired with per-channel/per-group scaling factors, keeping higher precision for sensitive layers such as attention and normalization. Always run a correctness regression on a small golden set before going live — don’t just check “whether it can generate text.”

    5.2 Multi-Node Distribution: Compressing Hours into Minutes

    A multi-node instance requires every node to have a complete local copy of the weights. The most counterintuitive point: the most time-consuming part of the whole process is usually not inference, but weight distribution.

    If every node pulls 1.47 TB directly from a public source, throughput is simultaneously limited by source bandwidth, per-connection throttling, and storage write capability. Measured comparison (same weights, same hardware):

    Distribution method Measured bandwidth Time for 1.47 TB (approx.)
    Download to local over public internet 50–57 MB/s ~7–8 hours
    Direct transfer over the high-speed inter-node network ~490 MB/s ~50–55 minutes

    The gap is close to 10x. The correct approach is “land one copy first, then replicate horizontally”: after downloading and verifying on the first node, use the platform’s “Copy to…” capability to push directly from that node to the others, bypassing the public-internet bottleneck.

    Supporting reliability requirements:

    • Per-shard checksum verification: any one of the 346 shards being corrupted will surface as a hard-to-locate error at load time;
    • Atomic writes: write to a temporary directory first, then rename to the target path after verification, so instances never read a half-finished file at startup;
    • Immutable versions: pin the model side to a specific revision (commit level) and record the shard count and total bytes; pin the image side to a digest rather than a tag, ensuring the environment rebuilt at any time is completely identical;
    • Startup read optimization: 32 processes reading the same weights simultaneously can saturate shared storage, so local caching or pre-warming the page cache is recommended.

    5.3 The Semantics of a One-Shot Launch

    The model directory, parallelism degrees, and quantization format must all be explicitly hard-coded in the launch parameters:

    1. # Illustrative: launch with identical topology on two nodes; intra-node TP, cross-node PP
    2. python -m inference_server.launch \
    3. --model-path /models/moe-2p8t-w4a8 \
    4. --model-revision bc632341a53f \
    5. --tensor-parallel-size 16 \
    6. --pipeline-parallel-size 2 \
    7. --quantization w4a8 \
    8. --max-model-len 262144 \
    9. --kv-cache-dtype int8 \
    10. --enable-chunked-prefill \
    11. --enable-prefix-caching \
    12. --host 0.0.0.0 --port 8000

    Invariants that must be self-checked:

    1. TP × PP = world_size = intra-node die count × node count → 16 × 2 = 32 ✔

    Any mismatch fails immediately at initialization, and the error message usually only says “parallelism config does not match device count,” requiring manual backtracking of the topology.

    6. Parallel Sharding: The Logic Behind TP vs. PP

    This is the step that most needs clear thinking when deploying ultra-large models, because it simultaneously affects three directions — memory, communication, and latency — and the three conflict with each other.

    TP (16-way intra-node): splits each layer’s attention heads and expert matrices, requiring one intra-layer collective communication per layer. Higher TP means less weight and KV per card and lower per-token compute latency, but the highest communication frequency, and over-fine sharding degrades matrix multiplies into thin, elongated shapes, hurting GEMM efficiency. So TP generally converges within a single node’s high-speed interconnect domain and does not cross machines.

    PP (2-way cross-node): splits by layer, with stages passing only activation tensors between them — minimal communication, especially suited to cross-node. Two costs: first, pipeline bubbles, which require enough in-flight requests (in-flight micro-batches) to fill; second, each stage still holds all attention heads for its segment, so per-card KV pressure does not drop because of PP.

    The topology conclusion for this deployment: TP16 × PP2 is the natural solution that “keeps high-frequency communication intra-node and uses low-frequency communication across nodes,” with world size 32 aligning exactly with 16 dies × 2 nodes. This can be generalized into a rule:

    Prefer placing intra-layer collective communication within the node’s interconnect domain, and use pipeline sharding only where crossing machines is unavoidable; keep cross-node parallelism no greater than the node count, and use concurrency to fill the pipeline bubbles.

    7. Load-Test Design

    7.1 Scenario Design

    Group Workload Input/output length (approx.) Focus
    A General dialogue (random sampling) 2048 / 512 Base throughput, scheduling stability, TPOT
    B Agentic long context 80K / medium-short output Long prefill, tool calls and reasoning stream output
    C Agentic ultra-long context 200K / medium-short output KV capacity ceiling, memory headroom, tail latency

    All 836 requests across the three groups succeeded. “Success” must be defined precisely, otherwise the data is meaningless:

    • Transport-layer 2xx, with stream responses terminating normally (not interrupted or truncated);
    • Output meets stop conditions, not passively truncated by a length limit;
    • For requests involving tool calls, the call structure is parseable and parameters are complete;
    • Both reasoning content and the final answer are fully returned.

    7.2 Key Details in Data Construction

    • Don’t stuff long context with random tokens only. The shape of a real agentic request is: a fixed system prompt + progressively accumulated tool returns + multi-turn dialogue history, with a highly overlapping prefix. If the load-test data contains no shared prefix, you can’t measure the real benefit of prefix caching, and the conclusions will be overly pessimistic.
    • Distinguish cold-start from hot requests. In agentic scenarios, the TTFT difference between the first (cold) round and subsequent (hot) rounds can be several times; they must be measured separately, otherwise the average is meaningless.
    • The load-test path must go through the gateway. Entering via the platform gateway is the only way to separate gateway queuing from instance queuing; numbers measured by connecting directly to the instance can’t be used for capacity planning.

    7.3 Metric Definitions

    Layer Metrics
    Service level Total throughput (tokens/s), successful requests, end-to-end P50/P90/P99 latency
    Framework level TTFT, TPOT, KV cache utilization, scheduling wait-queue depth, prefill chunk size, prefix cache hit rate
    Hardware level Accelerator utilization, memory usage, temperature, power, link error count

    Metric pitfall: when reporting throughput you must state whether it is “input + output combined” or “output tokens only,” whether it includes the cache-hit portion, and what the concurrency was. Throughput numbers detached from these three qualifiers are not comparable.

    8. Results Analysis: What the Three Workloads Revealed

    The short-input scenario (Group A) is the relatively “comfortable” condition: small prefill, bottleneck on the decode phase, memory-bound behavior, stable TPOT, high per-card utilization. Here the main lever for raising throughput is increasing concurrency and batch size, and the bandwidth benefit of quantization shows up most fully.

    In the long-context scenarios (Groups B and C), the bottleneck shifts forward to prefill and KV memory access:

    • TTFT is highly sensitive to input length, and shows clear superlinear growth when the attention implementation is not optimized. This is why chunked prefill must be enabled — slicing long prefills so a single ultra-long request doesn’t monopolize compute and block other requests’ decode, which would otherwise raise global tail latency.
    • KV footprint becomes the first constraint. At 200K context, a single request’s KV is two orders of magnitude larger than at 2K input, directly compressing the number of concurrent requests. Three levers, ranked by cost-effectiveness: enable KV cache quantization, enable prefix cache reuse, and set the context ceiling according to the actual business distribution (rather than opening it all the way to the model’s nominal 1M).
    • Memory headroom sets the safety boundary. If long-context requests occasionally fail during load testing while short requests are all fine, you can basically conclude it’s KV allocation hitting the ceiling, not a model or network problem.

    What the 836 passing requests prove: under this configuration, the weights fit, cross-node communication comes up, long-context scheduling doesn’t collapse, and the streaming-output and tool-call paths are fully usable. “Full success” is a functional and stability baseline, not a performance conclusion — performance conclusions must be read together with concurrency, length distribution, and latency percentiles. This is where many “deployment successful” reports get misread.

    9. Production Acceptance Checklist

    Layer Acceptance item
    Network Parameter-network connectivity check passes; measured collective-communication bandwidth meets target; business network isolated from parameter network
    Weights All nodes’ local copies complete; per-shard checksums consistent; revision, shard count, and total bytes recorded
    Topology TP×PP = world_size = intra-node die count × node count; node labels consistent with image architecture
    Function End-to-end pass for four scenarios: multi-turn dialogue, long context, tool calls, reasoning stream output
    Capacity Clear max context and max concurrency corresponding to the KV ceiling; load test provides P90/P99 baselines
    Observability Service-level, framework-level, and hardware-level metrics wired up; alert thresholds set for memory watermark and queue depth
    Operations Readiness probe waits for weight loading and warm-up to complete (avoid sending traffic to unready instances); liveness probe only checks the process; upgrades go through canary
    Change management Image digest, model revision, parallelism, and quantization format included in the config baseline, supporting one-click reproduction

    10. Common Faults Quick Reference

    Symptom Frequent root cause Remediation
    Stuck at initialization, no clear error Missing or substandard cross-node parameter network; node-label mismatch Run connectivity checks at the network-building stage; validate the network first with a minimal-scale job
    Missing-shard / checksum-mismatch error at load time Interrupted distribution, non-atomic writes, version drift Per-shard verification; temp directory + rename; pin immutable versions
    Weights load but load test fails immediately Over-optimistic KV headroom estimate, long requests hitting the ceiling Lower the KV ceiling; cap max context; enable KV quantization
    Throughput significantly below expectation Unfilled pipeline bubbles; TP spanning machines drives up communication share; insufficient batching Increase concurrency; pull TP back intra-node; adjust PP stage count
    Garbled long-context output / malformed tool-call format Low-precision kernels incompletely supporting certain input shapes Golden-set regression on a small sample; raise precision for sensitive layers
    Environment can’t be reproduced Image using a tag, weights using a mutable reference Switch fully to digest + revision pinning

    11. Conclusion

    Deploying a trillion-scale MoE model on domestic compute — the difficulty has never been single-point peak performance, but the completeness of the system engineering: whether the resource ledger adds up, whether parallel sharding aligns with the physical interconnect domain, whether TB-scale weights can be distributed efficiently and reliably, whether enough memory headroom is left for long context, and whether there’s an executable acceptance checklist before going live.

    This practice yields four reusable conclusions: first, do the memory subtraction first, then fix the parallel topology; keep high-frequency communication intra-node and use pipelines only across nodes; land one weight copy first and then replicate horizontally, compressing distribution from hours to minutes; and load tests must cover three workload types — short input, agentic long context, and ultra-long context — while strictly separating cold vs. hot requests and metric definitions. By turning every step into something checkable, reproducible, and rollback-able, a domestic compute cluster can stably handle the online inference load of ultra-large models.