Deploying a Trillion-Parameter MoE Model on a Multi-Node AI Cluster: Architecture, Deployment, and Performance Validation

    This article explores the end-to-end practice of deploying a trillion-parameter Mixture of Experts (MoE) large language model on a distributed multi-node cluster. It details the cluster architecture, leveraging a unified memory design and 400G RDMA networking to address memory capacity and communication bottlenecks. The article further outlines model deployment strategies, including mixed-precision quantization, parallelism configurations, and memory-storage tiering, concluding with performance benchmarking results and operational recommendations for enterprise localized deployments.

    Deploying a Trillion-Parameter MoE Model on a Multi-Node AI Cluster: Architecture, Deployment, and Performance Validation

    1. Background: Why Distributed Clusters Are Essential for Localized LLM Deployment

    As the parameter scale of large language models (LLMs) continues to grow—especially with the widespread adoption of the Mixture of Experts (MoE) architecture—single-node, single-GPU deployments can no longer meet the demand. Although MoE models significantly reduce the computational cost per inference through sparse activation, their full weights must still be loaded entirely. For a model with hundreds of billions of active parameters and a trillion total parameters, even with FP8 or FP4 quantization, the memory requirement for weights and KV Cache easily reaches hundreds of gigabytes.

    Against this backdrop, enterprise localized deployments face three core contradictions:

    1. Memory capacity vs. model scale: The memory capacity of a single compute node is limited, necessitating the distribution of model weights across multiple nodes.
    2. Inference throughput vs. interconnect bandwidth: After multi-node partitioning, tensor parallelism (TP) and expert parallelism (EP) generate massive cross-node communication, where standard Ethernet bandwidth becomes a bottleneck.
    3. Deployment complexity vs. O&M efficiency: Model distribution, loading, health checks, and service orchestration in a multi-node environment place higher demands on the management platform.

    The practical solution in this article addresses these three contradictions: a distributed inference cluster composed of 4 heterogeneous compute nodes, interconnected via a 400G high-speed switching network with RDMA, and verified end-to-end using an MoE model with FP8 and FP4 mixed precision.

    2. Cluster Architecture Design: Hyperconverged AI Infrastructure

    2.1 Overall Topology

    This practice adopts a star network topology consisting of “4 compute nodes + 1 high-speed switch.” Each compute node is a superchip integrating a CPU and a GPU, connected to the switching network via an onboard high-speed NIC. A unified management plane handles model distribution, inference service orchestration, and traffic ingress.

    Typical configuration highlights include:

    • Compute nodes: 4 CPU-GPU integrated superchips, with a 20-core ARM architecture CPU per node.
    • Memory system: Approximately 512GB of unified memory (LPDDR5X) shared across nodes, with the CPU and GPU sharing the same physical address space.
    • Storage system: 8TB NVMe SSD in total, used for model weight storage and runtime data offloading.
    • Network system: A maximum NIC speed of 200Gbps per node, with 400G-level interconnect on the switch side, enabling RDMA to reduce cross-node communication overhead.
    • Inference framework: A mainstream continuous batching inference engine supporting tensor parallelism, expert parallelism, and paged KV Cache management.
    • Management plane: A unified dashboard providing model repository, inference gateway, access authentication, and invocation auditing capabilities.

    2.2 Why Choose a Unified Memory Architecture

    In traditional x86 + discrete GPU solutions, CPU memory and GPU memory are isolated. Cross-device data transfers must pass through the PCIe bus, limiting both bandwidth and latency. The CPU-GPU integrated superchip employs a unified memory design, bringing two direct benefits:

    • Eliminating memory copy overhead: Model weights, KV Cache, and intermediate activations can be directly accessed by both CPU and GPU within the same address space, avoiding explicit data movement.
    • Flexible memory-storage tiering: When unified memory is insufficient to hold all inference states, low-frequency data (such as large-scale retrieval tables or cold weight shards) can be offloaded to NVMe SSD. The inference engine pages them in on demand, trading a minimal latency penalty for significant capacity expansion.

    2.3 The Critical Role of RDMA Networking

    In the expert parallelism mode of MoE models, the forward computation of each layer is accompanied by token-to-expert routing and result collection (All-to-All communication). Under a 400G RDMA network, the latency of a single All-to-All operation can be controlled at the microsecond level. If degraded to a standard TCP network, the same operation may experience a several-fold increase in latency, directly negating the computational benefits of the sparse architecture. Therefore, distributed MoE inference demands much higher network performance than dense models, a factor easily underestimated in cluster design.

    3. Model Deployment Strategy

    3.1 Handling Mixed-Precision Weights

    The model deployed in this practice uses native FP8+FP4 mixed precision: FP8 is retained for numerically sensitive parts (such as attention projection layers), while FP4 is used for the expert feed-forward networks, which have higher fault tolerance. During deployment, note the following:

    • Confirm the inference engine’s kernel support for the target precision formats, especially as FP4 typically relies on dedicated compute units in next-generation hardware.
    • Quantized weights should match the layout expected by the inference engine to avoid online rearrangement during loading, which slows down startup.
    • Verify sampled perplexity results after loading to rule out abnormal precision degradation.

    3.2 Model Partitioning and Placement

    When distributing the model across 4 nodes, two parallelism methods are considered comprehensively:

    • Tensor Parallelism (TP): Splits single-layer weights horizontally. Communication is frequent but logically simple, suitable for regular structures like attention.
    • Expert Parallelism (EP): Assigns different experts in the MoE layers to different nodes. This is the natural partitioning method for MoE architectures but introduces All-to-All communication.

    In practice, a combination of “EP primary, TP auxiliary” is typically adopted: expert layers are partitioned across nodes by expert dimension, while attention and dense layers use small-scale tensor parallelism as needed. The partitioning scheme must balance inference throughput and communication overhead. It is recommended to base the final decision on stress-testing data rather than theoretical estimates.

    3.3 Memory and NVMe Tiered Storage

    Large-scale MoE models often come with attached retrieval-augmented structures (such as ultra-large lookup tables), which may exceed the model weights in size. This practice adopts a tiered strategy:

    1. Main model weights are loaded into the unified memory of each node, ensuring zero-copy on the hot path.
    2. Low-frequency lookup table data resides on NVMe SSD, paged in on demand via asynchronous prefetching and an LRU caching mechanism.
    3. KV Cache prioritizes memory usage. Paged management is enabled for long-context scenarios to prevent memory fragmentation.

    This strategy allows the cluster to support ultra-long context windows of up to 1M Tokens despite the 512GB unified memory constraint.

    4. Performance Benchmarking Methodology and Result Analysis

    4.1 Benchmarking Design

    The stress tests construct request sets around four typical business scenarios:

    Scenario Input Length Output Length Focus
    Daily Q&A Hundreds of Tokens Hundreds of Tokens Time To First Token (TTFT)
    Document Processing Thousands to tens of thousands of Tokens Thousands of Tokens Prefill throughput
    Complex Tasks Tens of thousands of Tokens Thousands of Tokens End-to-end latency
    Coding/Agent Dynamic multi-turn Medium-to-long output Continuous decoding rate and concurrency stability

    The benchmarking tool gradually increases concurrency, recording TTFT, Time Per Output Token (TPOT), overall throughput (Tokens/s), and error rate. It plots the load-latency curve to find the service’s “inflection point”—the concurrency threshold where latency begins to degrade non-linearly.

    4.2 Key Observations

    1. TTFT is primarily affected by prefill compute power and KV Cache initialization: In long-document scenarios, improving batch processing efficiency during the prefill phase is more effective than simply adding more compute power.
    2. The decoding phase is sensitive to interconnect bandwidth: As concurrency rises, the proportion of cross-node communication increases. The value of the RDMA network is most evident in this phase.
    3. NVMe offloading has a controllable impact on the hot path: Thanks to asynchronous prefetching, the average latency increase caused by offloading lookup table data remains in the single-digit percentage range, proving the tiered storage strategy is viable.
    4. Long contexts require close monitoring of KV Cache usage: Sessions approaching 1M Tokens quickly consume the memory budget. It is recommended to use context truncation, sliding windows, or prefix caching strategies.

    5. Implementation Recommendations and Selection Considerations

    Based on this practice, enterprises planning localized LLM clusters can follow these principles:

    • Calculate capacity first, then performance: Confirm the total memory requirements for target model weights, KV Cache, and attached structures to determine the number of nodes. Avoid situations where “it fits but won’t run” or “it runs but doesn’t fit.”
    • Network is as important as compute power: In the MoE architecture, interconnect bandwidth directly determines scaling efficiency. 400G-level RDMA networking is a reasonable starting point for multi-node inference.
    • A management plane is indispensable: Capabilities like model version management, inference gateways, rate limiting, authentication, and invocation auditing determine whether the cluster can move from a “lab” to a “production environment.” In public cloud scenarios, equivalent capabilities can be built using general cloud services such as container platforms, object storage, and monitoring/alerting.
    • Validate with real business workloads: Standard benchmark scores only reflect upper limits. Stress testing based on your own business traffic model is the ultimate basis for selection.

    6. Conclusion

    The localized deployment of large-scale MoE models is essentially a systems engineering challenge involving compute, memory, networking, and software stacks. The 4-node distributed inference cluster practice demonstrated in this article proves that through a combination of unified memory architecture, mixed-precision quantization, memory-storage tiering, and high-speed RDMA interconnects, enterprises can smoothly run trillion-parameter models in their own environments and achieve production-grade performance. We hope this methodology provides a clear implementation path for teams currently evaluating localized deployments.