Local Deployment of Large Models: A Practical Four-Node Cluster Test with an Ultra-Large MoE Model
This article presents a real-world engineering practice for deploying a large MoE (Mixture of Experts) model on a four-node local inference cluster. It covers cluster architecture design, high-speed networking with RDMA, layered storage and mixed-precision strategies, inference service orchestration, and performance benchmarking. Key insights on tensor parallelism, KV Cache management, prefix caching, and continuous batching are also discussed, along with practical recommendations for capacity planning and enterprise adoption.
Why Multi-Node Clusters Are Necessary for Large Model Deployment
As the parameter scale of large language models continues to grow, a single device can no longer meet the inference demands of mainstream ultra-large models. Multi-node distributed inference clusters have become the standard path for enterprise private deployment. Although MoE (Mixture of Experts) architectures reduce per-inference computation through sparse activation, the total parameter count remains immense. The combined memory required for all weights and KV Cache far exceeds the capacity of a single GPU or even a single server. Moreover, in ultra-long-context scenarios, the KV Cache grows linearly with sequence length, further intensifying memory pressure.
Deploying such models locally typically requires solving three core problems:
- Memory capacity: Multi-node GPU memory must be pooled to create a unified addressable space of several hundred GB or more.
- Inter-node communication: Tensor parallelism is highly sensitive to bandwidth and latency between nodes. Standard Ethernet is insufficient.
- Deployment and operations: Model distribution, service orchestration, and a unified entry point across multiple nodes require platform-level management.
Cluster Hardware and Network Topology Design
This practice uses four homogeneous compute nodes, each based on a tightly integrated CPU-GPU architecture with shared low-power unified memory. This design eliminates traditional PCIe copy overhead. Together, the four nodes provide approximately 512 GB of shared memory, 80 CPU cores, and 8 TB of high-speed local NVMe storage.
For networking, a switched star topology is adopted: each node connects to a single 400G-class switch via high-speed NICs, with RDMA (Remote Direct Memory Access) enabled to build a RoCE (RDMA over Converged Ethernet) network. Compared with a mesh topology in which every node connects directly to every other node, the switched architecture offers three clear advantages:
- Cleaner topology and simpler cabling: Each node requires only one uplink; scaling the cluster does not require re-cabling the network.
- No relay overhead: Inter-node communication is directly forwarded by the switch, and nodes do not relay traffic for one another. Compute resources are not consumed by network stack processing.
- Easier operations: Link status is centrally visible, simplifying fault diagnosis and link replacement.
This network design provides the foundation for multi-node tensor parallelism, where every forward pass requires All-Reduce communication across nodes. Network bandwidth directly determines the upper bound of parallel efficiency.
Layered Storage and Memory Management
Even with 512 GB of shared memory, ultra-large MoE models require careful resource planning. This practice adopts a layered storage strategy combining unified memory and local NVMe SSDs:
- Weight placement: Frequently accessed expert weights and attention-related parameters are distributed across node memory using tensor parallelism, with each node holding only one quarter of the full model weights.
- Low-frequency data offloading: Lookup tables and other infrequently accessed data structures are offloaded to NVMe SSDs, leveraging high-speed random reads for on-demand loading. This frees precious GPU memory for KV Cache and activations.
- Precision optimization: The model uses FP8 and FP4 mixed-precision quantization, significantly reducing memory usage and memory bandwidth demands with negligible quality loss, while taking advantage of native hardware acceleration for low-precision computation.
The core principle is: the most expensive resource (GPU memory) should serve the most latency-sensitive data, while data that tolerates millisecond-level latency is pushed down to the next tier of storage.
Deployment Orchestration and Inference Service Management
Multi-node deployment is substantially more complex than single-machine setups. A cluster management platform is recommended to uniformly handle model distribution, inference engine startup, and service gateway configuration. A typical startup command for tensor-parallel inference across multiple nodes is as follows:
# Example: Start inference service with tensor parallelism across 4 nodes# --tensor-parallel-size specifies the parallel sharding factor# --max-model-len specifies the maximum context lengthserve --model /models/moe-large-fp8 \--tensor-parallel-size 4 \--max-model-len 1048576 \--dtype auto \--enable-prefix-caching
Several engineering practices are worth noting:
- Prefix Caching: Significantly reduces first-token latency in multi-turn conversations and long-document Q&A scenarios.
- Continuous Batching: A key mechanism for improving concurrent throughput; should be enabled during load testing.
- Unified AI Gateway: Exposes a single service entry point for authentication, rate limiting, load balancing, and request routing, avoiding direct client access to inference nodes.
- Observability: Integrate standard monitoring, alerting, and logging services to continuously collect metrics such as TTFT (Time to First Token), TPOT (Time Per Output Token), GPU utilization, and network throughput.
Performance Testing Methodology and Observations
Load testing covered four typical business scenarios: general Q&A (short input and output), document processing (long input), complex reasoning tasks, and AI-assisted programming with multi-turn agentic tool calling. The recommended metric set is:
| Metric | Definition | Focus Area |
|---|---|---|
| TTFT | Time to first token | Interactive experience |
| TPOT | Time per output token | Streaming output fluency |
| Throughput | Total output tokens per second | Concurrent capacity |
| Concurrency limit | Max concurrency under SLA | Capacity planning |
Several broadly applicable findings emerged from the tests:
- Throughput scales, then plateaus: At low concurrency, throughput increases nearly linearly. Once KV Cache memory is saturated, throughput enters a plateau, and further load only increases latency. Capacity planning should reserve headroom based on this inflection point.
- Network becomes a sensitive variable in long-context scenarios: When input length exceeds hundreds of thousands of tokens, inter-node communication overhead increases. The latency advantage of RDMA over standard Ethernet becomes more pronounced, confirming the necessity of high-speed switched networking.
- Mixed-precision quantization has acceptable quality impact: In subjective evaluations of Q&A and coding tasks, FP8/FP4 mixed-precision output showed no significant usability difference from higher-precision versions, while the memory savings directly translated into higher concurrency.
- Agent scenarios are most sensitive to TTFT: In multi-turn tool-calling chains, every turn triggers a new inference request. Prefix cache hit rate becomes the decisive factor for end-to-end response time.
Recommendations for Selection and Deployment
Based on this practice, enterprises planning local large-model clusters should follow these principles: estimate total memory as “model weights × 1.2 + target concurrency × per-session KV Cache”; choose RDMA-capable switched networks over direct connections; select inference engines that support tensor parallelism, continuous batching, and prefix caching; and adopt management platforms that cover orchestration, a unified gateway, and full observability. For organizations that prefer not to build all infrastructure in-house, cloud-based GPU instances, container platforms, and object storage services can serve as supplementary options in a hybrid deployment.
There is no one-size-fits-all solution for multi-node local inference clusters. Only when memory capacity, networking, inference engine, and operations are all addressed together can ultra-large models run stably and efficiently in a private environment.
