Deploying a Multi-Trillion-Parameter MoE Model on Two Nodes of Domestic AI Accelerator Cards

    This article presents a practical deployment of a 2.8-trillion-parameter sparse MoE model with native multimodal and ultra-long-context support on two nodes of domestic AI accelerator cards. It covers memory and communication constraints, a TP16+PP2 hybrid parallel design, platform onboarding for nodes and parameter networks, efficient 1.47 TB weight distribution, integrity checks, instance startup, load testing, and reusable lessons for ultra-large model inference.

    Deploying a Multi-Trillion-Parameter MoE Model on Two Nodes of Domestic AI Accelerator Cards

    1. Background and Challenges

    In recent years, model parameter counts have continued to rise, and sparse architectures such as Mixture-of-Experts (MoE) have become a mainstream direction. The target model discussed in this article has the following typical characteristics:

    • About 2.8 trillion total parameters, with only around one hundred billion parameters activated in a single forward pass. This is a typical sparse architecture with a large total parameter count and a small activated parameter count.
    • Native multimodal capability, processing both text and visual inputs.
    • Ultra-long context, supporting sequence lengths of up to one million tokens.

    This type of model introduces three major challenges for inference deployment:

    1. Memory capacity challenge: Even with W4A8 quantization (4-bit weights and 8-bit activations), the weight footprint is still about 1.47 TB, far exceeding the memory of a single machine.
    2. Communication challenge: Expert parallelism and tensor parallelism introduce high-frequency inter-card communication, which is highly sensitive to interconnect bandwidth.
    3. Engineering challenge: Weight files are extremely large. Improper handling of any step—download, distribution, or verification—can significantly extend the time required to bring the service online.

    2. Test Environment and Overall Design

    The hardware and software environment used in this practice was as follows:

    • Compute nodes: Two domestic AI accelerator servers, each with 16 compute dies. Each die has 64 GiB of memory. The cluster has 32 dies in total and about 2 TB of available memory.
    • Interconnect: Both intra-node and inter-node compute communication used accelerator-specific high-speed interconnect links.
    • Parallel strategy: 16-way tensor parallelism (TP16) within each node and 2-way pipeline parallelism (PP2) across the two nodes, for a total world size of 32.
    • Model weights: A community-published W4A8 quantized version, comprising 346 shard files and about 1.47 TB in total.
    • Runtime: The official inference container image released with the quantized weights. The image version was locked by a fixed digest to avoid reproducibility issues caused by image updates.
    • Scheduling platform: A compute scheduling and service platform was used for node management, network orchestration, and instance deployment. Load-test traffic was forwarded to the inference instance through the platform gateway.

    Why choose TP16+PP2 instead of cross-node tensor parallelism? This was a key design decision. Tensor parallelism is extremely sensitive to communication latency, and each layer requires multiple all-reduce operations. Restricting it to within a node makes full use of high-speed inter-die interconnect. Pipeline parallelism, by contrast, passes activations only at stage boundaries, so it has lower communication volume and frequency and is better suited to cross-node scenarios. The combination of intra-node TP and inter-node PP is a common best practice for multi-machine deployment of very large models.

    3. Platform Onboarding: Nodes, Network, and Weights

    3.1 Node Onboarding

    The scheduling platform uses a server/agent architecture, with both components provided as static single binaries. The agent is deployed on compute nodes and actively initiates outbound connections to the server. Control signaling, monitoring data, logs, and inference traffic share the same encrypted tunnel. The advantage of this design is that nodes do not need to expose public inbound ports, and machines behind NAT or firewalls can still be managed smoothly.

    The onboarding process is simple: generate an installation command in the platform console and run it on each of the two accelerator servers. After the agent starts, it automatically reports the local accelerator chips, network interfaces, and storage information, and the platform identifies the topology of 16 compute dies per server.

    3.2 Parameter Network Planning

    Multi-machine inference depends on high-speed communication between accelerators. In the platform’s network management module, the accelerator interconnect links of the two nodes were placed into the same parameter network. The platform automatically performs inter-card connectivity checks, including link reachability and bandwidth probing, to ensure that all dies can communicate with each other. When deploying an instance, the scheduler automatically selects a node combination that meets the requirements based on the parameter network topology, avoiding topology mismatches caused by manual assignment.

    3.3 Weight Acquisition and Efficient Distribution

    Getting 1.47 TB of weights onto both nodes quickly and consistently is an engineering problem that is easy to underestimate. This practice used two steps:

    1. Download on the first node: In the platform’s model management module, a model repository source was selected and the weights were downloaded to the first node. Measured throughput over the public network was about 50–57 MB/s.
    2. Direct transfer between nodes: The second node did not download from the public network again. Instead, the “Copy to…” function was used, and the first node transferred the weights directly over the data center intranet. Measured throughput was about 490 MB/s, nearly 10 times faster than the public download, reducing a transfer that would have taken about 8 hours to less than 1 hour.

    After both nodes completed writing the files, the platform performed file-by-file integrity verification to ensure that the 346 shards were byte-for-byte consistent on both ends. This step is critical for subsequent multi-machine collaborative loading; any inconsistent shard can cause weight loading failures or abnormal output.

    4. Deployment and Startup

    When creating the inference instance on the platform, the core configuration included selecting the container image described above (locking the digest is recommended to ensure environment reproducibility), specifying the parallel parameters (TP16 and PP2), mounting the weight directories on both nodes, and selecting the pre-built parameter network. After the instance started, the inference framework completed shard loading and communication group initialization across the 32 dies, and then exposed an inference interface compatible with mainstream protocols.

    Load testing was initiated from the platform, and traffic was forwarded to the instance through the platform gateway, simulating a real business access path. This validated both the gateway link and the capacity of the inference service itself.

    5. Lessons and Recommendations

    1. Start with the memory budget: First confirm the quantized weight size and per-die memory, then derive the required number of dies and the parallel partitioning method. Reserve space for KV cache, especially in ultra-long-context scenarios where KV cache may exceed the weights themselves.
    2. Follow the principle of communication locality when partitioning parallelism: Place high-frequency communication dimensions (TP/EP) within nodes and low-frequency communication dimensions (PP) across nodes.
    3. Distribute weights through direct intranet transfer: For very large weights, avoid having each node download from the public network. Direct node-to-node transfer can provide nearly an order-of-magnitude speedup.
    4. Lock every version that can be locked: Fix the model weight revision and image digest to ensure reproducible deployments and traceable troubleshooting.
    5. Perform both connectivity and integrity checks before launch: Inter-card communication checks and shard-by-shard file verification are key to eliminating multi-machine deployment failures before startup.

    Through this workflow, a trillion-parameter-scale MoE model was stably deployed on two nodes with 32 compute dies in a domestic compute environment. This validated the feasibility of the technical approach of quantized weights, hybrid parallelism, and platform-based scheduling for ultra-large-scale model inference, and provides a reusable reference for deploying similar models.