Deploying MoE Large Models Across Two Nodes: Partitioning Strategies and Go-Live Checklist

    This article details the deployment of a native multimodal Mixture of Experts (MoE) large model across two AI accelerator servers. It covers environment topology, weight distribution, parallel partitioning strategies (TP16 and PP2), functional verification, and stress testing. It also provides a comprehensive go-live checklist and rollback procedures to ensure a stable production deployment.

    1. Conclusion First

    Whether a two-node deployment can go live depends on three factors: the stability of the parameter network between nodes, the integrity and version consistency of the 1.47 TB weights, and whether the parallel partitioning matches the VRAM budget. If any of these fail, the instance may fail to start or encounter errors during runtime. The following sections expand on this in deployment order, with a checkable checklist at the end.

    2. Environment and Topology

    The test subject is a native multimodal MoE model with 2.8T total parameters, approximately 104B activated parameters, and a context window of 1M tokens. The model uses a quantization scheme of 4-bit weights and 8-bit activations, with total weights of about 1.47 TB distributed across 346 shard files.

    The hardware consists of two AI accelerator servers, each with 16 compute dies, with each die having 64 GiB of VRAM. This totals 32 dies and 2048 GiB of VRAM.

    Terminology: A “die” is a single compute bare chip and the smallest unit for parallel partitioning. “TP16” refers to tensor parallelism, splitting the computation of the same layer across 16 dies within one server. “PP2” refers to pipeline parallelism, dividing the model layers into two segments placed on the two servers respectively. “world size” is the total number of participating dies, which is 32 in this case.

    Topology:

    1. Node A (16 dies, TP16) <--- Parameter Network ---> Node B (16 dies, TP16)
    2. Pipeline stage 1: First half of layers Pipeline stage 2: Second half of layers

    Before deployment, record the following values and save them in the deployment records. They determine whether the conclusions in this article can be reproduced in your environment:

    Item Content to Record Recording Method
    Accelerator model and driver version Model, driver number Obtain from device info tool and driver package
    Intra-node interconnect bandwidth and latency Unidirectional bandwidth, small packet latency Measured using vendor-provided point-to-point bandwidth test tool, median of multiple results
    Parameter network bandwidth and latency Cross-node unidirectional bandwidth, small packet latency Same as above, test both directions separately
    Inference framework image Digest Pin version by digest rather than tag
    Weight version Version number, manifest file hash Calculate SHA-256 of manifest file and record

    Do not fill in “typical values” without actual measurements. Writing “untested” is safer than entering estimated values.

    3. Pre-deployment Preparation

    3.1 Node Access

    Each server is integrated by running an installation command generated by the management console. The installed program is a static binary file that actively establishes outbound connections to the management end, requiring no additional inbound ports on the node. Control, monitoring, logging, and inference traffic can share the same tunnel, reducing firewall configuration.

    After the node goes online, confirm the following three items:

    • The number of accelerators matches hardware specs (16 per server in this case).
    • Node network interfaces and parameter network interfaces are complete, and link status is normal.
    • Local storage capacity is sufficient for the full weights, with temporary space reserved for decompression and verification.

    3.2 Storage Capacity

    The weights themselves are about 1.47 TB. During distribution, the receiving end typically retains both the compressed package and the decompressed files, requiring additional temporary space. Estimate using the following formula:

    Required space = Total weights × 2 + Reserved logs and cache (recommended no less than 50 GB)

    Using this formula, each server needs at least about 3 TB of available space. If disk usage exceeds 80%, pause distribution and clean up temporary files first. A full disk will cause verification failure or interruption during the loading phase.

    4. Weight Distribution and Verification

    4.1 Distribution Method

    There are 346 shard files for the weights. Distribution transmits per shard, verifying each immediately upon completion rather than waiting for all transmissions to finish. This approach catches issues early and facilitates resumable transfers.

    Before distribution, generate a manifest file containing the filename, byte count, and SHA-256 value for each shard. The manifest is provided by the weight publisher or generated from source files in a trusted environment. The receiving end verifies the manifest hash before distribution begins to ensure the manifest itself hasn’t been tampered with.

    4.2 Verification Steps

    1. Verify the shard count is exactly 346; do not proceed if any are missing.
    2. Check that the byte count of each shard matches the manifest.
    3. Calculate the SHA-256 of each shard and compare it one by one with the manifest.
    4. Verify the total byte count of all shards is close to 1.47 TB. This step helps spot missing small files.
    5. After both servers complete verification, record the results and save the verification logs.

    If any shard fails verification, only re-transmit that specific shard, not the entire weights. If it still fails after retransmission, check the source files and network links first; do not directly modify the manifest.

    4.3 Resumable Transfer and Retry

    After a distribution interruption, shards that have passed verification do not need to be retransmitted. Resumption only processes incomplete or failed shards. The retry limit for a single shard is recommended to be within 3 times; beyond that, escalate to manual processing. Excessive retries usually indicate severe network jitter or source storage anomalies.

    5. Basis for Choosing TP16 and PP2

    5.1 VRAM Budget

    First, calculate weight usage. 1.47 TB is approximately 1369 GiB. If weights are evenly split across 32 dies, each die bears about 42.8 GiB, leaving roughly 21 GiB for KV cache, activations, communication buffers, and framework overhead.

    This is an ideal value. Some parameters cannot be split, such as embeddings, normalization layers, and routing gate networks, which retain full copies on each die. Actual weight usage per die will be higher than 42.8 GiB. Before deployment, read the actual VRAM usage of each die to determine the available space for the KV cache.

    The KV cache size depends on context length, concurrency, and the model’s attention structure. How much VRAM a 1M token context window occupies should be calculated based on the model configuration file, not estimated from experience. If the KV cache cannot fit when calculated at maximum context length, either reduce the maximum length per request or decrease concurrency.

    5.2 Communication Overhead

    Tensor parallelism requires collective communication at every layer. The communication frequency is high, and the data volume per call correlates with the hidden dimension. Restricting the TP group within a single server ensures this high-frequency communication uses the intra-node high-speed interconnect, bypassing the parameter network.

    Pipeline parallelism only passes activations at the boundary between segments. The communication frequency per pipeline stage is low, but the data volume per call is larger. Moreover, the next stage must wait for the previous one to finish computing, creating idle time known as pipeline bubbles.

    Therefore, in this case, TP is placed intra-node and PP is placed inter-node. This assignment is based on communication characteristics, assuming intra-node interconnect bandwidth is significantly higher than the parameter network. If the gap is minimal, this assumption is invalid and requires re-evaluation.

    5.3 Alternative Solutions Comparison

    Solution Tensor Parallel Group Size Pipeline Stages Main Pros Main Cons Unsuitable Conditions
    TP16 + PP2 (Used here) 16 2 Few cross-node boundaries, simple structure Single TP group is large, intra-group communication demands high interconnect Intra-node interconnect bandwidth lower than parameter network
    TP8 + PP4 8 4 Smaller per-group communication scale Boundaries increase to 3, more bubbles, TP groups must avoid crossing nodes Framework lacks cross-stage scheduling, or network latency is too high
    TP32 (Single group across two nodes) 32 1 No pipeline bubbles Collective communication for all layers crosses nodes, max pressure on parameter network Generally not recommended; evaluate only if framework mandates and parameter network tested to support it

    Before selecting a solution, conduct real-world tests among framework-supported configurations. The pros and cons in the table are structural judgments; actual performance must be measured. If the framework restricts certain partitioning methods, defer to the framework documentation.

    6. Functional Verification and Stress Testing

    6.1 Verification Sequence

    Verify in the following order; do not proceed to the next step if the previous one fails:

    1. Instance startup: Both stages complete loading without VRAM shortage or device initialization errors.
    2. Single-request inference: Using fixed input and fixed random seed, output should be reproducible.
    3. Long context: Gradually increase input length from short to long until the framework’s configured limit. Record VRAM usage and Time To First Token (TTFT) at each level.
    4. MoE routing check: Count hit rates for each expert. If a few experts handle most requests, it indicates routing or load balancing issues.
    5. Concurrency stress test: Increase pressure gradually from low concurrency, observing throughput, latency, and error rate.
    6. Stability observation: Run continuously under target load, observing whether VRAM, temperature, logs, and error counts grow over time.

    6.2 Key Metrics

    Metric Description Judgment Method
    TTFT (Time To First Token) From request sent to first output token returned Reference P95 value of same-config baseline; investigate if exceeds baseline by 1.2x
    Generation Speed Output tokens per second Compare with single-request baseline; investigate if drops by more than 20%
    Error Rate Proportion of failed requests to total requests Should be below 0.5% during stress and stability phases; stop go-live if exceeded
    Communication Timeout Count Count of intra-node or cross-node communication timeouts Should be zero; stop stress test and check logs if appeared
    VRAM Usage per Die Used and peak VRAM for each die Peak should not exceed 85% of 64 GiB, leaving margin for fluctuation

    The above thresholds are initial recommendations. Adjust them based on business requirements after measuring the baseline in your environment; do not copy them directly.

    6.3 Log Health Check

    Before go-live, check logs on both servers to confirm:

    • No weight loading failures, missing shards, or verification inconsistencies.
    • No device errors, driver resets, or VRAM allocation failures.
    • Communication-related warnings do not increase during stable operation.
    • Heartbeats between management end and both nodes are normal without intermittent disconnects.

    Record keywords appearing in logs. For troubleshooting, first find the timestamp of the first occurrence by keyword, then compare it with requests and resource metrics from the same period.

    7. Go-Live Checklist

    The following table is for item-by-item confirmation before go-live. Check the result column upon completion; items that do not pass cannot proceed to the next step.

    No. Check Item Pass Criteria Responsible Role Result
    1 Node and accelerator count Two nodes, 16 dies each Deployment Lead □
    2 Parameter network connectivity Bidirectional reachable, bandwidth and latency recorded Network Lead □
    3 Storage capacity Meets formula in 3.2, usage below 80% Operations □
    4 Weight manifest hash Matches value provided by publisher Deployment Lead □
    5 Weight shard verification All 346 shards pass SHA-256 Deployment Lead □
    6 Image version Pinned version using digest Platform Lead □
    7 Parallel config TP16, PP2, world size 32, matches records Algorithm Lead □
    8 Instance startup Both stages loaded, no device errors Deployment Lead □
    9 Single-request output Reproducible with fixed seed Algorithm Lead □
    10 Long context Reaches framework limit, VRAM within threshold Algorithm Lead □
    11 MoE routing distribution No obvious expert hotspots Algorithm Lead □
    12 Concurrency stress test Error rate below 0.5%, latency within baseline Test Lead □
    13 Stability observation No sustained VRAM or error count growth during continuous run Operations □
    14 Log health check No load failures, device errors, or persistent communication warnings Operations □
    15 Rollback path Previous available version and traffic switch steps confirmed Platform Lead □

    Fill in responsible roles according to team division. One person may be responsible for multiple items, but each item needs a clear owner.

    8. Rollback and Failure Handling

    8.1 Rollback Conditions

    Stop traffic ramp-up and roll back to the previous available version if any of the following occurs:

    • Error rate exceeds 0.5% and persists for more than 5 minutes.
    • Communication timeouts or device errors occur that cannot be quickly located.
    • VRAM peak exceeds the set threshold or shows continuous growth.
    • Weight verification fails and still fails after retransmission.

    8.2 Rollback Steps

    1. Reduce the traffic weight of the new instance to zero at the gateway and confirm no new requests enter.
    2. Verify that the instance of the previous available version is still running and passing health checks.
    3. Switch traffic back to the previous version and observe recovery of error rate and latency.
    4. Preserve logs and on-site status of the failed instance for post-mortem analysis. Do not delete directly before analysis.

    Do not delete the new version’s weight files before rolling back, nor overwrite the previous version’s directory. Keep files of both versions separate for quick switching.

    8.3 Common Failures

    Phenomenon Possible Cause Troubleshooting Direction
    Shard count less than 346 Distribution interrupted or manifest incomplete Verify filenames one by one against manifest
    Shard SHA-256 mismatch Transmission error or source file anomaly Retransmit only that shard; if still fails, verify source
    VRAM insufficient at instance startup Uneven weight partitioning, too many retained copies, or high concurrency Verify per-die usage, reduce max context or concurrency
    Communication timeout Parameter network jitter, inter-node link failure, inconsistent configs on both ends Check link error counts and configs on both ends, compare with baseline bandwidth
    Uneven load across PP stages Unreasonable layer partitioning boundary, or a stage bears extra computation Compare time and VRAM of both stages, check layer partitioning config
    Certain experts under long-term high load Skewed routing distribution, concentrated request content Count expert hits, observe if correlated with input types
    Disk full Decompression or verification temp files not cleaned Clean temp files, re-estimate space per 3.2

    9. Information Required for Reproduction

    Before reproducing the conclusions in this article, please record at least the following information: accelerator model and driver version, measured intra-node and cross-node bandwidth and latency, inference framework image digest, weight version and manifest file hash, actual VRAM usage per die, and baseline values for all stress tests. Without these records, the thresholds and conclusions herein can only serve as a starting point and cannot be directly used to judge go-live results.