Deploying a MoE Large Model Across a Four-Node Cluster: An Engineering Practice

    Learn how to deploy a ~400B-parameter MoE model across four nodes with unified memory, covering memory budgeting, RDMA networking, vLLM parallelism strategies, KV Cache sizing for 1M context, and tiered storage with NVMe offloading.

    Why Multi-Node Inference

    Mixture-of-Experts (MoE) models activate only a subset of expert networks per forward pass, so the compute cost of a single inference is far lower than that of a dense model with the same total parameter count. However, all weights must still reside in memory. The example model in this article has roughly 400 billion parameters stored in FP8, which means about 400GB of weights. No single device can hold that, so the model must be sharded across multiple nodes for cooperative inference.

    This article uses a fictional example model whose parameters are hypothetical values chosen for easy calculation. It does not correspond to any released model version. Readers should substitute the model of their choice and recalculate based on that model’s official configuration file.

    Hardware Foundation: Node Specs and Memory Budget

    The cluster in this article consists of four Grace Blackwell-class nodes. The node specifications follow a GB10-class desktop workstation platform: a 20-core Arm CPU, 128GB of unified memory, a 200GbE NIC, and an NVMe SSD. Four nodes provide 512GB of memory in total. Refer to the vendor’s documentation for exact specifications.

    Unified memory lets the CPU and GPU share the same physical memory pool, eliminating copies between host memory and device memory. This benefits expert routing and intermediate activations in MoE models. The tradeoff is that the operating system, the inference engine runtime, and caches all consume the same memory pool, so the capacity actually available for weights and KV Cache is lower than the nominal figure.

    The memory budget can be planned as follows. The example model’s 400GB of weights average 100GB per node. The remaining ~112GB covers KV Cache, activations, the system, and the runtime. That margin is not enough to hold the KV Cache for a full 1M context, which is why tiered storage is introduced later.

    Networking: Bandwidth Sets the Ceiling

    Each of the four nodes connects through a 200Gbps port, and the switch uses 400G ports with breakout cables. A single switch fully interconnects all four nodes—traffic between any two nodes goes directly through the switch fabric with no intermediate hops. Before deployment, confirm that the switch backplane capacity can sustain full line-rate traffic on all connected ports; otherwise internal congestion will occur.

    Multi-node inference depends on RDMA transport. RDMA moves data directly between the NIC and memory, bypassing the OS kernel, which reduces latency and CPU overhead. Inference frameworks access RDMA through communication libraries such as NCCL. During deployment, verify that NIC drivers, firmware, and RDMA features are all enabled, and test actual throughput with tools like ib_write_bw.

    Inference Engine: Parallelism Trade-offs

    This article uses vLLM as the inference engine. It supports tensor parallelism (TP) and pipeline parallelism (PP). Since each node has only one accelerator unit, the cross-node parallelism strategy directly determines communication volume.

    Tensor parallelism requires an AllReduce at every layer. A standard Transformer layer performs two AllReduces per forward pass—one after the attention output projection and one after the feed-forward output. Expert dispatch in MoE layers typically uses All-to-All communication, which this article does not cover in detail. The data volume of a single AllReduce equals batch tokens × hidden dimension × bytes per element. For a prefill batch of 4,096 tokens, a hidden dimension of 8,192, and BF16 precision, a single AllReduce moves about 64MB. With a ring algorithm across 4 nodes, each node sends and receives roughly 1.5× that amount, or about 96MB. A 200Gbps link at 90% efficiency yields about 22.5GB/s, so one AllReduce takes about 4.3 milliseconds. For a 60-layer model, this communication alone accumulates to roughly 0.5 seconds per forward pass.

    Pipeline parallelism assigns consecutive layers to different nodes, passing the activation tensor between nodes only once at each stage boundary. Communication happens far less often; the cost is pipeline bubbles that introduce idle waiting. Single-request latency increases, but throughput is more stable under high concurrency. This deployment relies primarily on pipeline parallelism, splitting the weights evenly by layer into four shards of about 100GB each, one per node.

    Management Plane: Service Publishing and Resource Isolation

    The management plane uses an enterprise-grade model management console that handles the model lifecycle, service publishing, elastic scaling, and monitoring. The console includes a built-in AI gateway that exposes an OpenAI-compatible API, so business systems don’t need to be aware of the underlying node layout. Multi-tenant quota features can partition GPU resources by business unit.

    Before going live, confirm three things. First, the compatibility between the console version and the inference engine version. Second, how the gateway handles streaming output, since long-text generation depends on streamed responses. Third, whether quotas are metered per GPU, per node, or per memory. If the model includes FP4 weights, also verify that the inference engine version explicitly supports FP4; otherwise, fall back to FP8.

    1M Context and Tiered Storage

    The main memory pressure from long context comes from the KV Cache. Its size can be estimated with this formula:

    KV Cache bytes per token = number of layers × 2 × number of KV heads × head dimension × bytes per element

    For the example model—with 60 layers, 8 KV heads (grouped-query attention), head dimension 128, and BF16 precision—each token occupies 60 × 2 × 8 × 128 × 2 = 245,760 bytes, or about 240KB. One million tokens therefore require about 258GB. If the KV Cache uses FP8 instead, the same length takes about 129GB. With multi-head attention, the number of KV heads equals the number of attention heads, multiplying the footprint. With compression-oriented attention variants, adjust the formula to the corresponding structure.

    Regardless of precision, the KV Cache for a 1M context exceeds the cluster’s remaining memory. The solution therefore splits data into hot and cold tiers. Model weights and frequently accessed hot data (KV blocks of active requests) reside preferentially in unified memory. Infrequently accessed cold data is offloaded to the NVMe SSD, and the inference engine asynchronously prefetches it back into memory when needed.

    The benefit of this approach depends on how timely the prefetching is. If reading cold data takes longer than the computation, requests stall waiting on disk. For the example model, the FP8 KV Cache of 500K tokens is about 64GB. Reading it entirely from a single NVMe drive at roughly 5GB/s sequential read speed would take about 13 seconds. The prefetch window must therefore align with the compute pipeline, and the hot data should cover as much of the working set as possible.