Local Deployment of Large Models on a Four-Node Cluster: Architecture, Benchmarking, and Tuning
This article examines how to deploy large MoE models locally on a four-node cluster. It covers a layered resource pool design across compute, RDMA interconnect, and NVMe storage, mixed-precision and context management strategies, a four-scenario benchmarking method with fixed metric definitions, and tuning recommendations that prioritize network topology, parallelism, and caching. A selection checklist helps teams decide between self-built clusters and cloud resources.
1. Why Large Models Need Cluster-Based Local Deployment
Large parameter Mixture-of-Experts (MoE) models are moving into enterprise intranets, and the question has shifted from “can it run at all” to “can it run stably, concurrently, and operably.” Single-node setups usually hit two physical limits. First, available unified memory is insufficient, so model weights and runtime cache compete for the same space. Second, limited single-machine interconnect bandwidth turns cross-device communication into a throughput bottleneck. When the context window grows to the million-token range, KV Cache memory usage scales roughly linearly with concurrency and sequence length, and a single machine’s headroom is consumed quickly.
The core value of a multi-node cluster is therefore not just “more compute.” It is turning memory capacity, interconnect bandwidth, and storage tiers into a coordinated resource pool. This article uses a typical setup of four compute nodes plus one high-speed switch as a reference and discusses a portable engineering method.
2. Reference Architecture: The Logic of a Layered Resource Pool
A reusable cluster topology typically has three layers:
- Compute layer: 4 nodes with ARM architecture CPUs and a new-generation GPU architecture, totaling about 80 CPU cores. The shared memory pool uses unified memory addressing, with theoretical sparse compute reaching the PFLOPS range.
- Interconnect layer: each node has a high-bandwidth RDMA-capable NIC (single port around 200Gbps), and a 400G-class switch forms a non-blocking or near-non-blocking network so tensor parallel and expert parallel traffic do not collide.
- Storage and management layer: 8TB-class NVMe SSDs handle weight cold zones and lookup data offload, while a unified control plane manages model registration, routing, canary release, and monitoring alerts.
The key design point is “layering” rather than “averaging”: keep the most frequently accessed weights and activations in unified memory, push the sparse but massive lookup structures down to NVMe, and trade bandwidth for capacity.
[Client/Gateway] -> [Inference Service Router]|+-------------+-------------+| | |[Node 1] <--> [Node 2] <--> [Node 3] <--> [Node 4]\_____________ 400G RDMA _____________/|[NVMe Tiered Offload Zone]
3. Model and Precision Strategy: Mixed Precision and Context Management
Memory pressure in MoE inference comes mainly from three parts: expert weights, shared attention weights, and KV Cache. A common engineering practice is a native low-precision mixed format (such as combining FP8 and FP4), which compresses weight size to one-half or one-quarter of the original while keeping accuracy loss controllable.
The context window is another variable. A million-level context does not mean enabling the full window by default; real deployments should configure tiers:
# Illustrative configuration, not a specific product interfacemodel:precision: mixed-fp8-fp4max_context: 1048576default_context: 32768 # default tier for regular Q&Along_doc_context: 262144 # long-document tierkv_cache:dtype: fp8block_size: 16enable_prefix_caching: true # prefix reuse to cut repeated prompt cost
Prefix caching pays off significantly in scenarios with “fixed system prompt plus changing documents,” spreading repeated prefill cost.
4. Benchmarking Method: Four Scenarios and Metric Definitions
Evaluation must separate “single-request latency” from “concurrent throughput,” otherwise conclusions contradict each other. Four scenarios are recommended:
- Everyday Q&A: short input, short output; focus on time to first token (TTFT) and output tokens per second (TPS).
- Document processing: long input, short output; focus on prefill throughput and peak memory to verify whether the offload strategy works.
- Complex tasks: multi-step reasoning with long outputs; focus on the TPS decay curve under long sequences and the timeout rate.
- Coding/Agent workloads: multi-turn tool calls; focus on concurrency stability, context retention, and P99 latency.
Metric definitions must be fixed: input/output length distribution, concurrency gradient (1/8/32/64), warmup rounds, and sampling temperature. Performance numbers without fixed definitions are not comparable.
# Illustrative benchmark loopfor c in 1 8 32 64; dorun_bench --concurrency $c --in 2048 --out 512 --warmup 3 --rounds 20done
5. Observed Results and Tuning Recommendations
On a four-node unified memory architecture, three patterns usually appear. First, TTFT for short requests is determined mainly by scheduling and network round trips, so inter-node link quality matters more than peak compute. Second, the bottleneck in long-document scenarios shifts to the prefill stage, and enabling chunked prefill plus prefix reuse noticeably smooths latency spikes. Third, TPS does not rise linearly with concurrency under high load, so a working point must be chosen between throughput and P99 latency.
The recommended tuning order is: first fix the network and topology (confirm RDMA is not degraded), then tune the parallelism split (the ratio of expert parallel to tensor parallel), and finally tune cache and batching parameters. Reversing this order often makes results non-reproducible.
6. Selection Checklist
- Does memory capacity cover the target model weights plus peak KV Cache, with 20% headroom reserved?
- Does the interconnect support RDMA, and is the switch non-blocking?
- Can the storage tier carry offloaded data without affecting tail latency?
- Does the control plane provide model routing, canary release, logging, and monitoring alerts?
- Does it support migrating the same inference service definition between public cloud and local environments?
Conclusion: the success of multi-node local cluster deployment depends on the ratio and tuning order of memory, interconnect, and storage, not on a single compute metric. By establishing a reproducible benchmarking definition as described above, enterprises can make a rational tradeoff between self-built clusters and elastic cloud resources.
