Deploying Large Models on a Unified Memory Cluster: Networking, Configuration, and Load Testing Guide

    A unified memory cluster combines the memory and compute of multiple nodes to run large MoE models that cannot fit on a single machine. This article walks through the full deployment workflow for a 4-node cluster: estimating memory requirements for weights and KV cache, validating RDMA networking, distributing model files, configuring mixed-precision inference, and running structured load tests. It also covers capacity planning, latency metrics such as TTFT and TPOT, and a practical checklist for production readiness.

    1. Why Large Models Need Clusters for Local Deployment

    Large MoE (Mixture of Experts) models have become increasingly common in recent years. During inference, these models activate only a subset of experts per token, but the full set of weights still has to stay resident in memory. Add the KV Cache overhead that comes with long contexts, and a single node’s memory and compute are often not enough. This is why enterprises often pool the memory and compute of multiple nodes into an inference cluster connected over a high-speed network when deploying models privately.

    The approach has costs, too. The more nodes you add, the more complex the networking, drivers, framework versions, and operations become. Before deployment, calculate memory capacity and network bandwidth first, then decide on the number of nodes.

    This article uses a 4-node cluster with a unified memory architecture as an example to cover networking, configuration, startup, and load testing. The hardware figures come from this example environment; readers should replace them with the actual parameters of their own hardware and chosen inference framework before applying these steps.

    2. Cluster Architecture and Selection Checklist

    2.1 How the Three Layers Work Together

    The cluster is organized into three layers:

    • Compute layer: Each node contains a CPU and a GPU sharing a single pool of unified memory. In this example there are 4 nodes with roughly 128GB each, for about 512GB of addressable memory in total.
    • Interconnect layer: Nodes are connected through high-speed switches for cross-node tensor parallelism and expert parallelism communication. When network bandwidth is insufficient, compute units sit idle waiting for data, and inference speed drops.
    • Management layer: Handles model distribution, service orchestration, API gateway, authentication and rate limiting, and monitoring and alerting. The management platform should show the status of every node so you don’t have to log into machines one by one to troubleshoot.

    2.2 Configuration Checklist

    The second column of the table below shows the example configuration, and the third column lists what to verify before deployment.

    Item Example Configuration What to Verify Before Deployment
    Compute nodes 4 unified memory architecture nodes Node model, firmware version, available memory per node
    Processors 80 ARM CPU cores in total Whether core count accounts for OS and management processes
    Memory About 512GB in total Proportion actually allocatable to the model
    Storage 8TB NVMe SSD in total Whether read bandwidth and free capacity can handle the model and offload data
    Network adapters Up to 200Gbps per node Actual negotiated rate and link status
    Switches 400G-class, RDMA networking Protocol (RoCEv2 or InfiniBand), port oversubscription ratio
    Inference precision Mixed FP8 and FP4 Whether target hardware and framework support it, and the accuracy impact
    Context window 1M Tokens Estimate the KV Cache cost and whether it’s usable at target concurrency
    Inference engine Not specified in the source Fill in framework name and version, and confirm support for tensor and expert parallelism

    2.3 How to Estimate Memory Capacity

    Looking only at total node memory won’t tell you whether deployment is feasible. Estimate weights and KV Cache separately first, then add system and runtime overhead.

    A rough formula for weight footprint:

    1. Weight footprint ≈ total parameter count × bytes per parameter

    FP8 uses 1 byte per parameter and FP4 uses 0.5 bytes. For example, a 400B-parameter model fully quantized to FP8 needs about 400GB for weights. Quantizing the expert layers to FP4 instead reduces this significantly. Actual usage also includes unquantized layers, index structures, and framework overhead, so treat post-loading measurements as authoritative.

    A rough formula for KV Cache:

    1. KV Cache ≈ 2 × layers × KV heads × head dimension × sequence length × bytes per element × concurrent requests

    This is the standard multi-head attention estimate. Models using compressed attention structures need to be calculated according to their actual architecture.

    A worked example: assume a model with 60 layers, 8 KV heads, and a head dimension of 128, with KV stored in FP16. A single 1M-token request requires a KV Cache of roughly 2 × 60 × 8 × 128 × 1,000,000 × 2 bytes, or about 246GB. Storing KV in FP8 brings it down to about 123GB. With weights at roughly 400GB, the remaining memory is not enough to hold even one FP16 1M-token request. So a 1M context should be understood as a per-request capability ceiling, not a concurrency capability.

    3. Deployment Steps

    3.1 Environment Preparation

    Drivers, container runtimes, and inference framework versions must be identical across all nodes. With mismatched versions, the typical symptom is that nodes start fine but hang or throw errors during cross-node communication.

    Example checks — output varies by machine:

    1. uname -m # Confirm all nodes have the same CPU architecture
    2. ulimit -l # Check the locked memory limit; RDMA usually requires a larger value

    3.2 Network Connectivity and Bandwidth Baseline

    Network validation should be completed before starting the inference service.

    1. Check NIC link status and rate. In InfiniBand or RoCE environments, use ibstat to view port status.
    2. Use the perftest tool suite to measure inter-node bandwidth and latency: ib_write_bw for bandwidth and ib_write_lat for latency.
    3. Check MTU, flow control, and congestion control settings against the switch documentation. RoCEv2 environments are the most sensitive to these parameters.
    1. # On the server node
    2. ib_write_bw -d <NIC device name> -F
    3. # On the client node
    4. ib_write_bw -d <NIC device name> -F <server IP>

    The baseline numbers you record are the reference for later troubleshooting. If one pair of nodes shows significantly lower bandwidth than others, check cables, ports, and switch ports first before adjusting inference parameters.

    3.3 Model Distribution and Verification

    • All nodes must use the same version of the model weights, and the checksum of the source files should be saved.
    • Before distribution, confirm each node has enough free local storage.
    • After distribution, compute hashes on each node and compare them against the source files.
    1. sha256sum <model directory>/<weight file> > checksum.txt

    3.4 Starting the Multi-Node Inference Service

    Startup commands vary by framework, so this article does not provide directly executable parameters. When deploying, fill in the following according to your framework’s documentation:

    • Tensor parallelism and expert parallelism sizes, which must match the available compute units — the exact mapping depends on the framework documentation;
    • Per-node memory utilization cap;
    • Maximum sequence length and maximum concurrency;
    • Prefix caching toggle;
    • Service listen address and port.

    Once the service is running, if the framework provides an OpenAI-compatible API, check the model list with:

    1. curl http://<gateway address>/v1/models

    Then send a short request with fixed input and compare the output against the baseline result to confirm there are no errors and the output is reasonable.

    3.5 Precision Configuration and Validation

    The example uses mixed FP8 and FP4 precision to reduce the weight footprint. Before enabling it, complete three tasks:

    1. Confirm the target hardware and inference framework support the chosen precision formats;
    2. Compare results against the original precision using a fixed evaluation set;
    3. Document the types of differences observed, such as factual errors, formatting errors, or shorter reasoning chains.

    The evaluation set should cover real business tasks. Generic benchmark scores are no substitute for business acceptance testing.

    3.6 KV Cache, Prefix Caching, and Offloading

    • KV Cache reservation: Calculate the requirement at target concurrency using the formula in Section 2.3, then set the limit.
    • Prefix caching: Effective for multi-turn conversations and fixed system prompts, with almost no benefit for random inputs. After enabling it, monitor the hit rate; if it stays low, disable it to free memory.
    • Layered offloading: Put lookup-type data on NVMe SSDs with asynchronous prefetch configured. Start with a small prefetch window and increase it gradually, watching for latency spikes during expert switching. A window that is too large consumes memory and bandwidth and can actually hurt performance.

    4. Load Testing Methodology

    4.1 Metric Definitions

    • Time to First Token (TTFT): Time from sending a request to receiving the first token. Interactive Q&A is most sensitive to this.
    • Time per Output Token (TPOT): Average interval between consecutive output tokens; determines whether streaming output feels smooth.
    • Total throughput: Number of tokens generated across all requests per unit of time.
    • Peak memory and network bandwidth: Used to identify single-node bottlenecks.

    Reports should include both P50 and P95 percentiles. Averages alone hide long-tail latency.

    4.2 Load Test Matrix

    The table below is a framework for designing load tests. Fill in the metrics to watch after the business side confirms thresholds.

    Scenario Input Length Output Length Concurrency Levels Metrics to Watch
    Everyday Q&A A few hundred tokens A few hundred tokens 1, 4, 16, 64 Whether TTFT P95 stays within business-acceptable range
    Document processing Tens of thousands to hundreds of thousands of tokens A few hundred tokens 1, 2, 4 How TTFT grows with input length
    Complex reasoning A few thousand tokens Thousands to tens of thousands of tokens 1, 4, 16 Whether TPOT stays stable during long outputs
    Coding and Agent Mixed lengths, including tool results Medium 4, 16, 64 Prefix cache hit rate and concurrency scalability

    4.3 What to Watch During Load Testing

    How to choose input and output lengths? Use a distribution that matches production. If real requests are mostly short inputs but you test with fixed long inputs, results will be way off. Testing only short inputs, on the other hand, overestimates long-document performance.

    How to ramp concurrency? Start at 1 and step up through 4, 16, 64, and so on. Hold each level long enough, record TTFT, TPOT, and throughput, and plot latency versus throughput. The knee of the curve — where throughput growth slows and latency rises sharply — is the basis for capacity planning.

    What to monitor during tests? Track memory usage, network bandwidth, temperature, and power on every node at the same time. If only one node’s metrics hit their limits first, there’s a single-node bottleneck — fix that node before pushing load further.

    What if throughput is far below expectations? Re-run the inter-node bandwidth test first to confirm the Section 3.2 baseline hasn’t changed, then check the model and service configuration.

    4.4 Capacity Headroom

    The source material recommends reserving at least 20% headroom above the knee of the curve. Treat that as a starting point. When traffic peaks fluctuate heavily or requests are bursty, the headroom should be larger. Calculate headroom based on the knee’s concurrency level, not the theoretical memory ceiling.

    5. How to Document Test Results

    The source material concludes that the cluster “ran all four scenarios smoothly” but lists no test model, concurrency levels, input/output lengths, or specific metrics. Readers cannot judge under what conditions that conclusion holds, so this article does not carry it over.

    After completing load tests in your own environment, record results using the table below for easier review and comparison.

    Item Description Result
    Model and version Name, parameter count, active experts, precision format To fill
    Framework and version Framework name, version, parallelism parameters To fill
    Input/output lengths Consistent with the load test matrix To fill
    Concurrency Concurrency levels tested To fill
    TTFT P50 / P95 In milliseconds To fill
    TPOT P50 / P95 In milliseconds To fill
    Total throughput In tokens/s To fill
    Peak memory Recorded per node To fill
    Network bandwidth Measured inter-node values To fill

    6. Risk Notes

    • Version mismatches: Different driver, framework, or weight versions across nodes can cause startup failures, communication hangs, or inconsistent outputs.
    • Accuracy loss: Low-precision formats like FP4 can affect inference quality. Validate with a business evaluation set — don’t just check that the service starts.
    • Compatibility: Supported precision formats, parallelism modes, and network protocols depend on hardware and framework versions, so re-validate before upgrades.
    • Data consistency: Model distribution, caching, and offloaded data can all become inconsistent. Verify checksums after distribution and re-run baselines after upgrades.
    • Cooling and power: Full-load operation across multiple nodes requires a separate assessment of cooling and power supply.
    • Licensing and compliance: Model weight usage licenses must be checked separately. Private deployment still requires compliance with the model’s license terms.

    7. Experience Checklist

    • Networking baseline: Complete RDMA bandwidth and latency tests before deployment, and save the results for later comparison.
    • Prefetch window: Start small and increase gradually, watching for latency spikes during expert switching.
    • Capacity headroom: Reserve headroom based on the knee’s concurrency level — 20% is a starting point, adjusted for business volatility.
    • Monitoring metrics: Continuously record per-node memory, network bandwidth, and temperature, along with TTFT and TPOT, and set alert thresholds.
    • Version management: Keep drivers, frameworks, and weight versions consistent across nodes, and re-run baselines after upgrades.

    8. Conclusion

    Multi-node unified memory clusters offer a viable path to locally deploying very large MoE models. When selecting a solution, answer three questions first: Is memory capacity sufficient? Is interconnect bandwidth fast enough? Is the operations platform easy enough to manage? Every answer should come from measured data, not vendor spec sheets or gut feeling. Once the networking baseline, capacity estimation, and business load tests are done, then decide on cluster size and service configuration — your private AI infrastructure will be more predictable and easier to scale later.