Local Inference on a 4-Node GB10 Cluster: Architecture, Parallelism, and Benchmarking
This article examines a practical setup for running very large MoE models locally using a four-node Grace Blackwell cluster with unified memory and 400G-class RDMA networking. It covers the three-layer deployment architecture, why tensor parallelism is preferred over pipeline parallelism in this configuration, a four-scenario benchmarking methodology with clear metric definitions, common bottlenecks and how to locate them, and a tuning checklist. The focus is on reusable engineering methods for long-context, data-on-premises inference rather than any specific product.
1. Why Local Large-Scale Inference Is Now Feasible
Over the past year, the capability frontier of open-source large models has kept expanding, and the Mixture-of-Experts (MoE) architecture has become the mainstream choice for models at very large parameter scales. The core idea of MoE is “large total parameter count, small per-token activation”: a model may hold hundreds of billions of parameters in total, yet each token is routed to only a few expert networks for computation. This has one important engineering consequence: compute demand and memory capacity demand are decoupled. The inference bottleneck is often not floating-point throughput, but whether the massive weights can stay resident in addressable memory and be fed to the compute units at sufficiently high bandwidth.
Enterprise requirements are shifting at the same time: data must stay inside the internal network, inference latency must be controllable, costs must be predictable, and offline operation must be possible. These demands make “putting a large model in your own data center” a viable option again. This article uses a distributed inference cluster as a sample: four high-density Grace Blackwell architecture compute nodes connected in a star topology through 400G-class high-speed switches. It discusses the architecture design, parallelism strategy, benchmarking methodology, and tuning experience for deploying ultra-long-context MoE models locally. The article does not point to any specific commercial product; it only covers reusable engineering methods.
2. Reference Hardware and Software Stack Baseline
A reproducible benchmark requires a clear baseline. The key specifications of the sample cluster are as follows (used to illustrate the order of magnitude, not as a purchasing recommendation):
- Compute nodes: 4 high-density Grace Blackwell-class SoCs, with a CPU portion of 4×20-core ARM, totaling 80 cores
- Memory: unified memory architecture, 512GB of LPDDR5X in total, with CPU and GPU sharing the same address space
- Theoretical compute: up to roughly 4 PFLOPS of sparse NVFP4 compute
- Local storage: 8TB of NVMe SSD in total
- Network: ConnectX-7-class NIC per node, up to 200Gbps per port, 400G-class on the switch side, supporting RoCE/RDMA
- Inference engine: a mainstream open-source high-throughput engine (PagedAttention-class)
- Precision: native FP8 and FP4 mixed precision
- Context window: on the order of 1M tokens
- Control plane: unified model repository, gateway, and quota management
The most notable point here is “unified memory.” In traditional multi-GPU servers, CPU memory and the memory of each accelerator card are isolated from one another, and moving weights across cards requires explicit copies. Unified memory turns 512GB into a single, continuously addressable pool, changing model partitioning from a “memory capacity constraint” into an “address-space orchestration problem.”
3. Deployment Architecture: Three Decoupled Layers
The recommended deployment architecture splits into three layers with clear responsibilities and controllable fault domains.
1. Compute layer (data plane)
The 4 nodes are deployed as peers with no central relay. The star-topology switching network guarantees single-hop communication between any two nodes, which is especially critical for tensor parallelism (TP): every forward pass of each TP layer requires an AllReduce, the communication frequency is extremely high, and additional hops directly amplify tail latency.
2. Storage layer (tiered offloading)
A tiered “memory + NVMe” strategy is used: the main body of weights is sharded per node and kept resident in unified memory, while sparse-access, very large lookup-type structures (such as large embedding or memory tables) are offloaded to local NVMe, trading page cache and prefetching for memory space. The rule of thumb for deciding whether offloading is worthwhile: if a structure has very small per-token access but very large total footprint, offloading yields the highest benefit.
3. Control layer (management plane)
Unified management of model versions, inference service orchestration, gateway routing, tenant quotas, and call auditing. The gateway handles OpenAI-compatible protocol conversion, rate limiting, priority queues, and canary releases, keeping business code from coupling to engine details.
Illustrative service orchestration logic (pseudocode, used to show the relationship between layering and parallelism):
# Logical illustration: TP across nodes, PP across layer segments, expert parallelism by routingengine_config = {"tensor_parallel_size": 4, # aligned with node count, AllReduce over RDMA"pipeline_parallel_size": 1, # prefer TP with large single-node memory to reduce bubbles"expert_parallel": "auto", # expert placement decided by routing distribution"kv_cache_dtype": "fp8", # significantly saves memory for long context"max_model_len": 1_000_000,"enable_chunked_prefill": True, # chunk long prompts to suppress first-token jitter"offload": {"target": "nvme", "paths": ["/data/engram"]},}
4. Parallelism Strategy: Why Tensor Parallelism Comes First
When single-node memory is large enough and inter-node links are high-bandwidth RDMA, the recommended order for choosing parallelism dimensions is:
- Prioritize TP = node count: TP has heavy communication but is latency-friendly, provided the network can carry it; 400G-class switching plus RoCE can push the AllReduce overhead share into an acceptable range.
- Use PP cautiously: pipeline parallelism introduces bubbles, raising first-token latency in interactive scenarios, and is better suited to offline batch processing.
- Let the engine auto-orchestrate expert parallelism: MoE expert load is naturally uneven, static partitioning easily creates hotspot nodes, and dynamic placement plus redundant replicas is more stable.
- KV Cache is the real cost center for long context: at 1M context, KV Cache can be several times the weight footprint, so low-precision KV and paged management are essential.
5. Benchmarking Methodology: Four Scenarios and Metric Definitions
“Benchmark scores” divorced from real scenarios have no selection value. It is recommended to design a benchmarking matrix around four types of real workloads:
- Everyday Q&A: short input, short output; focus on first-token latency (TTFT) and per-request end-to-end latency.
- Document processing: long input, short output (e.g., a 100K-token summary); focus on prefill throughput, TTFT tail latency, and peak memory.
- Complex tasks / Agents: multi-turn tool calls with both long inputs and outputs; focus on latency stability under concurrency and P99.
- AI coding: medium input, long output; focus on output throughput (tokens/s/user) and overall throughput (tokens/s).
Metric definitions must be consistent: concurrency, input/output length distribution, whether prefix caching is enabled, and whether the same prompt is reused. It is recommended to record TTFT at P50/P95/P99, output throughput, total throughput, memory and RAM watermarks, and NIC and NVMe read/write bandwidth, forming a comparable baseline table.
Three common classes of bottlenecks during benchmarking and how to locate them:
| Symptom | Possible bottleneck | Diagnosis method |
|---|---|---|
| TTFT spikes and jitters with long prompts | prefill compute and scheduling | enable chunked prefill, observe GPU utilization curves |
| Throughput does not rise as concurrency increases | insufficient KV Cache triggering swap-out | monitor KV usage and page-swap counts |
| Latency rises after multi-node scaling | improper network or parallelism strategy | check RDMA bandwidth utilization and AllReduce share |
6. Tuning Checklist
- Precision: prioritize native FP8/FP4 mixed precision, keeping higher precision only in numerically sensitive layers, and avoid full high-precision that leads to memory overflow.
- Context governance: chunk and apply sliding windows to ultra-long requests, and set a reasonable
max_tokenson the business side to prevent a single request from crowding out the KV pool. - Prefix caching: enable cache reuse for fixed prefixes such as system prompts and code-base context, which can significantly reduce TTFT.
- Offloading strategy: place lookup-type structures on NVMe, and ensure SSD random-read performance and endurance headroom.
- Batching: continuous batching beats static batching, with clear gains when long and short requests are mixed.
- Observability: instrument uniformly at the gateway, split metrics by tenant/model/scenario, and avoid averages hiding the tail.
7. Selection Conclusion
For enterprise scenarios that require a closed-loop internal network, ultra-long context, and moderate concurrency, a 4-node unified-memory cluster is a fairly balanced starting point in both cost-effectiveness and engineering complexity: 512GB of unified memory lets very large MoE weights stay resident, 400G-class RDMA networking keeps cross-node tensor parallelism from becoming a bottleneck, and NVMe tiered offloading shifts memory pressure onto lower-cost media. The real difficulty lies not in stacking hardware, but in the engineering of parallelism strategy, KV Cache governance, and benchmarking definitions. Get these three things solid, and local inference can move from “it runs” to “stably deliverable.”
