Deploying a Four-Node MoE LLM for Local Distributed Inference: Key Considerations

    This guide explains how to plan and deploy a four-node local inference cluster for a large mixture-of-experts (MoE) language model. It covers estimating memory for model weights and KV cache, configuring a star-topology network with RDMA over Ethernet, managing unified memory and SSD tiers, and starting a multi-node vLLM service on Ray. Hardware specifications and parameters are illustrative, so check the official documentation and your own load test results before deploying.

    1. Calculate Capacity First

    Before deployment, estimate memory use in two parts.

    The first part is model weights. Total weight size equals the parameter count multiplied by the bytes per parameter. With FP8, each parameter takes 1 byte, so a 1000B-parameter model needs about 1 TB for its weights. With tensor parallelism or expert parallelism, the weights are split across nodes, so each node holds roughly the total divided by the number of nodes. The split is not perfectly even. How components such as the embedding layer and attention layers are distributed depends on what the inference engine actually loads.

    The second part is the KV cache. For standard multi-head or grouped-query attention, estimate the KV cache per request with this formula:

    KV cache bytes = 2 × number of layers × number of KV heads × head dimension × bytes per element × sequence length

    Models with compressed attention structures, such as MLA, need their own formulas. Higher concurrency means more KV cache is in use at the same time, so plan context length and concurrency together.

    Reserve at least 20% of GPU memory for activations, communication buffers, and memory fragmentation. Adjust the exact ratio based on the peak usage you observe during load testing.

    2. Cluster Topology and Networking

    The four nodes connect to one high-speed switch in a star topology. Compared with direct links between every pair of nodes, a star topology has fixed communication paths. Adding a node requires only one cable, so you do not need to rewire the network, and fault isolation is more direct.

    In tensor parallelism, collective operations such as AllReduce and AllGather run at every layer, so they are sensitive to latency. RDMA lets a network card read and write remote memory directly, bypassing the operating system kernel network stack. This noticeably reduces communication latency. When you use RDMA over Ethernet (RoCE), enable PFC and ECN on both the switch and the NICs. Otherwise, bursty traffic can cause packet loss and retransmission, and throughput can drop sharply.

    Verify network performance with measurements. Before going live, measure bandwidth and latency between nodes with a communication benchmark tool. Record the results as your acceptance baseline, and measure again after every network configuration change.

    3. Unified Memory and SSD Tiering: Practical Limits

    Grace Blackwell-class superchips provide a shared address space for the CPU and GPU. This reduces explicit data copies between host memory and GPU memory. A shared address space does not mean all memory is equally fast. GPU memory usually has the highest bandwidth. CPU-side LPDDR memory has larger capacity but lower bandwidth, and access latency differs between the two. Inference performance depends on whether hot data sits in high-bandwidth memory, so use a profiling tool to confirm where data actually resides.

    Adding SSDs to the storage hierarchy frees up memory, but keep the following points in mind.

    First, SSDs suit data that is accessed infrequently and can tolerate higher latency, such as rarely used sparse retrieval indexes. If every decoding step must read from the SSD, throughput drops directly.

    Second, expert access in MoE models is uneven. Some experts are routed to far more often than others. Simple LRU swapping can cause frequent thrashing. A safer approach is to record the activation frequency of each expert over a window of real traffic first. Then keep high-frequency experts resident in memory, and swap only low-frequency experts.

    Third, swapping increases tail latency. P99 latency can be much higher than average latency, so set timeouts for the service. On a timeout or load failure, return a clear error or switch to another replica, so requests do not hang for long periods.

    Fourth, SSDs have limited write endurance. Inference is mostly read-heavy, but if the system writes cache data frequently, check the total bytes written (TBW) rating from the manufacturer and monitor wear indicators.

    Fifth, verify the integrity of weight files. Every node must load the same weight version. Use SHA256 checksums to confirm the files. This prevents nodes from loading different expert weight versions, which would produce inconsistent outputs that are hard to debug.

    4. Multi-Node vLLM Deployment Steps

    You cannot use the single-node vLLM launch command directly on four nodes. For multi-node deployment, first form a Ray cluster. Then let vLLM use Ray to schedule GPUs across nodes.

    Step 1: Install the same CUDA driver version, Python environment, vLLM, and Ray on all nodes. Version mismatches are the most common cause of multi-node deployment failures.

    Step 2: Place the model files at the same path on all nodes, or mount the same shared storage.

    Step 3: Start Ray on the head node:

    1. # Run on the head node. Set --num-gpus to the number of GPUs available on this node.
    2. ray start --head --port=6379 --num-gpus=1

    Step 4: Join the remaining nodes to the cluster. Replace the IP address with the internal address of the head node:

    ```bash

    Run on worker nodes

    ray start —address=’: