Multi-Node LLM Deployment: Capacity Planning, Parallelism, Configuration, and Validation
Deploying large MoE models locally often requires more memory than a single server can provide. This article outlines a practical multi-node inference architecture, starting with weight and KV cache capacity estimation, then covering tensor and pipeline parallelism, vLLM and Ray configuration considerations, and performance validation. It also discusses quantization, CPU offloading, benchmarking metrics, and pre-launch checks. The figures are illustrative; final choices should be based on measured results for the specific hardware, model version, and inference engine version.
Large Mixture-of-Experts (MoE) models often have weights that exceed the GPU memory and host memory capacity of a single server. To run such models locally without data leaving the premises, enterprises typically need to form an inference cluster from multiple servers. This article explains the basic approach to multi-node deployment across four areas: capacity estimation, parallelism strategy, inference engine configuration, and performance validation. The numbers in this article are examples; actual sizing must be based on measured results for the hardware, model version, and engine version in use.
1. Estimate Capacity Before Deciding on Node Count
Before deployment, estimate three memory components: model weights, KV cache, and runtime overhead.
Model weight occupancy equals the parameter count multiplied by the number of bytes per parameter. For a model with 300B total parameters, FP16 requires about 600 GB, FP8 about 300 GB, and FP4 about 150 GB. These are theoretical values and do not account for quantization metadata or unquantized layers. An MoE model activates only a subset of experts during each inference, but all expert parameters must remain resident in memory or GPU memory. Therefore, estimation should use the total parameter count, not the activated parameter count.
KV cache occupancy depends on context length and concurrency. The KV cache bytes per token can be estimated as follows:
Per-token bytes = 2 × layers × KV heads × head_dim × bytes per element
For example, with 60 layers, 8 KV heads, head_dim of 128, and FP16 KV cache, each token occupies about 245,760 bytes, or roughly 240 KB. A 1-million-token context would require about 246 GB of KV cache, and this does not include concurrent requests. Therefore, whether million-token contexts are feasible depends on concurrency, KV precision, and available GPU memory. The model’s advertised maximum length is only an upper-bound reference.
In actual configuration, reserve GPU memory headroom for peak load. A common practice is to reserve 10% to 20%, then adjust based on measured peak concurrency.
2. Parallelism Strategy and Inter-Node Networking
Multi-node inference typically combines tensor parallelism (TP) and pipeline parallelism (PP). The two have different bandwidth requirements for inter-node communication. Tensor parallelism performs collective communication in every layer, so communication is frequent and sensitive to bandwidth and latency. Pipeline parallelism passes activations only at stage boundaries, so communication volume is smaller and tolerance for cross-node bandwidth is higher, but it introduces pipeline bubbles and increases single-request latency.
In practice, a common approach is to first use tensor parallelism within a node to fill local GPUs, then use pipeline parallelism across nodes. If tensor parallelism must span nodes, measure inter-node bandwidth and latency first. RDMA networks are a common choice, but the required bandwidth depends on model structure, batch size, and TP degree; there is no universal fixed threshold.
Multi-machine deployment with vLLM typically relies on process management components such as Ray. Before startup, confirm that model paths, driver versions, and CUDA versions are consistent across nodes, and that nodes can communicate over the network. For specific parameters, refer to the official documentation for the version in use.
3. Example Inference Engine Configuration
The following is an illustrative command. The model path, parallelism degrees, and context length must be replaced with actual values:
vllm serve <model-path> \--tensor-parallel-size <GPUs-per-node> \--pipeline-parallel-size <number-of-nodes> \--max-model-len <upper-limit-based-on-KV-capacity> \--gpu-memory-utilization 0.90 \--enable-prefix-caching
The meaning and configuration considerations for each parameter are as follows:
- Parallelism degrees: The product of TP and PP equals the total number of GPUs participating in inference. For example, with 4 nodes and 8 GPUs per node, you can set TP=8 and PP=4, but this must be validated against the actual network and model structure.
- Maximum context length: Derive this from the available KV space calculated using the formula in Section 1. Do not simply enter the model’s maximum supported length.
- GPU memory utilization: Setting it too high may cause out-of-memory errors at peak load; setting it too low wastes available capacity.
- Prefix caching: This helps with shared system prompts or multi-turn conversation scenarios. The benefit must be validated with real traffic.
Regarding quantization precision, FP8 usually has a mature inference path on hardware that supports the format. Lower precisions such as FP4 depend on hardware and engine support. Regardless of the precision used, compare accuracy before and after quantization using an evaluation set relevant to the business; do not rely only on a single metric such as perplexity.
When GPU memory is insufficient, some engines provide CPU memory offloading. Offloading places part of the weights in host memory, and each access goes through PCIe or an interconnect link, reducing throughput. Whether to enable it and how much to offload should be based on stress test results.
This article does not recommend using SSDs as paged memory extension during inference. Most general inference engines do not page weights or KV cache between SSD and memory. If implemented manually, latency jitter is difficult to control. SSDs are better suited for storing model files, logs, and checkpoints.
4. Performance Validation Method
Before stress testing, record the full test conditions; otherwise, the measured numbers cannot be compared or reproduced.
| Item | What to record |
|---|---|
| Hardware | Number of nodes, GPU model and memory per node, inter-node network bandwidth |
| Software | Inference engine and version, driver and CUDA versions, model version and quantization method |
| Load | Input length, output length, concurrency, request distribution |
| Metrics | TTFT, TPOT, total throughput (tokens/s), P95/P99 latency |
The four metrics are defined as follows:
- TTFT (time to first token): The time from sending a request to receiving the first output token. It is mainly affected by prefill length.
- TPOT (time per output token): Determines the speed of streaming output.
- Throughput: The number of output tokens per unit time. State whether it is measured per request or for the entire cluster.
- P95/P99 latency: Tail latency under high concurrency, reflecting queuing and jitter.
Test scenarios can be divided into four categories: short Q&A (TTFT), long document processing (prefill-dominated), multi-step reasoning (longer output), and multi-turn tool calling (KV management for long sessions). Increase concurrency in steps, for example from 1 to 4, 16, and 64, running each level steadily for several minutes and discarding warm-up data.
Prefix caching benefits should be compared with the feature enabled and disabled under the same load. Before the above records are complete, do not draw performance conclusions; treat all conclusions as pending validation.
5. Practical Checks Before Launch
- Measure bandwidth first: Use standard tools to measure inter-node bandwidth and latency, and record the results in the deployment documentation.
- Set rate limits: Set rate limits based on peak concurrency to prevent long-context requests from exhausting KV space.
- Establish monitoring: Collect metrics such as GPU utilization, GPU memory watermark, network throughput and retransmissions, and request queue time.
- Use canary releases: Validate output quality with a small amount of traffic first, and retain the previous service configuration so you can switch back quickly if problems occur.
- Sample outputs regularly: After changes to quantization methods or engine versions, resample and check output quality.
Conclusion
Multi-node local deployment of large models is an engineering task, and the results depend on capacity estimation, parallelism strategy, and measured data. Readers can first use the formulas in this article to estimate node count, then compare different options using a unified stress-test methodology. Without measured data, all performance conclusions should be treated as hypotheses pending validation.
