Multi-Node LLM Inference Deployment on Hardware Accelerators: Practices and Guidelines
This article explores the practices and challenges of deploying trillion-parameter sparse Mixture-of-Experts (MoE) models across multiple servers using hardware accelerators. It covers pre-deployment architecture decisions, parallel strategy selection, VRAM budgeting, node network preparation, and model weight distribution, using a two-server, 32-compute-unit setup as a practical example.
Background: Why Multi-Node Deployment is Necessary
Sparse Mixture-of-Experts (MoE) models with trillions of parameters cannot fit into the VRAM of a single server. Even with low-precision quantization (e.g., 4-bit weights and 8-bit activations), the weight size can still reach the TB level, necessitating the partitioning of the model across multiple accelerators or even multiple servers. The difficulty of multi-node deployment lies not in whether it “can run,” but in simultaneously meeting requirements for partitioning methods, inter-node bandwidth, weight distribution efficiency, and service stability.
This article uses a two-server setup as an example, with each server containing 16 compute units, forming an inference instance with 32 compute units in total. The configuration approaches and verification methods discussed here are universal and can be migrated to similar hardware environments.
1. Pre-Deployment Architecture Assessment
1.1 Choosing a Parallelism Strategy
Large model inference commonly utilizes three parallelism methods, each with distinct communication characteristics:
- Tensor Parallelism (TP): Splits the matrix operations of a single layer across multiple cards. It requires frequent collective communication within the layer, making it highly sensitive to bandwidth and latency. It is typically deployed over high-speed interconnects within a single server.
- Pipeline Parallelism (PP): Slices the model into several segments by layers, placing each segment on a group of cards. Only activation tensors are passed between segments, resulting in a smaller communication volume, making it suitable for cross-node deployment.
- Expert Parallelism (EP): Allocates different experts to different devices in a Mixture-of-Experts model. The communication pattern is more complex and should be selected based on the inference engine’s support.
In a scenario with two servers and 16 compute units per server, a common approach is intra-node Tensor Parallelism and inter-node Pipeline Parallelism. This keeps intra-layer communication within the machine, and cross-machine communication only passes inter-segment activations, significantly reducing the requirements for inter-node networks compared to global Tensor Parallelism.
1.2 VRAM Budgeting
Before deployment, you should first estimate the VRAM usage. The per-card footprint can be broken down into several parts:
Weight per card = Total model weight in bytes / Tensor Parallelism size / Pipeline Parallelism segmentsAvailable for KV cache = Per-card VRAM × VRAM utilization limit - Weight per card - Runtime overheadKV cache per request ≈ Layers × 2 × KV heads × Head dimension × Sequence length × Bytes per element
The above formulas are general approximations. Different attention mechanisms (e.g., Grouped-Query Attention or Low-Rank Attention) calculate KV cache differently, so specific values should be based on the model’s architecture documentation. The available space for the KV cache determines the concurrency and maximum context length; therefore, VRAM budgeting must be considered alongside your business’s concurrency and context requirements.
2. Node Access and Network Preparation
2.1 Node Management
Most management platforms use a method where nodes actively connect outward to the control plane. By generating an installation command in the console and executing it on each server, the node reports accelerator, network interface, and storage information to the control plane. This reverse connection mode is suitable for intranet machines without a public IP. Control, monitoring, logging, and inference traffic can reuse the same encrypted tunnel, reducing the need for firewall policy changes.
After the nodes come online, verify that the reported number of devices matches the hardware. For example, with two servers containing 16 compute units each, the platform should display 32 available devices. If the device count does not match, troubleshoot the driver and runtime versions first before proceeding to the deployment phase.
2.2 Accelerator Interconnect Network
The bottleneck of multi-node inference usually occurs between nodes. You should assign the high-speed interconnect network interfaces of each node to the same parameter network and perform connectivity checks before going online. Focus on the following items:
- Unidirectional and bidirectional bandwidth between each pair of nodes
- Latency and jitter
- Link error counts and packet loss
- Whether the routing path meets expectations
The following commands can quickly check the network interface error statistics:
# View network interface RX/TX counters and error countersip -s link show <interface># Continuously sample to observe if error counts are increasingwatch -n 2 "ip -s link show <interface> | sed -n '1,6p'"
If error counts continuously increase during stress testing, it usually indicates a problem with the cables, optical modules, or switch ports, which should be resolved before deployment.
2.3 Scheduling Constraints
During declarative deployment, “belonging to the same parameter network” should be declared as a scheduling constraint. This prevents the deployer from mixing nodes from different networks into the same instance. Once scheduling constraints are in effect, causes for deployment failures become more concentrated and easier to troubleshoot.
3. Model Weight Acquisition and Distribution
3.1 Version Pinning and Integrity Verification
The versions in the weight repository should use immutable commit hashes.
