Deploying a Trillion-Parameter MoE Model on a Two-Node AI Accelerator Cluster

    This deployment walkthrough covers running a 2.8-trillion-parameter MoE model on two servers equipped with Chinese-developed AI accelerators. It explains W4A8 quantization, a TP16 × PP2 parallel topology, large-scale weight distribution, functional checks, and load testing at context lengths of up to 200K tokens. The focus is on fitting model weights into accelerator memory, matching parallelism to the interconnect topology, and validating operational readiness.

    Deploying a Trillion-Parameter MoE Model on a Two-Node AI Accelerator Cluster

    1. Background and Deployment Challenges

    As open-source models reach trillions of parameters, a single server can struggle to provide both sufficient accelerator memory and adequate inference throughput.

    Consider a native multimodal mixture-of-experts (MoE) model with approximately 2.8 trillion total parameters, roughly 10 billion active parameters per forward pass, and support for context windows on the order of one million tokens. Deploying a model at this scale introduces three immediate engineering challenges:

    1. Memory capacity: Even with aggressive W4A8 quantization, model weights occupy more than 1.4 TB. They must be partitioned across multiple servers.
    2. Parallel topology: Intra-node tensor parallelism (TP) alone cannot accommodate the full model. Cross-node pipeline parallelism (PP) is also required, making interconnect bandwidth an important design constraint.
    3. Deployment and operations: Downloading and distributing enormous weight files, maintaining identical environments across nodes, and validating long-context workloads all introduce potential failure points.

    This walkthrough uses two servers equipped with Chinese-developed AI accelerators. Each server provides 16 compute dies, with approximately 64 GiB of accelerator memory per die. The final deployment combines TP16 within each node with PP2 across the two nodes, producing a distributed world size of 32.

    2. Quantized Weights and Inference Engine Selection

    2.1 Why W4A8?

    A 2.8-trillion-parameter model requires approximately 5.6 TB for BF16 weights alone. That is far beyond the roughly 2 TB of aggregate accelerator memory available across the cluster’s 32 dies.

    W4A8 quantization reduces weights to 4-bit precision while using 8-bit activations. For the model in this deployment, the resulting weight footprint is approximately 1.47 TB. This makes the weights small enough to fit across both servers, with a quality trade-off that must be checked against the selected quantized checkpoint’s evaluations.

    MoE models can be good candidates for low-bit quantization because they distribute parameters across many experts. However, the actual quality impact depends on the checkpoint and quantization implementation.

    Two requirements are particularly important:

    • Use a validated quantized checkpoint and pin its revision. Record the full commit hash or equivalent revision identifier to prevent later weight updates from changing deployment behavior.
    • Match the quantization format to the inference engine. W4A8 requires compatible mixed-precision operators. Before deployment, verify that the framework implements the required GEMM kernels for the target accelerator.

    2.2 Selecting the Inference Engine

    Use a vLLM-style inference framework with support for the target accelerator backend. Where available, prefer the official container image distributed with the model.

    Pin the container by image digest, rather than a floating tag, so both nodes run identical binaries. Mismatched container versions are an easily overlooked source of multi-node failures.

    3. Cluster Configuration and Parallel Topology

    3.1 Hardware and Interconnect

    The deployment uses:

    • Compute: Two accelerator servers, each with 16 compute dies and approximately 64 GiB of memory per die—32 dies and roughly 2 TB of aggregate accelerator memory.
    • Inter-node communication: A dedicated high-speed accelerator interconnect, such as an HCCS-class fabric where supported by the hardware topology. Validate the required die-to-die communication paths before deployment.
    • Storage: Approximately 1.47 TB of model weights. Each server should have sufficient local disk space and its own copy of the weights to avoid cross-node storage reads during startup.

    3.2 Why TP16 × PP2?

    The central design principle is simple: keep frequent, high-volume TP communication within the highest-bandwidth domain, and use PP across nodes.

    • Intra-node TP16: The 16 dies within a server communicate over a high-bandwidth local interconnect. This is the preferred location for tensor-parallel collective operations, including the per-layer AllReduce traffic in the configuration described here.
    • Inter-node PP2: Split the model’s layers into two stages. Node A runs the first stage, and node B runs the second. Cross-node traffic primarily carries intermediate activations rather than repeated tensor-parallel collectives.

    Pipeline activation traffic depends on batch size, sequence length, and hidden-state dimensions. The advantage is the lower frequency of cross-node communication compared with placing TP collectives across the node boundary.

    The resulting instance has a world size of 32. With an even distribution, 1.47 TB of weights corresponds to approximately 46 GB per die. The remaining memory is available for KV cache and activations, subject to runtime overhead and partition balance. This provides a basis for testing long-context workloads in the 80K–200K range.

    An illustrative launch-argument skeleton is shown below. Exact option names and supported values depend on the framework:

    1. # Launch inference service processes on each node
    2. --model /data/models/moe-w4a8 \
    3. --tensor-parallel-size 16 \
    4. --pipeline-parallel-size 2 \
    5. --max-model-len 1048576 \
    6. --quantization w4a8 \
    7. --trust-remote-code

    The configured maximum sequence length does not, by itself, demonstrate that the deployment can serve that length under load.

    Cross-node PP is generally coordinated by the framework and its distributed communication backend, such as a collective communication library for the accelerator fabric. Ensure that both nodes use consistent rank mappings and network-interface configurations.

    4. Weight Distribution: Avoiding a Download Bottleneck

    Distributing 1.47 TB of weights can take a substantial share of deployment time.

    The deployment reported the following transfer rates:

    • Public model repository download: Approximately 50–57 MB/s, requiring around 7–8 hours for a complete download.
    • Direct transfer over the internal network: Approximately 490 MB/s, completing the same transfer in less than an hour.

    A practical workflow is to download the full checkpoint to the first node, validate it, and then copy it directly to the second node instead of downloading it twice from the public repository.

    Check both the shard count and total size. The example checkpoint contained 346 safetensors shards totaling approximately 1.47 trillion bytes.

    Use rsync or a parallel file-copy tool to synchronize the local model directories:

    1. rsync -avP --partial /data/models/moe-w4a8/ \
    2. node2:/data/models/moe-w4a8/

    After copying, verify every shard against its expected hash. Even a small corruption can cause a loading failure that is difficult to trace back to the affected file.

    5. Deployment and Functional Validation

    In the deployment described here, both servers were registered through a unified cluster-management platform. A generated installation command was executed on each node, after which the nodes reported their compute and network information.

    The high-speed interfaces were assigned to the same accelerator communication network, allowing deployment placement to follow the network topology.

    Once the distributed instance is running, validate functionality before applying load:

    1. Basic conversation: Confirm tokenization, sampling, and streaming output.
    2. Reasoning-output handling: If the model exposes a reasoning-output format, verify that the service handles it correctly and that long generations are not unexpectedly truncated.
    3. Tool calling: Validate structured output and tool-protocol parsing, which are prerequisites for agentic workloads.

    Proceed to load testing only after all three checks pass.

    6. Load-Testing Plan and Results

    Load was generated externally and routed through a gateway to the inference instance. Testing covered three representative workload categories, with 836 requests in total and no reported request failures.

    Scenario Input/output scale Primary focus
    Randomized workload 2,048 input tokens / 512 output tokens Throughput and latency stability under regular concurrent load
    Agentic long-context workload 80K-token context KV-cache usage and time to first token
    Agentic very-long-context workload 200K-token context Accelerator memory usage and cross-node PP communication overhead

    Three lessons stand out.

    6.1 Test Long Contexts Separately

    KV-cache memory grows with context length. A 200K-token workload places very different memory demands on the system than a 2K-token workload.

    Passing short-sequence tests does not establish that long-context serving is viable. Long-context tests must be treated as a separate validation stage.

    6.2 Watch for Pipeline Bubbles

    Cross-node pipeline parallelism can leave stages idle when microbatch scheduling is poorly matched to the workload.

    Track first-token and end-to-end generation latency when assessing scheduling behavior and whether chunk sizes need adjustment. Successful execution alone does not demonstrate efficient pipeline utilization.

    6.3 Request Success Is Only a Baseline

    Completing all 836 requests establishes functional success for the tested workloads, not production capacity.

    Production readiness also requires P50 and P99 latency measurements, throughput curves in tokens per second, and tests across increasing concurrency levels. These measurements reveal the point at which latency rises sharply or throughput stops scaling, providing a basis for capacity planning.

    7. Conclusion

    Deploying a trillion-parameter MoE model across two accelerator servers depends on aligning memory usage, parallel topology, data distribution, and validation.

    The core approach is to:

    • Use W4A8 quantization to bring the model weights within the aggregate memory budget.
    • Apply TP16 within each node and PP2 across nodes to match communication patterns to the interconnect hierarchy.
    • Download weights once and use direct node-to-node transfer for distribution.
    • Validate progressively with regular workloads, 80K-token contexts, and 200K-token contexts.

    Although the example uses Chinese-developed AI accelerators, the deployment methodology is relevant to other environments that require multi-node serving of very large MoE models. The practical challenge is not simply loading the checkpoint: it is making the hardware topology, inference runtime, and operational checks work together reliably.