Key Challenges in Training Trillion-Parameter Multimodal MoE Models on Domestic Accelerators

    Training trillion-parameter multimodal Mixture-of-Experts (MoE) models presents significant engineering hurdles, particularly when validating the training pipeline on emerging domestic accelerators. This article explores the primary challenges in verifying large-scale MoE training, including dynamic expert routing, sparse attention memory patterns, and cross-modal gradient stability. It details a practical approach using trimmed configurations to validate training functionality with limited hardware resources, outlines four critical checkpoints for distributed training pipelines, and provides a reusable verification checklist. Finally, it discusses the limitations of scaled-down validations and the remaining steps required to achieve full-scale, long-term training stability.

    Why Trillion-Parameter Multimodal MoE Training is Hard to Verify Directly

    The difficulty of training large models typically lies not in a single forward pass, but in the coordination across multiple pipeline stages. Take a native multimodal model with approximately 2.8 trillion parameters using a Mixture-of-Experts (MoE) architecture as an example. During training, three types of pressure emerge simultaneously.

    First, expert routing causes imbalanced compute and communication loads. Since each token only activates a subset of experts, the data volume received by different experts varies with the input. Consequently, cross-GPU data exchange follows a dynamic pattern rather than a fixed, regular communication pattern.

    Second, dynamic sparse attention alters the memory access patterns of operators. Operators must ensure numerical accuracy while maintaining throughput across varying sequence lengths, which imposes strict requirements on operator implementation and performance tuning.

    Third, multimodal branches introduce additional parameters and gradients. The vision encoder and language backbone share the optimization process. Any gradient anomaly on either side will affect overall convergence.

    When these pressures compound, verification cannot be completed in a single pass. Whether the training pipeline can run successfully depends on whether each component has been individually inspected.

    Trimmed Configuration: Verifying Training Functionality with Limited Resources

    Full-scale pretraining requires substantial compute and time costs. In engineering practice, a trimmed configuration is often used to verify the training pipeline rather than to evaluate final model quality. The core idea of trimming is to preserve structures relevant to the training pipeline while compressing scales unrelated to it.

    A verification recently disclosed by a domestic GPU vendor utilized the following configuration:

    1. model:
    2. language_layers: 13 # Number of language backbone layers after trimming
    3. experts_total: 16 # Total number of routing experts
    4. experts_active: 8 # Number of experts activated per token (Top-8)
    5. vision_layers: 27 # Full vision tower retained
    6. init: random # Random initialization
    7. data:
    8. source: public_medical_vqa # Public medical visual question answering dataset
    9. train:
    10. steps: 400
    11. nodes: 2
    12. gpus_per_node: 8 # Dual-node, 16-GPU setup

    This configuration retains the complete vision tower and cross-modal projection module, ensuring that the vision branch’s gradients participate in the update. Random initialization implies that a decrease in loss only indicates that the optimization process is functioning normally; it does not mean the model has learned effective knowledge.

    According to the vendor’s disclosure, the training loss dropped from an average of 8.9365 (steps 21 to 70) to an average of 2.1802 (last 50 steps). The validation loss decreased from 6.5297 to 4.6873, with a peak memory usage of 44.80GiB. These figures demonstrate that the training process did not diverge within 400 steps, but they are insufficient to prove long-term training stability.

    Four Checkpoints for the Distributed Training Pipeline

    The training pipeline can be broken down into four interdependent checkpoints. Each must be verified individually before conducting comprehensive integration testing.

    1. Forward and Backward Numerical Consistency of Operators

    Custom mixed attention and MoE operators require both forward and backward implementations. During verification, custom operators should be compared against reference implementations under identical inputs to check whether the errors in outputs and gradients fall within acceptable limits. A common approach is to fix the random seed and compare the maximum relative error of activations and gradients layer by layer.

    A schematic check logic is as follows:

    1. def check_operator(custom_op, reference_op, inputs, rtol=1e-3, atol=1e-5):
    2. out_custom = custom_op(*inputs)
    3. out_ref = reference_op(*inputs)
    4. assert all_close(out_custom, out_ref, rtol, atol), "Forward output exceeds error tolerance"
    5. grads_custom = backward(out_custom, inputs)
    6. grads_ref = backward(out_ref, inputs)
    7. assert all_close(grads_custom, grads_ref, rtol, atol), "Backward gradient exceeds error tolerance"

    Here, all_close and backward are placeholder functions; their actual implementation depends on the framework used.

    2. Sharding of Parameters, Gradients, and Optimizer States

    Sharded data parallelism distributes parameters, gradients, and optimizer states across GPUs, with each card storing only its assigned portion. When using mixed precision and standard adaptive optimizers, each parameter typically requires approximately 16 bytes of state space, including low-precision weights, high-precision master weights, first and second moments, and gradients.

    Estimating with 2.8 trillion parameters, the total state size is about 44.8TB. Even if evenly distributed across 16 GPUs, each card would need to handle roughly 2.8TB, far exceeding single-GPU memory capacity. Therefore, both sharding and trimming are essential in ultra-large model training. When verifying sharding logic, three aspects should be checked:

    • Whether the shard size on each GPU matches the theoretical value.
    • Whether parameter gathering and release during the forward pass proceed as planned, and whether peak memory is predictable.
    • Whether parameters and optimizer states align precisely after saving and restoring checkpoints.

    3. Cross-Node Communication

    MoE’s expert parallelism relies on all-to-all data exchange, where each layer’s forward and backward passes may trigger one or more collective communication operations. Since cross-node bandwidth is lower than intra-node bandwidth, communication often becomes a bottleneck.

    Common optimization directions include overlapping communication with computation, reducing the data volume per exchange, and arranging expert placement according to node topology. During verification, the communication time ratio for each step should be recorded to observe whether it degrades as training progresses.

    4. Numerical Stability

    During training, loss may experience overflow or spikes. Engineering practices typically utilize dynamic loss scaling, gradient clipping, and anomaly detection in conjunction. The verification phase should continuously log loss, gradient norms, and overflow counts, while establishing clear abort conditions to prevent anomalous states from consuming compute resources.

    Reusable Verification Checklist

    When facing similar training pipeline verifications, the following sequence can be followed:

    1. Single operator alignment: Complete error comparison between custom operators and reference implementations.
    2. Single-layer integration: Run forward, backward, and optimizer updates using a minimal structure.
    3. Single-node multi-GPU: Verify sharding, peak memory, and checkpoint read/write operations.
    4. Multi-node small-scale: Introduce cross-node communication and record the communication ratio and per-step time cost.
    5. Long-term stability: Train continuously for thousands of steps or more, observing loss curves, gradient norms, and fault recovery capabilities.

    Comparable logs and metrics should be retained at each stage. Without baseline figures, it is difficult to determine if degradation has occurred.

    Conclusion and Limitations

    The value of this verification lies in demonstrating that the training pipeline can complete continuous training under a trimmed configuration without numerical overflow or interruption. This provides a reference point for the reproducibility of training on domestic accelerators.

    However, it has clear boundaries. A 400-step duration is insufficient to expose long-term runtime issues such as memory fragmentation, communication jitter, and hardware faults. Furthermore, a trimmed configuration cannot represent the convergence performance of a full-scale model. Market institutions predict that by 2026, the shipment of high-end AI chips in China will reach approximately 5 million units, with local solutions accounting for nearly 90%; however, shipment volumes alone do not indicate that the training pipeline has matured.

    Moving from trimmed verification to full-scale training requires crossing three hurdles: cluster scale expansion, fault tolerance and recovery, and long-term stability. When evaluating similar solutions, readers should focus on whether baseline comparisons are publicly disclosed, whether long-term runs are covered, and the specific mechanisms for fault recovery.