# Domestic GPU Completes Trillion-Parameter MoE Multimodal Training Pipeline

    This article examines how a domestic GPU completed a trimmed training-pipeline validation for a 2.8-trillion-parameter multimodal MoE model. It covers why multimodal training is harder than inference, the main engineering bottlenecks in dynamic sparse attention, MoE routing, mixed precision, and memory management, and the methodology behind the reported 400-step run. It also discusses implementation requirements, observability, limitations of the cropped setup, and the remaining gaps before full-scale, long-running training.

    Domestic GPU Completes Trillion-Parameter MoE Multimodal Training Pipeline

    1. Introduction: From “Can It Run?” to “Can It Train?”

    In the development of domestic AI chip ecosystems, the question of whether hardware can run models is increasingly being replaced by whether models can be trained stably and effectively. Inference-side adaptation for individual operators and single models is relatively focused. Training, however, must simultaneously address large-scale parallelism, complex model architectures, long-running stability, and data throughput, making it roughly an order of magnitude more difficult.

    Recently, a domestic GPU vendor announced that its lab completed training-pipeline adaptation for a 2.8-trillion-parameter native multimodal large model based on a Mixture-of-Experts (MoE) architecture. In a two-node, 16-GPU configuration, the lab completed 400 consecutive training steps without numerical overflow or abnormal interruption.

    First, a boundary needs to be clarified: this validation used a trimmed configuration and is not equivalent to full-scale pre-training. The vendor stated that the test was intended to verify training functionality and loss trends, while full-scale pre-training will be conducted separately.

    From an engineering perspective, the value of this disclosure lies in being small and detailed:

    • Focused objective: The goal was to verify that the model runs, gradients are correct, and loss decreases reasonably, rather than to pursue model quality.
    • Transparent metrics: The report includes specific loss-curve values, statistical scope, peak memory usage, and gradient-check conclusions.

    For teams migrating large-model training to domestic accelerators, this provides a referenceable and reproducible engineering milestone.

    2. Problem Definition: Why These Models Are the “Deep Water” of Adaptation

    2.1 Three Overlapping Challenges on the Model Side

    Structural Feature Core Requirement for the Training Framework Typical Risk
    MoE sparse architecture Dynamic routing, expert parallelism, load balancing Uneven communication, expert hotspots, unstable routing values
    Dynamic sparse attention Correct implementation for both forward and backward operators Variable sequence shapes, operator precision deviations
    Native multimodal design Coordination of heterogeneous branches and cross-modal gradient backpropagation Imbalanced data modalities, unbalanced vision-branch gradients

    2.2 Dual Constraints from Hardware and Software

    Whether a training pipeline can be established depends on a closed loop between hardware and software:

    • Hardware side: Compute capacity, memory capacity, and interconnect bandwidth within and across nodes.
    • Software side:
      • Whether the base operator library covers all operators required by the model.
      • Whether the framework and communication libraries are adapted.
      • Whether precision strategies and numerical-stability methods are mature.

    A weakness on either side will eventually appear as a crash, slowdown, or precision anomaly during training.

    3. Technical Breakdown: Where the Difficulties Lie

    3.1 Dynamic Sparse Attention: The First Operator-Level Barrier

    The number of visual tokens varies with image resolution. When visual tokens are concatenated with language tokens, the sequence length is not fixed and can vary significantly across samples. Attention computation is expensive and directly affects both performance and memory consumption. Common mitigation approaches include:

    • Supporting variable-length sequences to avoid excessive padding caused by aligning to the longest sample.
    • Using block-sparse or windowed attention patterns to reduce computational complexity.
    • Replacing implementations composed of multiple primitive operators with fused operators to reduce memory read/write overhead and kernel launch overhead.

    However, making the forward pass work is only part of the problem. The backward pass must also be correctly implemented:

    • If the forward pass uses an approximation or reordering, the backward pass must strictly correspond to it; otherwise, gradients may silently deviate.
    • Dynamic sparse masks must be correctly mapped back to their original positions during backpropagation. Any indexing error can silently corrupt gradients.

    3.2 MoE Expert Routing: An Amplifier of Communication and Load Issues

    Tokens are first scored by a routing network. The top-scoring experts are selected, and tokens are dispatched to the devices holding the corresponding expert parameters. Expert parameter count grows linearly with the number of experts, which is a major reason why MoE model sizes scale up rapidly.

    When a single GPU cannot hold all experts, expert parallelism is required, and cross-GPU or even cross-node all-to-all communication becomes almost unavoidable. This introduces several difficulties:

    1. Load imbalance: Routing results depend on the input data. Popular experts may receive a large number of tokens, causing noticeable waiting times across devices. In synchronous training, faster devices wait for slower ones, diluting effective compute.
    2. Numerical precision: Routing scores are prone to overflow under low-precision formats such as fp16 and bf16 because of limited numerical range, which can trigger abnormal behavior.
    3. Coupled tuning: Load-balancing auxiliary loss, capacity factors, and token-dropping policies are interrelated. Poor configuration can cause expert collapse, where routing concentrates on only a few experts, or training oscillations.

    Common mitigations include load-balancing losses, capacity limits, expert capacity factor tuning, and computing routing scores in higher precision.

    3.3 Mixed Precision and Gradient Consistency

    Large-model training commonly uses low-precision formats such as bf16 and fp16 to balance memory usage and throughput. However, low-precision formats have limited dynamic range. Amplified gating scores in MoE and large values in attention may cause overflow. Engineering practices usually include:

    • Keeping parameters in fp32 as the master copy and retaining master weights under mixed precision.
    • Applying loss scaling to prevent small gradients from being rounded to zero in fp16.
    • Using gradient clipping and overflow detection.

    3.4 Memory Management: Sharding, Recomputation, and Peak Control

    Sharded training divides parameters, gradients, and optimizer states across devices and temporarily aggregates them when needed. For Adam-like optimizers, if parameters, gradients, and two momentum states are stored in fp32, a single parameter can require about 16 bytes, not including activations. Full-parameter training therefore has very large memory requirements.

    Whether peak memory can be kept within a single GPU’s capacity directly determines whether a parallel strategy is feasible. Common methods include:

    • Parameter sharding.
    • Activation recomputation.
    • Optimizer state offloading.

    4. Validation Methodology: Value and Limits of Cropped Training-Pipeline Validation

    4.1 Cropped Configuration: Covering the Most Critical Path at Minimal Cost

    The cropped configuration used in this validation:

    • The language backbone was reduced to 13 layers and 16 routed experts, with Top-8 activation per token.
    • The full 27-layer vision tower and cross-modal projection modules were retained.
    • Training started from random initialization on an image-text question-answering dataset.

    The logic behind this design is that the hidden reefs of multimodal training are not in how deep the backbone is, but in whether the cross-modal path is complete. By retaining the vision branch in full, the design allows the validation to test the gradient backpropagation path among the vision encoder, projection layers, and language backbone even after the language backbone has been reduced.

    4.2 Random Initialization Plus Loss Reduction: The Most Direct Functional Self-Check

    Fine-tuning a mature set of weights can only answer whether training can converge. It cannot answer whether gradient directions are correct. Under random initialization, if training loss continues to decrease over several hundred steps, it indicates that the forward pass, backward pass, and optimizer update form a closed loop.

    4.3 Statistical Scope: Why the First 20 Steps Were Excluded from the Average

    • Training loss is reported as the average over steps 21 to 70, not the instantaneous value of the first step.
    • During early training, parameters are random, warmup is incomplete, and optimizer momentum has not yet been established. The first-step loss therefore barely reflects the convergence trend.
    • Averaging over an interval smooths mini-batch noise and makes comparisons between earlier and later stages more reliable.

    4.4 Gradient Checks: Preventing “Loss Goes Down but Gradients Are Wrong”

    A decreasing loss does not necessarily mean gradients are correct. Sign errors or scaling deviations in gradients may be masked for a period by adaptive optimizer adjustments. Explicit gradient checks, such as finite-difference validation on selected parameters and monitoring of gradient norms and sparsity, can reveal such issues earlier.

    4.5 Result Interpretation

    Metric Starting Value (Statistical Scope) After Convergence (Statistical Scope) Change
    Training loss 8.9365 (mean of steps 21–70) 2.1802 (mean of last 50 steps) About -75.6%
    Validation loss 6.5297 4.6873 About -28.2%
    Peak memory — 44.80 GiB —
    • Training loss: Loss dropped from around 8.94 to around 2.18. With random initialization of the language model, the prediction of the next token is almost equivalent to a uniform guess, so the initial loss is often close to the natural logarithm of the vocabulary size. A rapid drop below this range indicates that the model indeed learned statistical patterns from the image-text data.
    • Validation loss: Validation loss decreased at the same time, indicating that the improvement came from generalization rather than memorization of training samples, and that no obvious overfitting collapse occurred.
    • Peak memory: 44.80 GiB is an informative number. Mainstream data-center accelerators commonly provide tens of GiB of memory per GPU. A peak within this range suggests that the sharding strategy has room for deployment on the target cards.
    • Gradients and stability: Gradient checks passed, and there was no overflow or abnormal interruption within 400 steps, indicating that numerical behavior across routing, attention, and cross-modal fusion remained controllable.

    4.6 Limits: What Cropped Validation Cannot Answer

    • Statistical noise has not been fully eliminated: Averages over two windows may still include several same-sign abnormal steps. The vendor did not provide a step-by-step curve, so strict conclusions would require raw logs.
    • Scaling extrapolation is not proportional: After reducing the number of layers, pipeline parallelism granularity, expert-parallel communication volume, and optimizer state size all change. Memory and communication bottlenecks may not scale proportionally.
    • Time horizon is too short: 400 steps only covers a window on the scale of hours and does not cover long-running stability.
    • Initialization path is different: Random initialization does not involve weight loading, format conversion, or checkpoint resumption, which are common issues in full-scale training.
    • Model capability is not covered: With reduced parameter count and layer count, the results cannot be extrapolated to the capability level of a finished model.

    5. Engineering Implementation: What Needs to Be Completed to Make the Pipeline Work

    5.1 Four Layers

    Layer Key Work
    Operator layer Forward and backward implementations of hybrid attention, MoE routing, and feed-forward blocks; dynamic shape support; precision-consistency checks
    Sharding layer Sharding parameters, gradients, and optimizer states across devices; aggregating them on demand for forward and backward; releasing unused shards promptly
    Communication layer Collective communication primitives such as all-to-all for token dispatch and retrieval, AllGather, and ReduceScatter; hierarchical communication within and across nodes
    Scheduling layer Gradient accumulation, activation recomputation, and overlap of communication and computation

    The communication layer depends on inter-node collective communication libraries. Bandwidth and topology awareness of inter-node links directly determine whether expert parallelism can operate efficiently.

    5.2 Illustrative Code

    The following code is pseudocode intended to express engineering logic only. It does not represent the implementation of any specific framework or hardware.

    Example 1: MoE expert routing with expert-parallel data dispatch

    1. class SparseMoE:
    2. """MoE feed-forward layer: routing -> dispatch -> expert compute -> combine"""
    3. def __init__(self, dim, num_experts, top_k, ep_size):
    4. self.gate = Linear(dim, num_experts) # Routing scoring network
    5. self.top_k = top_k # Number of experts activated per token
    6. self.ep_size = ep_size # Expert-parallel group size
    7. self.local_experts = build_experts() # Subset of experts held by this device
    8. def forward(self, x):
    9. # 1. Compute routing scores in fp32 to reduce overflow risk in low precision
    10. logits = self.gate(x).float()
    11. weights, indices = topk_softmax(logits, k=self.top_k)
    12. # 2. Group tokens by expert to obtain variable-length input batches
    13. groups = sort_tokens_by_expert(x, indices)
    14. # 3. Cross-device all-to-all; send volume depends on each device's token distribution
    15. local_in, counts = all_to_all_v(groups)
    16. # 4. Each device computes only its local experts. Variable-length grouped GEMM avoids padding waste
    17. local_out = grouped_gemm(self.local_experts, local_in, counts)
    18. # 5. Return results via all-to-all and combine them using routing weights
    19. y = combine(all_to_all_v(local_out), weights)
    20. return y

    Example 2: Memory lifecycle in sharded training

    1. def train_step(batch):
    2. # Parameter shards remain resident in memory. Full parameters are gathered only when the layer is computed.
    3. for layer in model.layers:
    4. params = all_gather(layer.shard) # Gather parameters on demand
    5. out = layer(batch) # Forward pass
    6. release(layer.shard, params) # Release immediately after computation to keep peak memory low
    7. loss = cross_entropy(model.head(out), batch.labels)
    8. loss.backward() # Gather parameters again during backward to compute gradients
    9. # Keep gradients sharded after reduction. Optimizer states are also stored as shards.
    10. clip_grad_norm(model, max_norm=1.0) # Gradient clipping
    11. optimizer.step()

    Example 3: Training anomaly guardrails

    1. def guarded_step(batch):
    2. with no_sync_if_accumulating(): # Skip communication while accumulating gradients
    3. loss = train_step(batch)
    4. if not isfinite(loss):
    5. # Log routing distribution, activation statistics, and gradient norms; skip this parameter update
    6. skip_step()
    7. log_telemetry(stage="non_finite_loss", loss=loss)
    8. else:
    9. optimizer.step()

    5.3 Observability

    Without metrics, a training pipeline can only be diagnosed after it has failed. At minimum, the following data should be collected:

    • Training and validation loss.
    • Gradient norms and parameter norms.
    • Token distribution for each expert.
    • Memory usage at each stage.
    • Duration of each step and the proportion of communication time.
    • Whether all-to-all send/receive volumes are balanced.

    6. Advanced Challenges: From Cropped Validation to Full-Scale Training

    6.1 Cluster Scaling: From Single Node to Thousands or Tens of Thousands of GPUs

    Once the number of layers and experts is restored, data parallelism, tensor parallelism, pipeline parallelism, expert parallelism, and sequence parallelism must be recombined. Changes in parallel configurations redefine communication bottlenecks, so communication conclusions from a cropped setup cannot be directly reused.

    6.2 Long-Running Stability: A Test Over the Time Dimension

    Full-scale pre-training usually lasts weeks or even months. Short pipeline validation cannot expose chronic issues such as memory fragmentation accumulation, gradual precision drift, or intermittent slowdown of individual nodes. To address these, three mechanisms are needed:

    • Periodically save checkpoints to ensure resumable training.
    • Implement fault detection and automatic isolation.
    • Identify slow nodes and reschedule tasks.

    6.3 Cluster Efficiency: Effective Training Rate

    The industry often uses the “effective training rate” to measure the share of real compute produced by a cluster, defined as the proportion of total runtime spent on effective training. Initialization, checkpointing, fault recovery, and slow-node drag all erode this metric. In large-scale clusters, one or two slow nodes can drag down the entire synchronous training process.

    6.4 Engineering Regression

    Every upgrade of drivers, compilation toolchains, communication libraries, and frameworks may introduce precision changes. It is necessary to establish small-scale benchmarks and numerical-alignment regressions to ensure that “yesterday’s convergence” does not become “today’s non-convergence.”

    7. Industry Observations: Domestic Compute Adaptation Is Accelerating

    Based on public information, adaptation of domestic compute on the large-model training side is clearly accelerating:

    • A GPU vendor disclosed that its thousand-GPU-class cluster has been used for multimodal pre-training and reinforcement learning, with training precision that can be aligned with mainstream international products.
    • A chip vendor disclosed that its products are being adapted to multiple mainstream large-model series and are extending toward thousand-GPU and ten-thousand-GPU clusters.
    • A cloud vendor disclosed that a fully domestic cluster built from its self-developed AI chips supported the training of an important version of its large model, with an effective training rate of about 97%.
    • Another vendor disclosed that its general-purpose GPU products have been adapted to hundreds of mainstream large models, covering more than 99% of non-closed-source models.

    These updates are often disclosed through periodic reports or public briefings and tend to emphasize cluster scale and model coverage breadth. In contrast, this validation separately disclosed training steps, loss curves, and gradient-check details under a cropped configuration. Public engineering details for ultra-large-scale MoE multimodal models are still relatively rare, and their significance lies in moving adaptation progress from a “list-based” statement toward verifiable engineering data.

    A third-party research forecast shows that shipments of high-end AI chips in the Chinese market are expected to reach about 5 million units in 2026, a year-over-year increase of about 83%, with the domestic solution share approaching 90%, including self-developed AI chips from cloud vendors. As demand grows, the supply capability for long-cycle training will become a key test of adaptation effectiveness.

    8. Migration Practice: A Checklist for Developers

    1. Operator layer: Align forward and backward precision for dynamic-shape inputs with reference implementations, and stress-test numerical stability using business data.
    2. Sharding and memory: Check whether memory curves for parameter, gradient, and optimizer-state sharding granularity are controllable and whether there are peak spikes.
    3. Communication layer: Check whether all-to-all communication is balanced, whether cross-node bandwidth utilization is reasonable, and whether communication is sufficiently overlapped with computation.
    4. Numerical guardrails: Ensure gradient clipping, loss scaling, overflow detection, and skipping of non-finite values are in place.
    5. Observability: Include loss, gradient norm, memory usage, step duration, and expert load in monitoring, and establish baselines.
    6. Stability: Perform regular checkpointing, fault-injection drills, and slow-node detection.
    7. Regression: Ensure numerical-alignment baselines remain effective after dependency upgrades.

    9. Conclusion

    This training-pipeline validation shows that domestic GPUs have achieved a closed loop of forward pass, backward pass, sharding, and communication on the critical path of trillion-parameter MoE multimodal models. The loss curves and gradient checks provide engineering data that can be referenced and compared.

    However, between a cropped setup and full-scale training, there are still three gates: cluster scaling, long-running stability, and engineering regression. For developers, the most practical approach is to treat each small-scale pipeline validation as a geological survey: the more solid the foundation, the more reliable the path to ten-thousand-GPU, long-running training.