Deploying Trillion-Parameter MoE Models on Dual-Node Ascend Clusters: A Practical Guide

    This guide walks through deploying a trillion-parameter MoE model across two Ascend nodes (16 cards total). It covers static memory budgeting for weights, KV cache, and temporary buffers; combining tensor, pipeline, and expert parallelism; keeping runtime environments consistent across nodes; key startup parameters; load testing and observability; and a troubleshooting table for common failures. The goal is a repeatable path from zero to a usable inference service within days.

    1. Why Ultra-Large-Scale MoE Is Harder to Deploy on Domestic Hardware

    Native multimodal Mixture-of-Experts (MoE) architectures are pushing inference deployment complexity to unprecedented levels. Take a model with roughly 2.8T total parameters, about 104B activated per token, and a context length of up to 1M. Its scale shows up in three dimensions at once: weight footprint, activation sparsity, and KV cache growth from long contexts.

    Scaling a traditional dense model means adding cards. Scaling MoE means adding experts. This creates a key engineering reality: most parameters do not participate in any single forward pass, yet they must stay resident in memory, ready for the router to hit them. Memory capacity becomes the first constraint, with compute taking a back seat.

    When deploying on domestic accelerators (such as the Ascend 910C, a card with large, high-bandwidth memory), you also need to account for operator coverage, communication library maturity, and quantization kernel support. A dual-node, 16-card topology is a common starting point for this class of model; a single 8-card node often cannot hold the full quantized weights plus the KV cache.

    2. Four Budgets to Calculate Before Deployment

    Before starting the service, do a static budget first, or you will likely fail during weight loading.

    1. Weight budget. W4A8 is the mainstream quantization scheme for trillion-scale MoE in production: 4-bit weights, 8-bit activations. Compared with BF16, the compression ratio is close to 4x, putting 2.8T parameters in the 1.4–1.5TB range. This number sets the minimum hardware scale: dual-node, 16 cards at roughly 64GB per card, for a theoretical capacity of about 1TB to 1.5TB. You will need host memory for weight staging and partial offloading.

    2. KV cache budget. A 1M context is a double-edged sword. Even with grouped-query attention and paged caching, long sequences can consume tens of GB of KV cache. Estimate an upper bound using “max concurrency × average sequence length” and reserve 15%–20% headroom.

    3. Activations and temporary buffers. MoE all-to-all communication buffers and quantization/dequantization intermediate tensors are often overlooked; in practice they can take more than 10% of per-card memory.

    4. Host memory and storage bandwidth. Loading 1.4TB of weights from object storage or a parallel file system can take tens of minutes for a cold start if bandwidth is insufficient. Pre-stage weights to local NVMe and read them in parallel with multiple processes.

    Illustrative budget check:

    1. weight_bytes = 1.47 * 1024 ** 4 # quantized weights
    2. kv_per_token = num_layers * 2 * kv_heads * head_dim * 2
    3. kv_cache = kv_per_token * max_seq_len * max_batch
    4. per_card = (weight_bytes + kv_cache * 1.2) / num_cards
    5. assert per_card < card_memory * 0.85, "Memory budget exceeded; increase parallelism or reduce context"

    3. Parallelism Strategy: Combining Tensor, Pipeline, and Expert Parallelism

    The core challenge in a dual-node setup is that inter-node bandwidth is far lower than intra-node bandwidth. The rule of thumb: tensor parallelism inside a node, pipeline and expert parallelism across nodes.

    • Tensor parallelism (TP) stays within the 8 cards of a single node, using high-bandwidth interconnects and avoiding frequent cross-node all-reduce.
    • Expert parallelism (EP) spans nodes, distributing experts (on the order of 256) across cards and pulling them via all-to-all on a router hit. Enable communication-computation overlap here, or the bubble ratio will rise significantly.
    • Pipeline parallelism (PP) splits layers when there are many of them; balance memory usage across stages so the first stage does not become the bottleneck.

    A common mistake is stretching TP to 16 across nodes, which forces cross-node synchronization every step and clearly hurts throughput. The correct approach is to fix TP=8 first, then scale with EP/PP.

    4. Keeping the Image and Runtime Environment Consistent

    Large-scale inference fears “environment drift” above all. The recommended practice is to bake the driver, firmware, communication library, inference framework, and model adaptation patches into a single image, then launch it across nodes as a DaemonSet through a container platform so every node runs an identical runtime.

    Before startup, verify three things: accelerator driver and firmware versions, communication library topology detection results, and NPU affinity settings on each node. A mismatch in any of them can cause collective communication to hang rather than error out, which is extremely costly to diagnose.

    5. Service Startup and Key Parameters

    The following is illustrative startup logic; actual parameters should follow the documentation for your inference framework version:

    1. # Run on each node; node_rank distinguishes machines
    2. python -m vllm.entrypoints.openai.api_server \
    3. --model /models/moe-w4a8 \
    4. --tensor-parallel-size 8 \
    5. --pipeline-parallel-size 2 \
    6. --enable-expert-parallel \
    7. --quantization w4a8 \
    8. --max-model-len 262144 \
    9. --gpu-memory-utilization 0.88 \
    10. --kv-cache-dtype int8 \
    11. --trust-remote-code

    Three levers for tuning:

    1. Do not set max-model-len to 1M right away. Get 128K working first, then increase it gradually while watching whether the KV cache triggers preemption.
    2. In dual-node setups, keep gpu-memory-utilization slightly lower than for a single node to leave room for cross-node communication buffers.
    3. Enabling prefix caching can significantly improve effective throughput for multi-turn conversations and fixed system prompts.

    6. Load Testing and Observability

    Load tests should cover three workload types: short prompts at high concurrency, single long-document requests, and mixed multimodal image-text input. Look beyond tokens/s to time to first token (TTFT), time per output token (TPOT), and request queueing time.

    The MoE-specific observability point is expert load balance. If routing is heavily skewed, a few cards become hotspots and drag down overall throughput. Collect per-card expert hit distributions and adjust the routing capacity factor when necessary.

    Observability can rely on general capabilities: a logging service for structured collection, monitoring and alerting for dashboards and threshold notifications, and object storage to archive load test reports and weight versions.

    7. Common Failures and Troubleshooting Paths

    Symptom Frequent Cause Recommendation
    OOM during weight loading Expert parallelism disabled / memory utilization too high Increase EP degree, lower utilization
    Collective communication timeout Inter-node network or topology mismatch Verify firmware and communication library versions
    Throughput far below expectations TP spanning nodes, overlap not enabled Keep TP within a node
    Long text truncated max-model-len set too low Raise context length in stages
    Slow cold start Insufficient weight read bandwidth Pre-stage on local NVMe + sharded loading

    8. Practical Recommendations

    If an organization wants to lower the barrier to self-hosting, it can evaluate a combination of general capabilities such as the container platform, object storage, and monitoring/alerting on Baidu AI Cloud, standardizing image distribution, weight hosting, and runtime observability so the team can focus on model quality and business integration rather than repeatedly solving environment consistency problems.

    Overall, the key to deploying a trillion-scale MoE on two nodes is not any single “black box” technique, but doing four things solidly: budget calculation, parallelism partitioning, environment固化, and a load-testing loop. Following this path, most teams can go from zero to a usable service within days.