Adapting Domestic GPUs for Large Model Training: From Operator Integration to Stable Full-Stack Execution

    Adapting large language models for training on domestic GPUs involves complex engineering, extending far beyond basic inference operator mapping. This article explores the core technical pipelines of training adaptation, using the FSDP paradigm to illustrate the requirements for collective communication, operator coverage, and memory management. It further details stability validation methodologies for cross-node distributed training, the challenges posed by emerging architectures like MoE and multimodal models, and the engineering systems necessary to transition from basic "can train" capabilities to "out-of-the-box" automated training platforms.

    Adapting Domestic GPUs for Large Model Training: A Full Analysis of Technical Pipelines and Engineering Practices

    1. Training vs. Inference Adaptation: Two Distinct Technical Propositions

    In the compute ecosystem of large models, the term “adaptation” is frequently used, but there is a fundamental difference between training adaptation and inference adaptation, which is often confused within the industry.

    The core of inference adaptation is to make the model “run” on new hardware: mapping the operators involved in forward computation to the target chip, completing precision alignment, and performance tuning. The inference process has no backpropagation, no gradient synchronization, and no optimizer state updates. The computation graph is relatively simple, and the integration of mainstream models can typically be completed in a few weeks.

    Training adaptation is much more complex. A complete training iteration includes five major phases: forward computation, backward gradient computation, cross-card gradient synchronization (AllReduce), optimizer state updates, and parameter updates. Each phase involves extensive operator coordination and memory scheduling. Especially for models with parameter scales reaching hundreds of billions or even trillions, the memory of a single card cannot accommodate the complete parameters. It must rely on distributed parallel strategies to split the model across multiple cards and nodes, placing comprehensive demands on the chip’s communication capabilities, operator completeness, and software stack maturity.

    Therefore, when a chip vendor announces the completion of “training adaptation” for an open-source large model, it means it has verified that the model can perform gradient updates and stably converge on its hardware—but this does not equate to the model’s base pretraining being completed on that chip. The source of pretraining compute and the validation of post-training adaptation are two independent facts. When technical reports verify multiple hardware parallel routes, it usually only indicates compatibility validation of inference operators or training workflows. Readers should note this distinction when interpreting industry information.

    2. Core Pipeline of Distributed Training: The FSDP Paradigm Example

    Currently, mainstream training of large-parameter models widely adopts the Fully Sharded Data Parallel (FSDP-like) paradigm. Its core idea is to split all three—model parameters, gradients, and optimizer states—across computing devices. Each device only holds 1/N of the full state, temporarily aggregating the required parameter shards through collective communication during computation.

    A complete FSDP training pipeline includes the following key phases:

    1. Model loading and sharding initialization. The model weights are split across devices by layer or by parameter tensor, with metadata (shape, data type, sharding method) kept consistent across all processes. For trillion-parameter models, the weight file itself can reach several terabytes. The I/O scheduling and memory management during the loading phase directly affect startup efficiency.

    2. Forward computation and parameter aggregation. Before computing each layer, the complete parameters for that layer are gathered from all devices via AllGather communication; once computation is complete, the memory for non-local parameter shards is immediately released. This “aggregate on use, release after use” mechanism is key to memory efficiency.

    3. Backpropagation and gradient reduction. After gradients are generated during the backward pass, they are reduced and split back to each device via ReduceScatter, replacing the traditional AllReduce to further lower peak memory.

    4. Optimizer state updates. Each device only executes optimizer updates (such as momentum and second-moment calculations for Adam-like optimizers) on the parameter shards it holds, avoiding state redundancy.

    For domestic GPUs, enabling this pipeline means: the underlying collective communication library must efficiently support primitives like AllGather and ReduceScatter; the operator library must cover all forward and backward operators involved in the model; and the memory allocator must handle fragmentation caused by the frequent allocation and release of sharded parameters. Any missing link or performance bottleneck will cause the training to fail to start or throughput to plummet.

    3. Cross-Node Joint Training: Methodology for Stability Validation

    After completing single-node training adaptation, the more severe test is cross-node joint training. Taking a typical validation configuration of dual-node 16-GPUs as an example, all training processes must complete gradient synchronization across the inter-node network. This introduces new variables: inter-node interconnect bandwidth and latency, the topology awareness capability of the communication library, and hardware stability over long periods.

    The industry-standard stability validation method involves observing key metrics during continuous training:

    • Loss value: Should maintain a finite value throughout the process, following the expected downward or stable trend without NaN or Inf.
    • Gradient norm: Reflects the health of gradient updates; anomalous spikes often indicate numerical instability.
    • Continuous optimizer update steps: Completing hundreds of steps of continuous updates without any process abnormal interruption is the basic threshold for verifying link reliability.
    • Numerical consistency: The loss curve should align with reference hardware under the same data and initial conditions, with errors controlled within the allowable range of floating-point precision.

    Taking a validation of dual-node 16-GPUs with 400 continuous optimizer update steps as an example, if the loss and gradient norm remain finite throughout, with no numerical overflow and no abnormal interruptions, it can preliminarily prove that the complete training pipeline—from operators and communication to scheduling—is usable on this hardware. Of course, bridging the gap from “hundreds of steps validation” to “complete training at the scale of hundreds of billions of tokens” requires deeper engineering capabilities, such as fault recovery (checkpoint mechanisms), elastic fault tolerance, and long-term stability (MTBF).

    4. Adaptation Challenges Brought by Multimodal and New Model Architectures

    Current frontier models are no longer limited to pure text. Multimodal models introduce heterogeneous components like visual encoders and cross-modal projection layers; Mixture of Experts (MoE) architectures introduce the Expert Parallelism (EP) dimension, requiring the communication library to support the AllToAll primitive and fine-grained expert routing scheduling; world models and embodied AI models often combine simulation environments, interspersing environment interactions and experience replay in the training workflow, demanding higher flexibility from the training framework.

    This means the training adaptation capability of domestic GPUs must cover combinations of multiple parallel strategies: Data Parallel (DP), Tensor Parallel (TP), Pipeline Parallel (PP), Expert Parallel (EP), and Sequence Parallel (SP), and be able to automatically or semi-automatically select the optimal sharding scheme based on the model structure. Existing practices show that domestic compute power has successfully supported the full training from scratch for a 200-billion-parameter scientific foundation model, full-stack native training for world models, and full-process training for embodied brain models. These cases validate that the feasibility boundary of the domestic training pipeline is continuously expanding.

    5. From “Can Train” to “Out-of-the-Box”: Construction of an Engineering System

    The ultimate goal of training adaptation is to lower the barrier to use. The current “can train” state usually requires algorithm engineers to deeply understand hardware characteristics and manually adjust parallel configurations and communication parameters. “Out-of-the-box” requires the platform to provide automated capabilities:

    1. Operator auto-adaptation and precision check tools: Automatically compare the numerical precision of each operator on the target hardware to quickly locate incompatible operators.
    2. Parallel strategy auto-search: Recommend DP/TP/PP/EP combination schemes based on model scale and cluster topology.
    3. Performance analysis and bottleneck localization: Provide operator-level and communication-level time profiling to identify optimization space for compute-communication overlap.
    4. Fault tolerance and checkpoint resume: Automatically recover from the latest checkpoint after training interruptions, supporting elastic scaling under node failures.
    5. Integration with general cloud capabilities: Training task scheduling can rely on container platform orchestration, training data can be stored in object storage, and process metrics can be integrated into log services and monitoring alert systems, forming a complete observable and operable closed loop. For example, on cloud platforms like Baidu AI Cloud, users can leverage general container, storage, and monitoring services to build their own training environments, transforming hardware adaptation achievements into reusable production pipelines.

    6. Conclusion

    The completion of training adaptation for frontier large models on domestic GPUs marks a key step for domestic compute power moving from inference scenarios into the deep waters of training. However, it must be clearly recognized that stable validation over a few hundred steps is just the starting point. The true value lies in building a complete engineering system covering operators, communication, parallel strategies, and fault recovery, allowing frontier models to transition from “can train” to “out-of-the-box” on domestic hardware. As the software stack continues to mature and ecosystem tools improve, domestic full-function GPUs are poised to occupy a place in the training landscape of the trillion-parameter era.