Deploying an Ultra-Large MoE Model on a Two-Node Accelerator Cluster: A Practical Guide

    This guide describes how to deploy a multimodal MoE model with about 2.8T total parameters on a two-node accelerator cluster. It covers capacity planning, weight and image preparation, cross-node parallelism, staged startup, and monitoring and troubleshooting. The guide focuses on making the deployment reproducible and manageable in production.

    1. Scenario and Goals: Breaking a Super-Large Model into Practical Engineering Problems

    This article covers a typical large-scale inference scenario. The model has about 2.8T total parameters and activates roughly 104B parameters per token. It uses a natively multimodal MoE architecture and supports context lengths up to the million-token level. To reduce memory and bandwidth pressure, the model uses a 4-bit weight and 8-bit activation quantization scheme. Even after quantization, the weights total around 1.5 TB. A single machine with multiple accelerator cards cannot hold the full weights and long-context cache on its own, so the deployment uses a two-node cluster for distributed inference.

    The core challenge goes beyond getting the service running. The deployment has to balance capacity, communication, stability, and operations. Specific questions include how to place weight shards across machines, how to control the communication overhead of cross-node parallelism, how to allocate cache for long-context workloads, whether multimodal input preprocessing becomes a bottleneck, whether the container image and runtime match, and how to observe, scale, and roll back the service after launch. This article follows an engineering approach and provides a reusable deployment method.

    2. Capacity and Topology Planning: Calculate Memory, Host Memory, and Network Budgets First

    Build a capacity model before attempting to start the service. The roughly 1.5 TB of weights must be split across multiple accelerator cards according to the parallelism strategy. Besides its weight shard, each card needs space for activations, communication buffers, long-context cache, and runtime overhead. Long context is easy to underestimate. The longer the context, the faster the cache grows. Set a maximum concurrency and a maximum context budget so that overlapping requests cannot exhaust device memory.

    For topology, keep high-bandwidth, low-latency communication within a single machine where possible. Limit cross-node communication to the tensor or pipeline parallelism that is necessary. With cross-node tensor parallelism, evaluate network bandwidth, retransmission rate, and synchronization overhead. With pipeline parallelism, focus on micro-batch scheduling and pipeline bubbles. With expert parallelism, check whether the load across experts stays balanced. Practical deployments usually combine several parallelism strategies rather than relying on one. Before moving to deployment, prepare three tables: a weight shard map, a cache budget table, and a network bandwidth table.

    3. Weight and Image Preparation: Prioritize Integrity and Reproducibility

    Quantized weights usually consist of multiple shard files plus metadata. Before deployment, verify the shard count, file sizes, checksums, and version notes. This ensures that every node loads the same version. In offline environments, place the weights in object storage or shared storage first. Then prefetch them to the local high-speed disk on each node. This avoids bandwidth contention caused by concentrated downloads at startup. The container image must match the quantization format, runtime version, and driver environment. Pin the version numbers so that a setup that works today will still work tomorrow.

    For weight distribution and operations, you can use general-purpose capabilities from Baidu AI Cloud, such as object storage, the container platform, log service, and monitoring and alerting. Together, these can form an offline distribution pipeline, centralized logging, and an alerting loop. Specific APIs and quotas depend on your environment. Regardless of infrastructure, keep records of weight checksums and image versions so the deployment can be reproduced.

    The following schematic shows configuration relationships only. It does not represent actual interface fields.

    1. Deployment units:
    2. Node A: multiple accelerator cards
    3. Node B: multiple accelerator cards
    4. Model:
    5. Weight path: local high-speed disk/model version directory
    6. Quantization format: 4-bit weights + 8-bit activations
    7. Context budget: set an upper limit based on business needs
    8. Parallelism:
    9. Within a node: prioritize high-bandwidth parallelism
    10. Across nodes: choose tensor or pipeline parallelism based on load testing
    11. Experts: monitor load balance
    12. Service:
    13. Health check: enabled
    14. Readiness check: enabled
    15. Rate limiting and timeouts: enabled
    16. Log correlation: request-level IDs

    4. Cross-Node Parallelism and Serving: Keep Communication Overhead Under Control

    Cross-node parallelism is the key to a two-node deployment. Tensor parallelism reduces the weight pressure on each card, but it synchronizes frequently and is sensitive to network performance. Pipeline parallelism reduces the synchronization frequency but requires more complex scheduling. Expert parallelism suits the MoE structure but can create expert hotspots. In practice, compare different combinations with small-traffic load tests. Observe communication time, memory usage, and request queuing before choosing the final parameters. For long-context serving, enable paged caching, cache reclamation, and a maximum concurrency limit so that a single long request cannot occupy all resources.

    At the serving layer, provide health checks, readiness checks, timeout control, rate limiting, queue management, and streaming output. The entry layer should enforce size limits and format validation for multimodal requests and isolate their preprocessing. This prevents image or video preprocessing from overwhelming the main inference process. In production, separate the inference service from the preprocessing service so that each can be scaled and monitored on its own.

    5. Startup and Validation: Ramp Up in Stages Instead of Taking One Big Risk

    Start the service in stages. First, load the weights on a single machine and verify shard integrity. Next, start cross-node communication and watch for handshakes, timeouts, and retransmissions. Then send small requests with short context to confirm the output. After that, gradually add long-context requests, multimodal inputs, and concurrent requests. Validation covers weight loading consistency, output stability, memory and host memory usage, network throughput and retransmissions, request queue time, error rate, and anomalies in the logs.

    When load testing, do not look only at average throughput. Also measure tail latency and failure rate. Long-context requests often show a pronounced long tail, so report them separately. Measure preprocessing time, inference time, and transfer time for multimodal requests separately. Record all validation results as a baseline. When you upgrade the image or adjust parallelism parameters later, compare the new results against this baseline.

    6. Monitoring, Troubleshooting, and Tuning: Drive Improvements with a Metrics Loop

    After launch, monitor accelerator memory, host memory, network throughput and retransmissions, request queue length, time to first token, end-to-end latency, error rate, and cache hits and evictions. Attach a request-level ID to logs so that you can trace a request from entry logs to inference logs. Common problems have clear causes. Out-of-memory errors usually come from excessive concurrency or an oversized cache budget. Cross-node timeouts usually come from network jitter or mismatched parallelism parameters. Slow startup usually comes from concentrated weight downloads or slow local disk reads. Jitter in multimodal requests usually comes from preprocessing bottlenecks.

    Tune in the order of stability first, then performance. First, lock the version and configuration so that you can roll back. Next, adjust batch size, maximum concurrency, cache budget, and parallelism combinations. Finally, run canary releases and failure drills. In production, keep alerts on capacity usage, rolling upgrades, and a fast rollback plan. Also restrict access to weights, image sources, and network boundaries. With staged deployment, metric monitoring, and load test baselines, deploying an ultra-large MoE model on a two-node cluster can move from a one-time experiment to a reproducible, operable engineering practice.