Adapting Chinese-Made AI Computing Platforms for Training Ultra-Large Open-Source Models: A Practical Path

    This article outlines the technical steps for training ultra-large open-source models on Chinese-made AI computing platforms. It covers weight loading and format conversion, fully sharded data parallelism, gradient communication, Mixture-of-Experts (MoE) routing, multimodal pipelines, and the stability checks needed to move from adaptation to full-scale training.

    Adapting Chinese-Made AI Computing Platforms for Training Ultra-Large Open-Source Models: A Practical Path

    1. Background: Adaptation Challenges for Ultra-Large Open-Source Models

    The parameter counts of open-source large language models keep growing. Some flagship models now reach trillions of total parameters. Many of these models use a Mixture-of-Experts (MoE) architecture, which activates only a sparse subset of parameters for each input. This keeps compute costs under control while increasing model capacity. However, exponential growth in parameter count also puts heavy pressure on training infrastructure. A single accelerator’s memory can no longer hold the full model, so training depends on large-scale parallelism and close coordination between hardware and software.

    At the same time, more organizations want to train and fine-tune models on integrated training and inference computing platforms developed in China. They do this to reduce their dependence on specific supply chains. A platform like this needs more than raw hardware performance. It also needs a complete software stack, including operator libraries, communication libraries, parallel training frameworks, and debugging tools, so that the full pipeline from model loading to weight output works end to end. This article uses a typical adaptation project for training an ultra-large open-source model as an example and breaks down its key technical steps.

    2. Core Technical Pipeline for Training Adaptation

    2.1 Model Loading and Weight Format Conversion

    Models with trillions of parameters store their weights as sharded files, often totaling several terabytes. The first step in adaptation is to build an efficient loading pipeline:

    • Weight format parsing: Open-source models commonly use the safetensors format. The software stack needs a matching parser and must handle data type mapping, such as conversions between FP8 and BF16.
    • Distributed loading: Weight shards should be loaded directly onto target devices according to the parallel partitioning scheme. This avoids the memory peak caused by gathering all weights first and splitting them afterward. A common approach is for each data-parallel group to read only the shards it owns.
    • Verification: After loading, compare and verify weights layer by layer to confirm that no numerical drift occurred during format conversion.

    2.2 Parameter Sharding with Fully Sharded Data Parallelism

    For models with trillions of parameters, traditional data parallelism, where each device stores a full copy of the model, is no longer feasible. The industry commonly uses Fully Sharded Data Parallelism (FSDP). Newer FSDP implementations shard parameters, gradients, and optimizer states across devices. Full parameters are gathered only temporarily through collective communication during computation.

    The following sketch shows the basic structure:

    1. # Example code: basic structure of fully sharded data parallelism
    2. from distributed import fully_shard # Pseudocode interface
    3. for layer in model.layers:
    4. # Apply sharding to each layer so that its parameters are split across compute devices
    5. fully_shard(layer, mesh=device_mesh)
    6. # Gather parameters on demand before the forward pass, and release them right after computation
    7. # During backpropagation, gradients are also reduced in sharded form

    Compared with earlier implementations, newer FSDP versions typically rely on finer-grained tensor abstractions, such as distributed tensors sharded over a device mesh. This brings two main benefits. First, memory use scales roughly inversely with the number of devices, which makes it possible to train trillion-parameter models on hundreds of accelerators. Second, communication and computation overlap more easily. The collective communication that gathers parameters can start while the previous layer is still computing, which hides communication overhead.

    2.3 Gradient Synchronization and Communication Optimization

    Gradient synchronization is a performance bottleneck in distributed training. During adaptation, focus on the following areas:

    1. Gradient bucketing and overlap: Group gradients into buckets by size. During backpropagation, launch AllReduce or ReduceScatter operations bucket by bucket so that communication and backward computation run as a pipeline.
    2. Mixed-precision strategy: Gradient communication can use lower-precision formats to reduce bandwidth pressure. Keep optimizer master weights in high precision to prevent precision loss from accumulating over long training runs.
    3. Topology-aware scheduling: Intra-node high-speed interconnects and inter-node networks have different bandwidths. Plan parallel group layouts so that high-frequency communication happens mostly within a node.

    2.4 Special Handling for MoE Architectures

    MoE models add another parallelism dimension. Each token is routed to only a few experts during the forward pass. Therefore, the training setup needs the following:

    • Expert parallelism: Distribute different experts across different devices. Tokens are dispatched to experts and results are gathered back through AllToAll communication.
    • Load balancing: Monitor how tokens are distributed across experts during training. Use an auxiliary loss or routing strategy to prevent some experts from being overloaded while others sit idle.
    • Multi-dimensional parallel composition: Real training runs usually combine data, expert, tensor, and pipeline parallelism. The software stack must support flexible device mesh definitions to make this work.

    2.5 Connecting the Multimodal Training Pipeline

    For multimodal use cases, the training pipeline must also handle the differences between data types such as vision and text. Vision encoders and language models have very different computational characteristics. The throughput of the data preprocessing pipeline must match the training pace. Otherwise, accelerators sit idle. Building a native multimodal training path means that every stage, from data loading and feature encoding to joint backpropagation, runs within the same software stack. This avoids data transfer overhead between frameworks.

    3. Training Stability and Efficiency

    After the basic adaptation is complete, the work moves to engineering improvements:

    • Checkpoint and resume: Checkpoints for trillion-parameter models are very large. Use asynchronous, sharded persistence to minimize the blocking effect of saving on training. Support fast recovery by restoring each device’s shard.
    • Fault detection and recovery: Hardware failures are hard to avoid in large clusters. Combine heartbeat detection with loss curve monitoring, such as automatic rollback when a loss spike appears, to increase effective training time.
    • Performance profiling: Use the profiling tools provided by the software stack to locate operator-level hotspots. Optimize matrix multiplication, attention, and communication operators one by one to approach the theoretical compute limit of the hardware.
    • Numerical correctness validation: After adaptation, align the loss curve with a reference implementation over a small number of steps. Confirm that gradient computation and parameter updates are numerically consistent before scaling up to the full training run.

    4. Takeaways for Developers

    This adaptation work shows that training ultra-large open-source models is no longer just a matter of adding more accelerators. It is a systems engineering problem that spans the entire hardware and software stack. Teams that want to train large models on domestic computing platforms should first evaluate three things: how deeply the software stack supports mainstream parallel frameworks, the real bandwidth of the collective communication library on the target interconnect topology, and the end-to-end throughput of the multimodal data pipeline. Cloud-based general-purpose container platforms, object storage, and monitoring and alerting services can help teams set up elastic training clusters quickly and reduce operational overhead. As the software ecosystem for domestic computing platforms continues to improve, the barrier to training frontier models on these platforms keeps getting lower.