Deploying Massive MoE Models for Inference on Dual-Node Domestic Accelerator Clusters: A Practical Guide

    This article details the complete deployment and stress testing process of a trillion-scale sparse Mixture-of-Experts (MoE) model on a dual-node domestic accelerator cluster. It addresses the engineering challenges of deploying ultra-large models by focusing on the three most critical aspects: parallel strategy design, network planning, and weight distribution. Readers will learn how to implement a TP16 × PP2 hybrid parallelism strategy, optimize W4A8 quantized weight distribution across nodes, and conduct comprehensive functional and stress tests to ensure stable inference for models with long context windows.

    1. Background and Problem Definition

    As the open-source community progressively releases trillion-scale sparse Mixture-of-Experts (MoE) models, stably deploying such models on proprietary compute clusters has become an unavoidable challenge for engineering teams. These models typically exhibit three key characteristics:

    • Massive total parameters with sparse activation: In this example, the model has approximately 2.8T total parameters but only activates around 104B per inference. The weight volume dictates the minimum memory requirement, while the activation volume determines the compute demand.
    • Native multimodal and ultra-long context: Supporting a 1M token context window imposes high requirements on KV Cache memory and long-sequence scheduling.
    • Multi-node requirement even after quantization: Even with W4A8 quantization (4-bit weights, 8-bit activations), the weight volume remains around 1.47TB, which cannot fit into a single node’s memory and must be partitioned across nodes.

    This article documents the complete deployment and stress testing process on two domestic accelerator servers (each with 16 compute dies, 64GiB of memory per die, totaling 32 dies and 2TiB of memory). We will focus on the three areas most prone to pitfalls: parallel strategy design, network planning, and weight distribution.

    2. Parallel Strategy Design: The TP16 × PP2 Trade-off

    To launch an inference instance on a 32-die cluster, the industry standard approach combines Tensor Parallelism (TP) and Pipeline Parallelism (PP):

    1. Intra-node TP16: The 16 dies within a single node are connected via a high-speed interconnect bus, offering much higher bandwidth than cross-node networks. Applying tensor parallelism to attention heads and expert weights within the node minimizes communication overhead. A TP degree of 16 is chosen over smaller degrees to take full advantage of this high-bandwidth intra-node interconnect.
    2. Cross-node PP2: The two nodes each host half of the Transformer layers, forming a two-stage pipeline. Cross-node communication only involves activations (hidden states at layer boundaries), which is significantly smaller than the all-reduce traffic in tensor parallelism, making it suitable for scenarios with relatively limited interconnect bandwidth.

    The final topology is: world size 32 = TP16 per node × cross-node PP2. The memory budget for this configuration is clear: 1.47TB of weights divided across 32 dies is about 46GB per die. Factoring in KV Cache, activation buffers, and framework overhead, the 2TiB total memory retains a reasonable margin to support concurrent requests with long sequences.

    1. Node A (16 dies) Node B (16 dies)
    2. ┌─ TP Group 0 ─┐ ┌─ TP Group 1 ─┐
    3. │ Layer 0..N/2 │──PP───▶│ Layer N/2..N │
    4. └──────────────┘Activation└──────────────┘

    3. Weight Preparation: Quantization and Distribution Acceleration

    Quantization Choice: This deployment uses the widely adopted W4A8 quantized weights—4-bit weight storage combined with 8-bit activation computation. This compresses the weight volume to approximately 1.47TB (corresponding to 346 shard files) while keeping precision loss manageable. During deployment, the specific revision and hash values of the weights must be locked to prevent loading failures caused by shard content drift.

    Distribution Strategy: Distributing massive weights is often an underestimated task. Two key practices emerged:

    • Public internet download once: Only the first node pulls all weights from the model repository via the public internet. Measured public network speed is about 50–57MB/s, meaning a 1.47TB download takes several hours.
    • Direct intra-node transfer: The second node transfers data directly from the first node via the intranet at approximately 490MB/s, nearly 10 times faster than the public network. If the platform provides a “copy to node” capability, use it directly; otherwise, use rsync to sync between nodes.
    1. # Node-to-node direct transfer example
    2. rsync -avP --bwlimit=0 /models/moe-w4a8/ nodeB:/models/moe-w4a8/

    Integrity Verification: Whether downloading or transferring directly, you must verify the size and hash of each file upon completion. A corrupted shard often only surfaces during the loading phase, making troubleshooting highly expensive.

    4. Inference Runtime and Image Management

    It is recommended to use the official inference image released with the model (usually a version of a deep learning framework optimized for specific model structures). Adhere to two engineering standards:

    1. Pin image digest: Pin the image digest in the deployment configuration instead of using floating tags to ensure the environment is completely identical whenever the instance is rebuilt.
    2. Explicit parameter declaration: Explicitly hardcode parallelism, quantization scheme, and context length in the deployment template, avoiding reliance on default values inside the image.

    Network planning is also required during deployment: in multi-node scenarios, the high-speed accelerator interconnect networks of both nodes should be placed in the same parameter plane. The deployment system should automatically perform inter-card connectivity checks. Identifying connectivity faults during the startup phase is far better than encountering hangs during inference.

    5. Functional Verification and Stress Testing

    After the instance is launched, a three-level verification approach is recommended: Functional -> Short Stress -> Long Stress.

    Functional Verification: Cover multi-turn dialogue, streaming inference output, and tool calling (the function calling path for Agentic scenarios) to confirm correct end-to-end behavior.

    Stress Test Design: Three load groups were designed for this test, with a total of 836 requests all completing successfully:

    Group Input/Output Verification Target
    Random Short Sequence 2048 in / 512 out Basic throughput and latency
    Agentic 80K 80K context Mid-to-long context stability
    Agentic 200K 200K context Long context memory and scheduling

    Stress test traffic should be initiated from the server side and forwarded to the inference instance via a gateway to simulate a real invocation chain, avoiding artificially high performance metrics from “bypassing the gateway and connecting directly.” Key metrics to monitor include: request success rate, Time to First Token (TTFT), Inter-Token Latency (ITL/TPOT), throughput, and the memory and utilization curves of each die. For the long context group, it is especially critical to observe whether the KV Cache hits the ceiling.

    6. Experience Summary

    1. Parallelism follows interconnect topology: Using TP for high-bandwidth intra-node interconnects and PP for cross-node connections is the fundamental paradigm for deploying massive models across dual nodes.
    2. Weight distribution via intranet: Downloading once via the public internet and directly transferring remaining copies between nodes can compress preparation time by nearly an order of magnitude.
    3. Version and verification upfront: Pinning image digests, weight revisions, and performing per-file hash verification are the cornerstones of reproducibility for large-scale deployments.
    4. Stress testing must cover real long contexts: The 80K/200K loads in Agentic scenarios are often the true test for memory and scheduling.

    This workflow does not depend on vendor-specific capabilities. The core concepts—hybrid parallelism, parameter network isolation, direct weight transfer, and tiered stress testing—can be translated to any ultra-large model deployment practice on multi-node heterogeneous compute clusters.