Validating Trillion-Parameter MoE Multimodal Training Pipelines on Chinese GPUs

    Recently, a Chinese GPU manufacturer successfully validated the training pipeline for a 2.8-trillion-parameter native multimodal Mixture of Experts (MoE) model across a dual-node, 16-GPU setup. This article breaks down the engineering methodology behind this validation, exploring the challenges of sparse attention and expert routing, how to use trimmed configurations for pipeline validation, key implementations like FSDP2 and cross-node communication, and how to interpret training metrics accurately.

    Over the past year, the adaptation of Chinese AI computing power to large models has accelerated significantly. Multiple GPU vendors are pushing compatibility with mainstream large models for both training and inference, covering scenarios such as multimodal pre-training and reinforcement learning. Recently, a domestic GPU vendor disclosed that its laboratory completed the training pipeline validation for a 2.8-trillion-parameter native multimodal MoE model in a dual-node, 16-GPU environment, running continuously for 400 steps without numerical overflow or unexpected interruptions. This article breaks down the engineering approach behind this type of validation to help readers understand what to check at each step. Note that the specific metrics mentioned are vendor-disclosed and cannot be independently verified; they should be treated as references rather than benchmarks.

    1. Why is it Hard to Build a Training Pipeline for Trillion-Parameter MoE Models?

    The MoE (Mixture of Experts) architecture can scale parameter size with a limited increase in inference computation. However, it introduces two types of pressure on the underlying system.

    The first pressure comes from sparse attention. Dynamic sparse attention selects the token range for computation based on input content, making memory access patterns irregular. This reduces GPU cache hit rates, and memory bandwidth can easily become a bottleneck. Note that this sparsity refers to token selection in the attention layer, which is distinct from expert-layer sparsity, and the two should be diagnosed separately when troubleshooting.

    The second pressure comes from expert routing. The gating network selects Top-K experts for each token, requiring tokens to be sent to experts distributed across different GPUs, with the results collected afterward. This step involves All-to-All communication, which is data-intensive and latency-sensitive. Without targeted optimization of the communication link, training speed will suffer, and timeouts may occur in severe cases.

    2. Validating the Pipeline with Trimmed Configurations

    Given the high cost of training a full model, teams typically validate the pipeline using trimmed configurations first. According to the disclosure, the test applied the following trims:

    • The language backbone retained 13 layers, configured with 16 routing experts, activating Top-8 experts per token.
    • The vision component fully retained its 27-layer vision tower and cross-modal projection module to ensure all code paths for multimodal feature fusion were executed.
    • Training used an open-source image-text dataset, and the model was trained from random initialization.

    The goal of trimming is to connect the pipeline, not to yield a usable model. Validation should cover three aspects: whether the forward and backward computations of operators are correct, whether gradient updates are stable, and whether cross-device communication is reliable. Once these three pass, the fundamental engineering risks in full-scale training decrease.

    It is important to note that trimmed and full-scale models have different structures. Convergence curves from trimmed configurations cannot be directly extrapolated to the final performance of the full model.

    3. Three Key Implementations for Distributed Training

    1. Memory Sharding with FSDP2

    Even distributed across 16 GPUs, a trillion-parameter model cannot fit all parameters, gradients, and optimizer states on a single card. FSDP2, PyTorch’s new fully sharded data parallel solution, shards parameters individually. It aggregates parameters on demand before computation and releases them immediately after, thereby reducing peak memory.

    The entry point is torch.distributed.fsdp.fully_shard, available in PyTorch 2.6 and above (refer to the documentation for your specific version). Below is a schematic example where the model class is a placeholder:

    1. import os
    2. import torch
    3. import torch.distributed as dist
    4. from torch.distributed.device_mesh import init_device_mesh
    5. from torch.distributed.fsdp import fully_shard
    6. dist.init_process_group("nccl")
    7. local_rank = int(os.environ["LOCAL_RANK"])
    8. torch.cuda.set_device(local_rank)
    9. mesh = init_device_mesh("cuda", (dist.get_world_size(),))
    10. model = MultimodalMoEModel(config) # Placeholder, replace with actual model class
    11. # Shard layer by layer first, then shard the outer model
    12. for block in model.language_model.layers:
    13. fully_shard(block, mesh=mesh)
    14. fully_shard(model, mesh=mesh)
    15. # Create the optimizer after sharding, as parameters are now in sharded form
    16. optimizer = torch.optim.AdamW(model.parameters(), lr=2e-5)

    There are two common mistakes here. First, using FSDP1’s FullyShardedDataParallel wrapper approach for FSDP2. Their APIs and state dictionary behaviors differ; copying code directly will cause runtime failures or incorrect results. Second, creating the optimizer before sharding, which causes the optimizer to reference unsharded parameters.

    2. Cross-Node Communication Optimization

    Expert routing relies on All-to-All, and gradient synchronization relies on All-Reduce; both transfer data across nodes. The team used a general collective communication library for this work, focusing on two main tasks: optimizing the underlying communication implementation to reduce latency, and overlapping computation with communication to hide a portion of the communication time within computation time.

    To evaluate if this was done well, you can look at three metrics: the proportion of communication time per step, All-to-All bandwidth utilization across different batch sizes, and the overlap ratio between computation and communication. The vendor’s materials did not provide these metrics, so the actual extent of optimization cannot be determined.

    3. Low-Precision Adaptation of Mixed Attention and MoE Operators

    The core of the underlying work is completing the forward and backward implementations for mixed attention and MoE operators. Dynamic sparse indexing and Top-K gating logic require specialized optimization at the hardware instruction level. When training with BF16 precision, its exponent bits match FP32 (lowering overflow probability), but it has fewer mantissa bits, meaning cumulative errors and gradient anomalies can still cause numerical issues. Therefore, the following checks are recommended:

    • Check for NaN or Inf in activations and loss every few steps.
    • Monitor gradient norms across layers, set thresholds, and trigger alerts when exceeded.
    • Log unexpected interruptions and retain rollback checkpoints.

    These checks can be written directly into the training script. They are inexpensive to implement but can significantly reduce debugging time.

    4. How to Read Training Curves

    According to the disclosure, the data from this training run is as follows:

    • Training loss: Mean of 8.9365 from steps 21 to 70, and 2.1802 for the last 50 steps.
    • Validation loss: Dropped from 6.5297 to 4.6873.
    • Peak memory: 44.80GiB, with parameters from the vision branch also participating in updates.

    When reading these numbers, keep a few points in mind.

    First, loss metrics require a clear definition. The disclosure does not specify whether these are single-card values or global averages, nor does it state if they are token-weighted. Under different definitions, the numbers can vary significantly.

    Second, the validation loss decreased synchronously with the training loss, indicating no obvious overfitting during this phase. However, this does not prove the model has successfully learned image-text alignment.