Local Deployment of Large Models on a Four-Node Cluster: Architecture and Benchmarking

    This article presents a practical methodology for deploying large models locally on a four-node compute cluster with high-speed interconnect. It covers the reference architecture, layered storage and parallel strategies for large MoE models, benchmark metric definitions and test methods, real-world performance patterns, tuning priorities, and a selection checklist for infrastructure and inference engines.

    1. Why Local LLM Deployment Needs a Cluster-Based Approach

    As model parameter counts and context windows grow at the same time, single-node local inference is hitting physical limits: insufficient VRAM, memory bandwidth bottlenecks, KV cache expansion from long contexts, and fluctuating compute demand during inference. Under constraints such as data compliance, predictable latency, and long-term operating cost, enterprises increasingly want to bring inference in-house. But “local” does not mean “single machine.” Once models move into the large-scale Mixture-of-Experts (MoE) stage, a single machine can rarely satisfy weight residency, cache space, and concurrency requirements at the same time, which makes multi-node coordination a necessity rather than an option.

    This article uses a common cluster form — four compute nodes connected through high-speed switching — as a sample, and abstracts a reusable methodology for local distributed inference across four areas: deployment architecture, model implementation, performance benchmarking, and actual runtime behavior.

    2. Reference Deployment Architecture: Converged Resource Pooling

    2.1 Hardware Composition and Resource Profile

    The reference cluster consists of four compute nodes that fuse ARM CPUs and GPUs. Each node pairs a multi-core ARM CPU with a newer-generation GPU architecture, and nodes are interconnected through 400G-class high-speed switches with RDMA. The overall resource profile is as follows:

    • Compute: four multi-core ARM CPUs, roughly 80 cores in total, handling data preprocessing, tokenization, scheduling, and pre/post-processing;
    • VRAM / unified memory: roughly 512GB of LPDDR5X in total, serving as the main carrier for model weights and runtime cache;
    • Storage: roughly 8TB of NVMe SSD in total, holding model files, lookup data, and logs;
    • Network: up to 200Gbps-class interfaces per node, 400G-class switching at the cluster level, with support for low-latency RDMA communication;
    • Precision and compute: FP8/FP4 mixed precision support, with theoretical peak sparse compute reaching the PFLOPS level.

    Note that these figures represent the general capability range for this class of hardware. Actual usable performance depends on model structure, parallelism strategy, and request characteristics.

    2.2 Software Stack Layers

    It is advisable to split the software stack into four layers to avoid coupling model serving with application logic:

    1. Resource layer: the container platform and device plugins handle declarative allocation of compute, memory, and storage;
    2. Serving layer: mainstream open-source inference engines (for example, engines supporting PagedAttention and continuous batching) expose an OpenAI-compatible API;
    3. Gateway layer: an AI gateway handles unified authentication, rate limiting, routing, and canary rollout across models;
    4. Application layer: knowledge bases, document processing, intelligent coding, and agent orchestration.

    The benefit of this layering is that model upgrades only touch the serving layer, while business scaling only touches the gateway and application layers, so the two do not interfere with each other.

    3. Model Implementation: Layered Storage and Parallel Partitioning for Large MoE Models

    3.1 Tiered Weight Placement

    The weights of a large MoE model far exceed the memory of a single node, which calls for a tiered strategy: hot data stays resident in memory while cold data is pushed down to SSD. Distribute the frequently accessed attention and shared expert weights across the unified memory of each node, and offload sparse lookup data to local NVMe, freeing memory for KV cache and batch concurrency. Three engineering points deserve attention: first, align weight shards with node topology to cut unnecessary cross-node traffic; second, reserve enough I/O bandwidth on the SSD offload path so it does not become a new bottleneck; third, cache hit rate must be observable, otherwise capacity planning will be inaccurate.

    3.2 Choosing a Parallelism Strategy

    The common combination is tensor parallelism (TP) to split matrices within a layer, expert parallelism (EP) to distribute experts, and pipeline parallelism (PP) to split layers across nodes. Intra-node interconnect bandwidth is high and suits TP; across nodes, prefer EP and PP to reduce sensitivity to bandwidth. A simplified startup configuration is shown below (parameters are illustrative and must be adjusted for the actual environment):

    1. # Illustrative: startup parameters for 4-node distributed inference
    2. python -m vllm.entrypoints.openai.api_server \
    3. --model /models/large-moe \
    4. --tensor-parallel-size 2 \
    5. --pipeline-parallel-size 2 \
    6. --enable-expert-parallel \
    7. --kv-cache-dtype fp8 \
    8. --max-model-len 262144 \
    9. --gpu-memory-utilization 0.90

    3.3 Long Context and Cache Management

    Million-token context is not a free lunch: the KV cache grows linearly with length. Techniques such as cache quantization, chunked prefill, and prefix caching can bring the cost of long-document scenarios into an acceptable range. For multi-turn question answering workloads, prefix reuse is often more effective than simply adding capacity.

    4. Performance Benchmarking: Metric Definitions and Test Methods

    4.1 Metric Definitions

    • Time to first token (TTFT): determines the interactive feel and is most affected by prefill length and in-batch contention;
    • Time per output token (TPOT): determines the smoothness of streaming output;
    • Throughput (tokens/s): split into input throughput and output throughput, which should be reported separately;
    • Concurrency and queueing latency: focus on P95/P99 rather than averages alone;
    • Resource utilization: memory, VRAM, network, and SSD I/O should be sampled together.

    4.2 Scenario-Based Test Cases

    1. Everyday Q&A: short input and short output, focused on TTFT and concurrency capacity;
    2. Document processing: long input and short output, focused on prefill throughput and caching strategy;
    3. Complex tasks: multi-turn tool calls, focused on pipeline stability and gateway routing;
    4. Intelligent coding / agents: long context plus multi-step reasoning, focused on P99 latency and error recovery.

    4.3 Benchmark Pseudocode

    1. # Illustrative: concurrent benchmark loop
    2. for concurrency in [1, 8, 32, 64]:
    3. results = run_benchmark(
    4. prompt_set="mixed",
    5. concurrency=concurrency,
    6. input_len=4096,
    7. output_len=512,
    8. metrics=["ttft", "tpot", "throughput", "p99"]
    9. )
    10. report(concurrency, results)

    When testing, fix the random seed and the prompt set to avoid results that look good on paper but do not hold up in production.

    5. Actual Runtime Behavior and Tuning Priorities

    On a general-purpose cluster form, testing typically shows three patterns. First, for short requests, throughput is dominated by scheduling and batching efficiency, so raising concurrency pays off more than speeding up individual requests. Second, for long documents, the bottleneck shifts forward to prefill and I/O, so chunking and caching should be optimized first. Third, multi-step agent tasks are more sensitive to P99 and failed retries, so rate limiting and circuit breaking at the gateway layer are indispensable.

    Tuning suggestions, ordered by payoff: first adjust parallel partitioning and topology alignment, then cache quantization and memory utilization, and finally the batching window and timeout policy. For capacity planning, use “maximum concurrency at the target P95 latency” as the acceptance criterion rather than peak compute.

    6. Selection Checklist

    • Whether memory and bandwidth match the scale of model weights and cache;
    • Whether RDMA and topology-aware scheduling are supported;
    • Whether the inference engine supports expert parallelism, prefix reuse, and cache quantization;
    • Whether unified gateway, monitoring and alerting, and log auditing capabilities are available;
    • Whether model canary rollout and multi-version coexistence are supported.

    7. Conclusion

    Deploying large models locally on a four-node cluster is essentially trading resource pooling, tiered storage, parallel partitioning, and gateway governance for controllable latency and compliance. When selecting infrastructure, enterprises should return to the business metrics themselves and let scenario-based benchmark data drive decisions, rather than chasing a single hardware specification.