Deploying Large Models on a Four-Node GB10 Cluster: A Practical Guide
This guide walks through deploying a large language model on a four-node GB10 cluster for on-premises inference. It covers hardware and network preparation, model selection and precision considerations, multi-node startup with vLLM, Ray, and NCCL, KV cache estimation for long contexts, and how to run benchmark tests with a consistent methodology.
1. Use Case and Prerequisites
When enterprises must keep data on-premises, a single device often lacks the memory capacity to serve large models. Connecting multiple unified-memory devices into an inference cluster is a viable alternative. This article uses four GB10 nodes as an example and covers the main steps from network verification to bringing a service online. All hostnames, IPs, model directories, and parameters in this guide are placeholders—replace them with your actual values, and use model names and versions that can be verified in official repositories.
2. Hardware and Network Preparation
Each GB10 node is equipped with an ARM CPU, a Blackwell-architecture GPU, and 128GB of unified memory. Four nodes provide roughly 512GB of unified memory in total. Unified memory allows the CPU and GPU to access the same physical memory, reducing the overhead of copying data between them.
Nodes are connected in a star topology, with each node’s ConnectX-7 NIC plugged into the same switch. Before deployment, verify each of the following:
- Switch port speed, cable type, and NIC negotiated speed are consistent—record the actual link speed.
- MTU settings are identical on all nodes and the switch. Use
ip link showto check the MTU. If it is set to 9000, verify that jumbo frames pass through withping -M do -s 8972 <peer IP>. - If RoCE is enabled, configure PFC and ECN according to your switch vendor’s documentation. Settings vary by model, so no universal parameters are given here.
- Use
ibstatoribv_devinfoto confirm the RDMA device state is Active.
3. Model Selection and Precision
Once you have chosen a model, record three pieces of information: the model repository URL, the version number or commit hash, and the precision format of the weights. For mixed precision (for example, FP8 for attention layers and FP4 for feed-forward layers), follow the model’s official documentation for the exact layer breakdown. Before deployment, read the model’s quantization notes to determine which layers retain higher precision, then decide whether inference parameters need adjustment.
4. Multi-Node Startup
In a multi-node setup, vLLM uses Ray to schedule GPUs across nodes, while NCCL handles collective communication between nodes. Assume the four nodes are named gb10-01 through gb10-04, the head node’s management IP is 192.168.10.11, and all nodes have identical versions of vLLM, Ray, the CUDA driver, and NCCL installed.
Step 1: Start Ray on the head node gb10-01:
ray start --head --port=6379 --num-gpus=1
Step 2: Join the cluster from gb10-02 through gb10-04:
ray start --address='192.168.10.11:6379' --num-gpus=1
Step 3: On any node, confirm all four nodes are registered:
ray status
Step 4: Start the inference service on the head node. Set NCCL_IB_HCA to the RDMA NIC name (check it with ibdev2netdev), and NCCL_SOCKET_IFNAME to the management NIC name.
export NCCL_IB_DISABLE=0export NCCL_DEBUG=INFOexport NCCL_IB_HCA=<RDMA NIC name, e.g., mlx5_0>export NCCL_SOCKET_IFNAME=<management NIC name, e.g., eth0># Optional: dump the topology file to help troubleshoot communication pathsexport NCCL_TOPO_DUMP_FILE=/tmp/nccl_topo.xmlvllm serve /models/<model directory> \--served-model-name my-model \--tensor-parallel-size 4 \--pipeline-parallel-size 1 \--distributed-executor-backend ray \--max-model-len 131072 \--gpu-memory-utilization 0.90 \--enable-chunked-prefill \--host 0.0.0.0 --port 8000
Step 5: Verify the service is available:
curl http://192.168.10.11:8000/v1/modelscurl http://192.168.10.11:8000/v1/chat/completions \-H "Content-Type: application/json" \-d '{"model":"my-model","messages":[{"role":"user","content":"Introduce yourself in one sentence."}],"max_tokens":64}'
If NCCL logs show communication running over Socket instead of InfiniBand or RoCE, RDMA is not taking effect. In that case, check the NIC names, RoCE configuration, firewall rules, and MTU in that order.
5. Context Length and KV Cache Estimation
--max-model-len also determines the upper bound reserved for the KV cache. Setting it too high squeezes the memory available for model weights and other requests. The KV cache size for a single sequence can be estimated with the following formula:
KV cache bytes per token = 2 × number of layers × number of KV heads × head dimension × bytes per element
For an example model with 60 layers, 8 KV heads, head dimension 128, and FP8 KV cache (1 byte per element), each token requires roughly 120KB, and 131,072 tokens total about 16GB. This is only an estimate—the actual value depends on the model architecture. If the model uses compressed attention mechanisms such as MLA, the formula no longer applies; consult the model’s architecture documentation instead.
The conversion between token count and word count depends on the tokenizer. For Chinese text, each character typically maps to 1–1.5 tokens, so a 200,000-character document corresponds to roughly 200,000–300,000 tokens, exceeding the 131,072 in this example. Before processing long documents, count the actual token count with the target model’s tokenizer and make sure max-model-len is greater than the sum of input and output lengths.
6. Benchmark Methodology
Performance numbers are only comparable when the test conditions are documented. Every benchmark run should record:
- Concurrency model: fixed concurrency level or fixed request arrival rate.
- Input and output lengths: record the mean and distribution, e.g., 512 input tokens and 256 output tokens.
- Metrics: TTFT (time to first token) P50 and P99, output tokens per second, and request error rate.
- Environment: vLLM version, startup parameters, NCCL environment variables, and switch MTU.
vLLM includes a built-in benchmark command suitable for these scenarios. Parameter names change between versions, so refer to the output of vllm bench serve --help. Example:
vllm bench serve \--backend openai-chat \--model my-model \--base-url http://192.168.10.11:8000 \--endpoint /v1/chat/completions \--dataset-name random \--random-input-len 512 \--random-output-len 256 \--num-prompts 640 \--max-concurrency 32
It is recommended to record results in a table like the one below to make comparisons across configurations easier:
| Concurrency | Input/Output Length | TTFT P50 | TTFT P99 | Output Throughput (tok/s) | Error Rate |
|---|---|---|---|---|---|
| 8 | 512/256 | TBD | TBD | TBD | TBD |
| 32 | 512/256 | TBD | TBD | TBD | TBD |
| 128 | 512/256 | TBD | TBD | TBD | TBD |
