Multi-Node Distributed Inference for Large-Scale MoE Models: Architecture, Tiered Storage, and Performance Testing

    This article explains how to deploy large-scale MoE models on a multi-node distributed inference cluster. It covers why very large MoE models require distributed inference, a three-layer cluster architecture spanning compute, network, and management, tiered storage across shared memory and NVMe, key inference engine configuration choices, and a performance testing approach based on microbenchmarks and real workloads. It also summarizes practical deployment recommendations and a hybrid on-premises/cloud fallback option.

    1. Background: Why Very Large MoE Models Need Distributed Inference Clusters

    As large language models continue to grow in parameter scale, Mixture-of-Experts (MoE) architectures have become a mainstream direction. Although such models activate only part of their expert parameters during each inference, the full weights still need to reside in accessible storage, and runtime overhead such as KV cache and activations adds further pressure. A single machine’s memory often cannot accommodate this. For example, a MoE model with hundreds of billions of parameters and mixed FP8/FP4 precision may still require far more than a single node’s memory limit for its weights plus the KV cache needed for long contexts, such as million-token windows, even after quantization and compression.

    For this reason, multi-node distributed inference is widely used: model weights are partitioned across multiple compute nodes, and data exchange between layers and experts is completed over a high-bandwidth, low-latency interconnect. The reference design discussed in this article consists of four compute nodes and one 400G-class high-speed switch, with RDMA networking. Nodes use remote direct memory access to bypass OS kernel and CPU copies, significantly reducing communication overhead. This is a prerequisite for efficient large-scale tensor parallelism (TP) and expert parallelism (EP).

    2. Cluster Architecture Design: Coordination of Compute, Network, and Unified Management

    A usable distributed inference cluster typically contains three layers.

    1. Compute layer. Each node integrates CPU and GPU and uses a unified memory architecture so that CPU and GPU share large-capacity LPDDR5X memory. In this design, four nodes together provide about 512 GB of shared memory and 80 ARM CPU cores, delivering PFLOPS-scale low-precision sparse compute. The advantage of unified memory is that it avoids the capacity bottleneck caused by separate memory and VRAM in traditional PCIe architectures, making it better suited to memory-hungry workloads such as very large model inference.

    2. Network layer. Inter-node connectivity uses up to 200 Gbps high-speed NICs per node, aggregated to a 400G-class switch, with RDMA enabled. During configuration, confirm that NIC drivers, link rates, and switch port negotiation are correct. Bandwidth testing tools should verify actual inter-node throughput and ensure it is close to line rate; otherwise, cross-node parallelism efficiency will drop significantly.

    3. Management layer. A unified management platform handles model distribution, inference service orchestration, health checks, and traffic gateway management across nodes. The management layer should provide visualization of model loading progress, service replica control, and a unified API entry point for applications, reducing the complexity of multi-node operations.

    3. Tiered Storage Strategy: Coordinating Memory and NVMe

    In MoE model inference, not all data is accessed at the same frequency. A reasonable tiered storage strategy is key to freeing memory capacity:

    • Keep hot weights in memory: expert weights and attention-related parameters required by currently activated computation should be placed in node memory first.
    • Offload cold data to NVMe: for lookup-table auxiliary data structures and other parts with relatively predictable access patterns and higher latency tolerance, data can be offloaded to large-capacity NVMe SSDs (8 TB in total in this design), with asynchronous prefetching to hide I/O latency.
    • Tier the KV cache: in very long context scenarios, paged KV cache management can swap historical segments in and out on demand, preventing long sessions from exhausting memory.

    In engineering practice, the benefit of offloading depends heavily on access locality. Teams should continuously tune based on hit rate and latency distribution monitoring, avoiding unacceptable tail latency introduced solely to save memory.

    4. Key Inference Engine Configuration Points

    The choice and configuration of the inference engine directly determine cluster efficiency. The following dimensions deserve attention:

    1. Parallel strategy combination. Very large MoE models typically use tensor parallelism to partition weights within a layer, expert parallelism to distribute MoE experts, and data parallelism to improve throughput. Higher cross-node parallelism is more sensitive to network bandwidth, so teams should balance what a single node can host against communication overhead.

    2. Precision and quantization. FP8 weight computation combined with FP4 storage compression is a typical use of Blackwell-generation hardware. It can significantly reduce memory usage and bandwidth pressure with controllable accuracy loss. Before enabling it, validate accuracy regression on key business data to prevent quantization errors from affecting generation quality.

    3. Continuous batching and scheduling. Enable dynamic continuous batching so new requests can be inserted between running batches, significantly improving GPU utilization. At the same time, configure reasonable maximum concurrency and queue lengths to prevent overload and queue buildup.

    4. Prefix caching. For scenarios with shared long prefixes, such as multi-turn dialogue and document Q&A, prefix caching avoids repeated computation and is an effective way to reduce first-token latency.

    5. Performance Testing Methods and Real-World Scenario Behavior

    After deployment, evaluate performance along two tracks: microbenchmarks and business scenarios.

    At the microbenchmark level, focus on measuring time to first token (TTFT) for a single request, inter-token latency / time per output token (ITL/TPOT), throughput (tokens/s) at different concurrency levels, and P50/P95/P99 latency distributions. Input and output lengths should cover combinations such as short Q&A and long document summarization. A concurrency ramp of 1, 4, 8, 16, and 32 is recommended to observe the throughput inflection point and latency degradation trends.

    At the business scenario level, cover four typical workload types:

    • Everyday Q&A: short input and short output, mainly testing response speed at low concurrency.
    • Document processing: long input from tens of thousands to hundreds of thousands of tokens, testing long-context handling and KV cache management.
    • Complex reasoning tasks: multi-step reasoning and code generation tasks with long outputs, focusing on sustained generation stability.
    • Agent scenarios: high-frequency tool calls and multi-turn interaction, with the highest requirements for concurrency scheduling and prefix caching efficiency.

    On a four-node cluster with 512 GB of total unified memory hosting a large-scale MoE model with mixed FP8/FP4 precision, reasonable parallel partitioning and continuous batching can provide smooth interactive experience for everyday Q&A and document processing. High-concurrency agent scenarios require queue management and replica scaling to maintain service quality.

    6. Deployment Recommendations and Summary

    For enterprises seeking on-premises deployment of very large models, the practical points from this article can be summarized as follows. First, estimate the total memory required for model weights and KV cache, then derive the number of nodes and per-node memory specifications. Second, the network is the lifeline of distributed inference; RDMA networking and bandwidth validation should not be omitted. Third, use tiered storage and prefix caching to balance cost and performance. Fourth, build a performance testing system covering microbenchmarks and real business workloads, and use data to drive capacity planning.

    It is important to note that distributed on-premises deployment is not the only path. For teams with strong elasticity requirements or limited operations resources, peak traffic can also be scheduled to cloud-based LLM inference services, forming a hybrid architecture with on-premises as the primary environment and cloud as fallback, achieving a better balance between data compliance and cost efficiency.