Validating a Truncated Multimodal MoE Training Pipeline on China-Made GPUs

    This article reports a training-pipeline validation run under a truncated configuration, not pretraining of a full 2.8-trillion-parameter model. It covers the main engineering constraints of multimodal MoE training—dynamic sparse attention memory management and expert-routing All-to-All communication—and describes the selected truncation settings, hybrid operator and FSDP2 sharding work, cross-node communication checks, and 400-step loss and memory observations. It also clarifies which parameters and conditions were not disclosed, so the results should not be extrapolated to full-scale throughput, convergence quality, or scaling efficiency.

    This article discusses a training-pipeline validation run under a truncated configuration. It is not pretraining of the full 2.8-trillion-parameter model. Readers should first understand this boundary before looking at the engineering details and data that follow.

    1. Main Challenges of Trillion-Scale Multimodal MoE Training

    A native multimodal model typically requires a vision tower, a language backbone, and a cross-modal projection module to work together. When the language backbone is replaced with a MoE architecture, system complexity increases significantly in two main areas.

    First, dynamic sparse attention places high demands on memory management. When a standard Transformer processes long sequences, the memory footprint of the attention matrix grows quadratically with sequence length. Dynamic sparse attention reduces this pressure by allocating compute resources on demand, but it requires the underlying hardware to allocate and reclaim memory flexibly. When memory fragmentation is severe or the allocation strategy is unreasonable, peak memory usage can rise abruptly and trigger OOM (out-of-memory) errors.

    Second, expert routing introduces high-frequency multi-GPU communication. The core of MoE is sparse activation: in each layer, only some experts process the current tokens. Tokens need to be passed between GPUs according to routing results, forming All-to-All communication. This communication is sensitive to bandwidth and latency. If communication is not optimized, compute units will sit idle for long periods, and overall training efficiency will decline.

    2. Truncated Configuration and Boundaries of This Validation

    Full training requires substantial compute and time, so the team used a truncated configuration. The goal was to retain MoE sparse routing characteristics and multimodal fusion logic while controlling memory and communication pressure, and first validate whether the training function was complete.

    The main adjustments in this configuration were as follows:

    • The language backbone was truncated to 13 layers, configured with 16 routing experts and a Top-8 activation strategy. In each layer, 8 out of 16 experts, or 50%, participate in computation, which can simulate the load of token routing and All-to-All communication.
    • The vision branch retained the full 27-layer vision tower and cross-modal projection module to test the numerical logic of cross-modal fusion.
    • Training used the MedPix-VQA image-text dataset, and the model was trained from random initialization to observe early alignment between visual and textual features.

    The table below compares publicly available information with undisclosed information:

    Item 2.8T full model (original report) This truncated validation
    Total parameters 2.8 trillion Undisclosed
    Language backbone layers Undisclosed 13 layers
    Routing experts and activation strategy Undisclosed 16 experts, Top-8
    Vision branch Undisclosed 27-layer full vision tower
    Training data Undisclosed MedPix-VQA, random initialization

    Public materials did not provide the truncated total parameter count, activated parameter count, sequence length, micro batch, gradient accumulation steps, or numerical precision. Therefore, this configuration cannot be converted to the scale of the 2.8-trillion-parameter full model. This validation shows that the training functional pipeline has been connected, but it cannot be used to infer full-scale throughput, convergence quality, or scaling efficiency.

    3. Bringing Up the Distributed Training Pipeline

    The focus of this adaptation was to make the distributed training pipeline run end to end, not to pursue peak single-GPU compute. The work concentrated on two areas: operator completion and distributed state management.

    1. Forward and backward implementations of hybrid operators: For dynamic sparse attention and MoE expert routing, the team completed the forward computation and backward gradient logic of the relevant operators on China-made GPUs. The operators needed to ensure computational precision and support automatic differentiation, so that gradients could be correctly propagated back to parameters in each layer.

    2. Sharding management based on FSDP2: To alleviate memory pressure caused by very large parameter counts, the training script uses Fully Sharded Data Parallel (FSDP2). It shards parameters, gradients, and optimizer states within the data parallel group, gathers required parameters on demand via All-Gather during computation, and releases them immediately after computation. The following code shows a typical FSDP2 pattern:

    1. import os
    2. import torch
    3. import torch.distributed as dist
    4. from torch.distributed.fsdp import fully_shard, MixedPrecisionPolicy
    5. # 1. Initialize the process group; replace the backend name with the vendor SDK equivalent
    6. dist.init_process_group(backend="nccl")
    7. local_rank = int(os.environ["LOCAL_RANK"])
    8. torch.cuda.set_device(local_rank) # For China-made GPUs, use the vendor-provided device interface
    9. device = torch.device("cuda", local_rank)
    10. # 2. Build the model
    11. model = MultimodalMoEModel(config).to(device)
    12. # 3. Mixed precision: parameters participate in computation in bf16, gradients are reduced in fp32
    13. mp_policy = MixedPrecisionPolicy(
    14. param_dtype=torch.bfloat16,
    15. reduce_dtype=torch.float32,
    16. )
    17. # 4. Shard layer by layer first, then shard the root module
    18. # layers is an example attribute name; replace it with the actual model structure
    19. for block in model.language_model.layers:
    20. fully_shard(block, mp_policy=mp_policy)
    21. fully_shard(model, mp_policy=mp_policy)
    22. # 5. Create the optimizer after sharding is complete
    23. optimizer = torch.optim.AdamW(model.parameters(), lr=2e-4)
    24. accum_steps = 4 # Example value
    25. for step, batch in enumerate(dataloader):
    26. is_last = (step + 1) % accum_steps == 0
    27. # Disable gradient reduction on non-final micro-batches to reduce cross-GPU communication
    28. model.set_requires_gradient_sync(is_last)
    29. loss = model(batch) / accum_steps
    30. loss.backward()
    31. if is_last:
    32. optimizer.step()
    33. optimizer.zero_grad(set_to_none=True)

    The key point in this code is the order: initialize the process group, then shard, then create the optimizer. If the order is reversed, the optimizer may bind to unsharded parameters. This example differs from the FSDP1 pattern in the original report; the original parameter combination is not applicable in FSDP2.

    1. Cross-node communication optimization: The two-machine, 16-GPU configuration spans physical nodes, and inter-node latency directly affects scaling efficiency. The team used a dedicated cross-node communication library to optimize the communication topology paths for All-to-All and All-Reduce and reduce communication blocking. Public materials did not describe the specific optimization methods or provide quantitative before-and-after comparisons. To reproduce or evaluate similar work, you can first check the following:
    • Whether measured inter-node bandwidth is close to the NIC’s nominal value.
    • Whether the binding between each compute GPU and its corresponding NIC is reasonable.
    • The proportion of All-to-All time in single-step time, and how that proportion changes with the number of steps.
    • Whether communication timeouts and retries appear in the logs.

    4. Convergence Trend and Memory Data

    Training ran for 400 consecutive steps without numerical overflow or abnormal interruption, indicating that this training pipeline can run stably under the configuration. The specific loss and memory values are as follows:

    Metric Value Disclosed conditions Undisclosed conditions
    Training loss Mean 8.9365 from steps 21 to 70; mean 2.1802 over the last 50 steps Two machines, 16 GPUs, truncated configuration Sequence length, micro batch, gradient accumulation steps, learning rate schedule
    Validation loss Decreased from 6.5297 to 4.6873 Same as above Validation set construction method and sampling scale
    Per-GPU peak memory 44.80 GiB Vision branch participates in parameter updates Sequence length, micro batch, precision format, peak sampling method

    The overall loss decline indicates that model parameters were being updated continuously and that the forward and backward flows were basically connected. However, a loss decline only suggests that the gradient direction is broadly correct; it does not by itself prove that the gradient values of every operator are fully accurate. To confirm operator correctness, per-operator gradient comparison against a reference implementation is still needed.

    The 44.80 GiB peak memory value is an observation from one run. Because conditions such as sequence length and batch size were not disclosed, readers should not directly apply it to other configurations.

    5. Industry Context and Public Information

    Adaptation between domestic chips and large models has progressed quickly recently. Training scenarios have expanded from pretraining to reinforcement learning, and cluster scales are moving toward thousands and tens of thousands of cards.

    According to public reports, Baidu introduced at its Create conference that a fully domestic cluster based on its self-developed AI chip completed training of an important large language model version and reported a high effective training rate. The specific statistical scope should follow official disclosure. Some domestic DCU products have also adapted to multiple mainstream large models, but there is currently no verifiable unified coverage ratio.

    This team disclosed a 400-step loss curve and memory data, along with a description of the training conditions. This kind of disclosure provides a useful reference for developers assessing the actual behavior of domestic hardware.

    6. Risk Notes and Follow-Up Work

    Passing pipeline validation does not mean that convergence quality or performance at full-scale pretraining has met the target. Full-scale training still requires thousand-GPU-level stress testing and long-duration stability validation.

    When evaluating such a solution, readers can ask vendors or R&D teams for the following information: truncated total and activated parameter counts, sequence length and micro batch, gradient accumulation steps, numerical precision, throughput (tokens/s), communication time share, and the sampling method for peak memory. Only with this information can the validation results be mapped to full-scale scenarios.

    Conclusion

    This truncated-configuration training-pipeline validation mainly confirmed that the training function can run continuously, that loss shows a downward trend, and that memory on a single GPU remains within a controllable range. It provides preliminary evidence of technical feasibility for China-made GPUs to carry trillion-parameter multimodal MoE models. To determine whether they can support full-scale pretraining, more complete scale, performance, and stability data are still needed.