Adapting Trillion-Parameter Multimodal MoE to Domestic GPUs: An Engineering Breakdown

    A domestic GPU vendor recently disclosed a 400-step training-link validation of a 2.8-trillion-parameter multimodal MoE model on a two-node, 16-GPU setup. This article breaks down what that run actually proved, why trillion-parameter multimodal MoE models are hard to adapt, and how the trimmed configuration, operator coverage, sharded parallelism, and gradient checks fit together. It also explains what still separates this connectivity-and-stability test from full-scale pretraining, and provides a reproduction checklist for teams doing training adaptation.

    1. Reading the disclosure: what the 400-step run actually proved

    Recently, a domestic GPU vendor publicly disclosed that, on a two-node, eight-GPU-per-node configuration (2 nodes × 8 cards, 16 cards total), it completed a training-link validation of a trillion-parameter-class, native multimodal MoE model (2.8 trillion total parameters). Over 400 consecutive training steps, there was no numerical overflow and no abnormal interruption, and training loss and validation loss declined in sync.

    Against a backdrop where domestic accelerator adaptation is broadly accelerating, the notable part of this disclosure is not that “it ran” but the granularity of what was shared: step count, loss curves, peak memory, and gradient checks were published together. For teams doing training adaptation, three questions are worth breaking down: under what configuration it was validated, what was validated, and how far it is from full-scale training.

    1.1 Key metrics at a glance

    Dimension Disclosed information
    Parallel scale 2 nodes × 8 cards, 16 cards total
    Training config Language backbone trimmed to 13 layers; 16 routed experts, Top-8 activation
    Vision branch Full 27-layer vision tower and cross-modal projection module retained
    Data and init Public image-text QA dataset; random initialization
    Consecutive steps 400 steps, no numerical overflow or abnormal interruption
    Training loss 8.9365 (mean of steps 21–70) → 2.1802 (mean of last 50 steps)
    Validation loss 6.5297 → 4.6873
    Peak memory 44.80 GiB
    Additional conclusion Vision-branch parameters participate in updates

    1.2 Three boundaries

    To understand this validation accurately, draw three boundaries:

    1. Trimmed configuration, not the full model: only 13 layers of the language backbone were kept, and the expert count was reduced accordingly.
    2. Random initialization, not continued training: the model fit image-text data from scratch; the goal was to validate the training link and optimization behavior, not model capability.
    3. Link validation, not pretraining: the vendor explicitly stated this was only to test training functionality and loss trends; full-scale pretraining is being carried out separately.

    So this is an engineering-level “connectivity + numerical stability” validation. It meaningfully lowers the risk of full-scale training, but it does not mean full-scale training is already feasible.

    2. Why trillion-parameter multimodal MoE models are hard to adapt

    2.1 Architecture sets the difficulty: three high-risk points

    These models combine sparse routing, hybrid attention, and dual-modality fusion, and the adaptation challenges concentrate in three places:

    • Expert routing creates dynamic, cross-device compute patterns;
    • Hybrid attention has complex operator implementations and is prone to numerical instability;
    • The vision and language branches differ significantly in parameter count and gradient distribution.

    All three risks rest on a common prerequisite: domestic hardware must get both the operators right and the entire training link right.

    2.2 Sparse routing: communication becomes the main cost

    MoE splits the feed-forward layer into multiple experts, and each token activates only a few of them. With 16 experts and Top-8 activation, half the experts participate in computation, yet all 16 experts’ parameters must stay resident in memory. Once sequence parallelism or expert parallelism is enabled, tokens must be “dispatched out and gathered back” according to expert routing—two cross-device all-to-all operations. The communication volume is roughly:

    1. T × H × k × s × 2

    where T is the number of tokens, H is the hidden dimension, k is the number of activated experts, and s is the number of bytes of the data type. With T=8192, H=4096, k=8, and s=2 (bf16), a single all-to-all is on the order of ~1 GiB, and a round trip is about ~2 GiB. This communication pattern has two characteristics:

    • Irregular: routing results vary with input, so every message differs in size;
    • Latency-sensitive: when load balancing is poor, the device holding some experts becomes the long tail.

    2.3 Hybrid attention: dynamic shapes and gradient backprop

    Dynamic sparse attention makes each token’s actual participating context vary with input, creating three challenges:

    • The compute-graph shape changes with input, making static compilation optimization hard;
    • Mask generation and the attention kernel must be implemented correctly; small errors often don’t throw errors but simply make the loss worse;
    • The backward pass of sparse attention must strictly correspond to the positions selected in the forward pass, or gradients misalign.

    2.4 Multimodal fusion: gradient-scale differences between two branches

    The vision tower’s parameter count and gradient magnitude often differ from the language backbone’s. If each branch shares the same learning rate and global clipping threshold, training can be dominated by the branch with larger gradients. That’s why group-wise learning rates and branch-level gradient monitoring cannot be skipped.

    2.5 Forward and backward of operators matter equally

    A common operator-adaptation failure is “forward works, backward fails.” On the training side there’s no evaluation-style reference comparison; errors typically surface as abnormal loss curves or abnormal gradient values. So each new operator should first go through numerical-difference alignment before being put into a long-chain validation.

    3. Trimmed configuration breakdown: covering the largest risk surface at minimal cost

    This validation used a trimmed configuration: 13 layers of the language backbone, 16 routed experts with Top-8 activation, a full 27-layer vision tower and cross-modal projection module retained, trained from random initialization on a public image-text QA dataset. This can be seen as an engineering trade-off that maximizes risk coverage while minimizing compute:

    1. Full vision tower retained: the vision-branch parameters actually participated in updates, showing that the optimizer, sharding, and backward chain covered both modalities—not just the language backbone.
    2. Expert count reduced: all expert parameters fit within the fully-sharded state across 16 cards. Cross-card overhead is mainly the sharded communication of parameters and gradients, leaving room to validate expert parallelism in the next step.
    3. Language backbone shortened: smaller resident state and shorter per-step time let the 400 steps finish quickly while keeping headroom in peak memory.
    4. Random initialization: optimizer state accumulates from zero, exposing overflow and gradient-explosion issues in the initialization and warmup phases; if training resumed from existing weights, such issues would be easily masked.
    5. Image-text QA data: output is mostly short text, so synchronized declines in training and validation loss can be observed within a limited number of steps.

    Illustrative configuration:

    1. # Illustration: trimmed configuration, for explaining the idea only, not a specific framework API
    2. model_config = dict(
    3. text_layers=13, # Language backbone trimmed layers
    4. experts_per_layer=16, # Routed experts per MoE layer
    5. top_k=8, # Experts activated per token
    6. vision_layers=27, # Full vision tower retained
    7. include_projection=True, # Keep the cross-modal projection module
    8. )
    9. train_config = dict(
    10. init="random", # Random initialization: validate the link, not model capability
    11. dtype="bf16", # Larger dynamic range, lowers overflow probability
    12. grad_clip=1.0, # Global gradient clipping
    13. ckpt_every_steps=50, # Periodic checkpointing for easier recovery
    14. )

    4. Engineering implementation: from operators to cross-node communication

    The engineering focus of this adaptation is not single-card peak but the systematic completion of the distributed training link: after filling in the hybrid-attention and MoE operators (including their backward implementations), rely on Fully Sharded Data Parallel (FSDP2) to manage parameters, gradients, and optimizer state uniformly, with cross-node collective communication handled by the collective communication library (MCCL).

    4.1 Forward and backward of routing

    A typical MoE layer implementation is as follows:

    1. def moe_forward(hidden, router, experts, num_experts=16, top_k=8, cap_factor=1.25):
    2. # 1. Compute routing scores, take Top-k experts
    3. scores = router(hidden) # [T, E]
    4. topk_scores, topk_ids = topk_softmax(scores, top_k) # [T, k]
    5. # 2. Build dispatch and combine indices
    6. # Guard against index -1 (unselected) being written into expert inputs
    7. dispatch, combine = build_dispatch_combine(topk_ids, scores, num_experts)
    8. # 3. Under sequence/expert parallelism, two cross-device all-to-all
    9. x_exp = all_to_all(hidden, dispatch) # Dispatch by expert
    10. y_exp = grouped_gemm(experts, x_exp) # Grouped expert computation
    11. out = all_to_all(y_exp, combine) # Gather back by token and weight
    12. # 4. Load-balancing auxiliary loss to prevent a few experts from overloading
    13. aux_loss = load_balance_loss(scores, topk_ids, num_experts)
    14. return out, aux_loss

    Four points to note for the backward pass:

    • The gradient of all-to-all is an all-to-all in the opposite direction;
    • Gradients after dispatch must be propagated back by combine weight;
    • Routing is a discrete choice, so gradients flow back only through the selected paths;
    • The auxiliary loss must be explicitly backpropagated.

    It’s also advisable to add numerical guards to each MoE path to prevent abnormal values from polluting the optimizer state:

    1. g = global_grad_norm() # Global gradient norm
    2. if not isfinite(g) or g > MAX_GRAD_NORM:
    3. optimizer.zero_grad() # Skip this step's update
    4. loss_scale *= 0.5 # Back off the scale in mixed-precision settings
    5. else:
    6. clip_by_global_norm(g)
    7. optimizer.step()

    4.2 Sharded parallelism and communication volume

    Fully sharded data parallel splits parameters, gradients, and optimizer state across cards, with each rank holding only a part. Before forward computation, parameter shards are all-gathered per layer; during backward, gradient shards are reduce-scattered; after the optimizer updates locally, new parameters are all-gathered. Let the total number of model parameters be Ψ; the per-step communication volume of each stage is roughly:

    • Pure data parallel (gradient all-reduce): 2Ψ;
    • Fully sharded data parallel: forward all-gather Ψ, backward reduce-scatter Ψ, post-update all-gather Ψ, totaling about 3Ψ, roughly 1.5× pure data parallel;
    • Hybrid sharding (only shard optimizer state, gradient reduce): about 2Ψ.

    The 44.80 GiB peak memory shows that the trimmed model on 16 cards can no longer use “one full replica per card” data parallel—which is exactly why the fully sharded approach was chosen for this kind of validation.

    4.3 Cross-node communication

    The collective communication library must guarantee the correctness and stability of primitives such as all-reduce, all-gather, reduce-scatter, and all-to-all in a two-node environment. Three engineering requirements:

    1. Topology awareness: within a node, use the high-bandwidth interconnect; across nodes, use the network interface. Shard groups should stay within a node as much as possible, with cross-node traffic carrying mainly the data-parallel collectives.
    2. Communication-computation overlap: bucket by layer and add prefetching so the next layer’s parameter all-gather runs in parallel with the current layer’s compute.
    3. Network stability: in a two-node setup, jitter on a single link can time out an entire collective. Long-duration stability tests must cover bandwidth pressure and packet-loss scenarios.

    4.4 Memory management

    Memory consists of resident state and activations, which compete with each other. Optimization measures include selective recomputation (recomputing only low-cost operators like attention), optimizer-state sharding, and fragmentation control. The 44.80 GiB figure should be treated as a stress-test result under the trimmed configuration; evaluating full-scale training requires reserving headroom.

    5. Gradient checks: judging whether “it ran” is trustworthy

    5.1 Why gradients, not loss, are the yardstick

    Loss can decline from fitting the data; even with small flaws in the numerical path, short training may not expose them. Gradient checks reflect both the forward computation and the backward derivation at once. The disclosed metrics can be read from five angles:

    1. Segment means: training loss uses the mean of steps 21–70 (8.9365) and the mean of the last 50 steps (2.1802), reasonably excluding the fluctuation of the first 20 steps. Over 400 steps, loss dropped by about 6.76—gradual and sustained.
    2. Validation-set trend: validation loss fell from 6.5297 to 4.6873, declining in sync without a clear rebound. Under random initialization, this is direct evidence of “learning something” rather than gradient explosion.
    3. Comparison with theory: with random initialization and near-uniform output, cross-entropy is about log(vocabulary size)—roughly 11.5 for a hundred-thousand-level vocabulary. 8.9365 is below this level, showing the model is already exploiting image-text pairing information. Under a comparable vocabulary, if the starting loss differs markedly from theory, it usually indicates a problem with loss masking or data concatenation.
    4. No overflow, no interruption: bf16 has a large dynamic range, but routing scores and attention scores may overflow in some implementations, producing NaNs. 400 steps without overflow shows that numerical safeguards (scaling, max-subtraction before softmax, etc.) are working.
    5. Gradient norm and vision-branch update: the vendor’s disclosed gradient checks usually include a bounded global norm without NaNs, and non-zero gradients for each parameter group. The latter is the direct basis for the claim that “the vision branch participates in parameter updates.”

    It should be noted that training loss being lower than validation loss is normal; the small gap within 400 steps should not be read as overfitting.

    • Log the global gradient norm, per-branch gradient norms, and gradient-clipping trigger count step by step;
    • Every few steps, record optimizer-state norm, peak memory, and per-step time;
    • Save intermediate checkpoints to support resume-consistency verification.
    1. metrics = {
    2. "grad_norm_global": global_grad_norm(),
    3. "grad_norm_text": group_grad_norm("text"),
    4. "grad_norm_vision": group_grad_norm("vision"),
    5. "clip_triggered": grad_was_clipped,
    6. "peak_mem_gib": max_memory_allocated() / 2**30,
    7. "step_time_ms": step_time_ms,
    8. }

    6. From trimmed validation to full pretraining: what’s still missing

    6.1 Scale-up

    The full 2.8-trillion-parameter model needs a combination of data parallel, tensor parallel, expert parallel, pipeline parallel, and even sequence parallel. The communication pattern shifts from “collectives dominant” to an interleaving of all-to-all, point-to-point, and collectives; expert parallelism and pipeline parallelism also introduce load-balancing and pipeline-bubble problems, so the parallel strategy must be re-searched.

    6.2 Long-run stability

    Full pretraining typically lasts weeks to months. During that period, any node failure, collective hang, or slow node lowers the effective training rate. Automatic fault isolation, asynchronous sharded checkpointing, and loss-consistency of resumed training are must-test items.

    6.3 Precision alignment and performance baseline

    Provide the deviation range of the loss curve versus a reference implementation, and continuously track single-card throughput and model FLOPs utilization (MFU). Under data parallel, MFU can be approximated as:

    1. MFU ≈ 6 × per-card tokens per step ÷ (per-card peak FLOPS × per-step time)

    where the factor of 6 estimates multiply-accumulates as 2× forward and 4× backward.

    6.4 Reproduction checklist

    Check item Method Pass criterion
    Reproducibility Fix seed and data order, rerun multiple times Curves largely overlap, gradient checks are repeatable
    Reference consistency Compare step by step with the vendor’s single-step baseline Difference within the vendor’s stated tolerance
    Communication correctness Compare post-step parameters across different card counts (by shard) Update results are consistent
    Memory headroom Stepwise increase layers and sequence length No OOM, peak leaves headroom
    Resume consistency Save then resume training Loss curve connects smoothly
    Long-run test Days of continuous stress testing, including network-pressure injection No crashes, no hangs, no precision drift

    7. Industry context: supply side accelerating, evaluation needs layering

    Adaptation between domestic GPUs and large models is accelerating. From public disclosures across vendors, it roughly falls into three tiers:

    • Ecosystem-coverage type: one AI chip vendor says its accelerator cards have adapted over 400 mainstream large models, covering 99% of non-closed-source models;
    • Training-deployment type: one chip vendor says several large-model companies have completed multimodal pretraining and reinforcement learning on its thousand-card clusters, with precision aligned to international products; another vendor says it is pushing adaptation of multiple mainstream open-source model series on the training side, extending toward thousand-card and ten-thousand-card clusters;
    • Fully-domestic-cluster type: a company says its fully domestic chip cluster completed training of an important version of its own large model, with an effective training rate of 97%.

    According to third-party research forecasts, shipments of high-end AI chips in the China market will reach about 5 million units in 2026, up 83% year over year, with local solutions nearing a 90% share (including self-developed ASICs from cloud vendors). The supply side is accelerating, but “link validation,” “training adaptation,” and “production-grade long-run training” are conclusions at different tiers. To evaluate an adaptation, look simultaneously at scale, duration, stability metrics, and reproducibility.

    8. Conclusion

    The value of this 400-step training validation is that it provides a referenceable engineering milestone for domestic GPUs on trillion-parameter MoE multimodal models: the trimmed configuration is clear, loss, memory, and gradient-check data are public, and the basis for judgment is transparent. But going from a trimmed configuration to full-scale pretraining of the complete trillion-parameter model still requires crossing two gates: cluster scale-up and long-run stability. For teams doing training adaptation, the recommendation is to first lock in correctness with a “small-scale, short-step, strict-monitoring” link validation, then approach production standards through “stepwise scaling, sustained stress testing, and item-by-item alignment.”