Multi-Node Unified-Memory Cluster Deployment for Large Models: Architecture and Practice
This article explains how to deploy large Mixture-of-Experts (MoE) models on multi-node clusters built on a unified-memory architecture. It covers why multi-node deployment is necessary, a reference architecture including compute nodes, network topology, storage tiering, and the management plane, the full model deployment workflow (environment consistency, weight distribution, parallelism strategies, and inference service configuration), performance evaluation methods and metrics, and common operational issues. The goal is to give engineers a practical framework for planning, deploying, and validating distributed LLM inference in private environments.
1. Background: Why Large Models Need Multi-Node Deployment
Large Mixture-of-Experts (MoE) models often have weights on the order of hundreds of gigabytes. Once you add activation buffers, KV cache, and runtime overhead during inference, a single server usually cannot host the model on its own. In private deployment scenarios, teams typically choose among three common options:
- Quantization: Reduce weight precision to shrink memory footprint. This introduces some accuracy loss, so you need evaluation results to confirm the acceptable range for your business.
- Parameter offloading: Move infrequently accessed data to slower storage tiers, such as NVMe SSDs, freeing memory for active computation.
- Multi-node parallelism: Partition the model across multiple compute nodes, with the network handling cross-node data synchronization.
The multi-node approach accommodates both larger models and longer contexts, but it turns a single-machine problem into a distributed-systems problem. Weight distribution, network communication, runtime environment consistency, inference engine adaptation, and service orchestration all have to be considered at the same time.
2. Reference Architecture
2.1 Compute Nodes
A unified-memory architecture lets the CPU and accelerators share the same memory space, eliminating copies between host memory and device memory. Taking a 4-node reference configuration as an example, the overall resources look roughly like this:
- Compute nodes: 4, each with an ARM-architecture CPU, 80 cores in total
- Unified memory: 512 GB in total, pooled across the nodes
- Local storage: 8 TB NVMe SSDs in total
- Network interfaces: up to 200 Gbps NIC bandwidth per node
- Switching fabric: 400 G-class switches with RDMA support
These figures come from the specification of one particular solution and are provided only as a configuration example. When selecting hardware, always verify against the actual procured specifications, and check whether memory capacity satisfies the total demand of “weights + KV cache + system reserve.”
2.2 Network Topology: Direct Connection vs. Switched Fabric
There are two main ways to interconnect multiple nodes.
| Evaluation Dimension | Direct Node-to-Node Links | Switched Star Topology |
|---|---|---|
| Scalability | Cabling grows rapidly as nodes are added | New nodes simply plug into switch ports |
| Cabling complexity | High; point-to-point links must be planned | Low; cables converge at the switch |
| Bandwidth contention | Each node pair owns its link; little contention | Shared switch backplane and uplinks; congestion needs attention |
| Fault isolation | Requires checking links one by one | Fast localization via per-port switch statistics |
| Operational consistency | Scattered topology | Clear topology, easier to manage uniformly |
The advantages of a switched topology are clear structure, simple cabling, and easier management; data between nodes does not need to transit through other nodes. When choosing a switched fabric, confirm that the switch backplane bandwidth can sustain all ports communicating at full load simultaneously—otherwise, queuing will occur during collective communication peaks.
RDMA (Remote Direct Memory Access) allows the NIC to read and write remote memory directly, bypassing the OS kernel, which significantly reduces communication latency and CPU overhead. When implementing RDMA over Ethernet, you must configure lossless network mechanisms such as priority-based flow control and congestion control; otherwise, packet loss will cause communication performance to collapse.
2.3 Storage Tiering
Data access frequency varies enormously in LLM inference. Sensible tiering lets fast memory serve the parts that truly need low latency.
- Hot data (active weights, activations and KV cache of the current batch): kept in unified memory to guarantee access latency during computation.
- Warm data (infrequently accessed lookup-table parameters, some expert weights): offloaded to NVMe SSDs and loaded on demand.
- Cold data (original model files, historical logs, evaluation results): placed on larger-capacity persistent storage, read only during deployment or retrospective analysis.
Offloading policies must be validated against real access patterns. If offloaded data is frequently accessed on the inference path, NVMe read latency will directly slow down the generation of every token.
2.4 Management Plane
A multi-node cluster needs a unified management plane, which typically includes:
- Node management: Centrally register hardware information, driver versions, and health status of each node.
- Model registry: Centrally store model files, recording version numbers and checksums.
- Service orchestration: Deploy model shards to each node according to the topology, and handle start/stop and rolling upgrades.
- Inference gateway: Expose a unified API endpoint externally, handling authentication, rate limiting, routing, and usage accounting.
3. Model Deployment Workflow
3.1 Unified Runtime Environment
The most common cause of multi-node deployment failure is environment inconsistency between nodes. Before deployment, confirm that the following are identical on every node:
- OS kernel version and versions of key system libraries
- Accelerator driver and runtime versions
- Collective communication library and network driver versions
- The inference engine and its dependency image versions
Containerization is recommended to pin the runtime environment, with a consistency check before deployment. Below is a sample script illustrating the idea: it compares version fingerprints across nodes to determine consistency.
#!/bin/sh# Example: collect the local node's environment fingerprint and compare with the baselineBASELINE="$1"FINGERPRINT=$({ uname -r; cat /proc/driver/nvidia/version 2>/dev/null; \ip -br link 2>/dev/null; \cat /etc/os-release; } | sha256sum | cut -d' ' -f1)if [ "$FINGERPRINT" = "$BASELINE" ]; thenecho "OK: environment consistent"elseecho "MISMATCH: fingerprint mismatch, please check $(hostname)"exit 1fi
3.2 Weight Distribution and Integrity Verification
Model weights are large; downloading them node by node from an external source is slow and error-prone. The recommended approach is:
- Download the weights centrally on the management node and record the hash of each file.
- Synchronize the weights to each compute node over the high-speed internal network, using a tool that supports resumable transfers.
- Before loading, each node recomputes the hashes and compares them against the manifest. Any mismatch should block service startup.
Weight verification is a critical safeguard against silent corruption. A single undetected data error may only manifest as occasional output anomalies, which are very expensive to debug.
3.3 Parallelism Strategies
Multi-node inference usually combines the following parallelism strategies:
- Tensor parallelism: Splits the matrix operations of each layer across multiple devices. It requires collective communication between nodes after every layer and is the most sensitive to network bandwidth and latency.
- Pipeline parallelism: Assigns different layers to different nodes, passing activations sequentially. Communication volume is smaller, but it introduces pipeline bubbles.
- Expert parallelism: For MoE models, distributes different experts across nodes; during routing, tokens are sent to the nodes hosting the corresponding experts.
The choice of strategy depends on network conditions and model architecture. In clusters with abundant bandwidth and low inter-node latency, tensor parallelism pays off clearly. When network conditions are weaker, reduce the frequency of cross-node communication accordingly.
3.4 Inference Service Configuration
Inference service configuration typically includes model path, parallelism scale, memory utilization ceiling, maximum concurrency, and context length. Below is a generic illustrative configuration; actual field names must follow the documentation of your chosen inference engine.
# Illustrative configuration; field names are for explanation onlycluster:nodes: 4interconnect: rdma_over_ethernetmtu: 9000model:path: /models/moe-model-v1weight_checksum: sha256:<manifest>precision: mixed_fp8_fp4max_context_tokens: 1048576parallel:tensor_size: 4expert_placement: balancedruntime:memory_utilization_ceiling: 0.90max_concurrent_requests: 64offload:cold_params_device: nvme
Principles for setting key parameters:
- The memory utilization ceiling should not be set too high; reserve headroom for bursty long-sequence requests. A common practice is to start stress testing around 0.8 and adjust from there.
- Maximum concurrency must be computed together with KV cache usage: the higher the concurrency, the less cache available per request.
- The larger the context length limit, the faster KV cache consumption grows. Set it based on actual business needs rather than blindly taking the maximum value.
3.5 External API and Call Example
Inference services typically expose HTTP APIs compatible with mainstream conversational API formats, so existing applications can integrate smoothly. The example below uses only the standard library; the API key is read from an environment variable rather than hard-coded.
import jsonimport osimport urllib.requestENDPOINT = os.environ["LLM_ENDPOINT"]API_KEY = os.environ["LLM_API_KEY"]def ask(prompt: str, max_tokens: int = 512) -> str:payload = json.dumps({"model": "local-moe-model","messages": [{"role": "user", "content": prompt}],"max_tokens": max_tokens,}).encode("utf-8")req = urllib.request.Request(ENDPOINT,data=payload,headers={"Content-Type": "application/json","Authorization": f"Bearer {API_KEY}",},method="POST",)with urllib.request.urlopen(req, timeout=60) as resp:body = json.loads(resp.read().decode("utf-8"))return body["choices"][0]["message"]["content"]if __name__ == "__main__":print(ask("Summarize the main challenges of multi-node inference in three sentences."))
At this layer, the gateway should handle authentication, per-user or per-application rate limiting, and call logging, enabling usage accounting and problem tracing later.
4. Performance Evaluation Methods
4.1 Key Metrics
When evaluating LLM inference performance, consider the following metrics together—looking at any single one in isolation leads to one-sided conclusions:
- Time to first token (TTFT): The time from sending a request to receiving the first output token; it directly shapes the user’s perceived wait.
- Output speed: Output tokens generated per second; determines how long long-form answers take.
- Concurrent throughput: Requests or tokens completed per second under a specified latency constraint.
- Tail latency: P95 and P99 response times, reflecting stability under high load.
- Memory and VRAM watermark: Resource utilization curves under long context and high concurrency.
4.2 Test Scenario Design
The test set should cover typical workloads from real business scenarios. Common scenarios include:
- Everyday Q&A: Short input, short output; focus on TTFT.
- Document processing: Long input, such as summarizing or extracting from tens of thousands of words; focus on memory usage and speed under long context.
- Complex tasks: Multi-step reasoning and long outputs; focus on the stability of output speed.
- Coding and agentic tasks: Tool calls and multi-turn interactions; focus on context management and end-to-end call-chain latency.
For each scenario, fix input and output lengths, run several warm-up iterations to eliminate cold-start effects, then increase concurrency in steps and record metrics at each concurrency level. Each data set should be repeated multiple times; report medians and retain raw logs.
4.3 Theoretical Peak vs. Actual Performance
The theoretical compute figures in hardware specifications are usually computed under specific numeric formats and sparsity conditions. Actual inference is jointly limited by memory bandwidth, communication latency, scheduling overhead, and kernel efficiency. Therefore, theoretical peaks can only be used for rough comparisons of hardware tiers and cannot be directly converted into real throughput. When procuring or selecting hardware, require benchmarks under workloads close to your own business, and keep complete records of the test environment and parameters for reproducibility.
This article does not provide specific benchmark numbers. Readers should run tests under their own model versions, hardware configurations, and business workloads to obtain decision-grade results.
5. Common Issues and Mitigations
- Inter-node bandwidth contention: Manifests as noticeably increased latency as concurrency rises. During troubleshooting, examine switch port utilization and packet-loss counters; if necessary, adjust flow-control parameters or reduce cross-node communication frequency.
- Single-node failure: In multi-node parallelism, any single node failure interrupts the entire service. Health checks should be configured, together with a degradation or re-sharding process, so that the cluster can respond when a node becomes abnormal.
