Practice of Training Adaptation for Ultra-Large Models on a Domestic Full-Function GPU

    This article explores the engineering practices and challenges of adapting ultra-large model training on a Chinese domestic full-function GPU. It distinguishes training adaptation from inference deployment and pre-training, highlights core difficulties such as memory pressure, complex operators, and multi-node communication, and analyzes the value of native parameter sharding. By examining a recent achievement of running a nearly 3-trillion-parameter model stably for hundreds of steps on a dual-node, 16-GPU setup, the article outlines the engineering closed-loop from "runnable" to "trainable" and the capabilities required for the domestic AI computing ecosystem.

    As the parameter scale of large models continues to grow, training tasks are rapidly shifting from single-machine, single-GPU setups to multi-machine, multi-GPU clusters, heterogeneous architectures, and complex parallel strategies. For a Chinese domestic full-function GPU, truly possessing large model training capability requires more than just running inference programs; it demands a complete closed-loop across computational operators, memory management, distributed communication, automatic differentiation, checkpoint recovery, and numerical stability.

    Recently, a Chinese chip manufacturer announced the completion of training adaptation for a flagship model with nearly three trillion parameters, based on its self-developed integrated training and inference compute cards and compatible software stack. This was verified in a dual-node, 16-GPU environment with stable updates over hundreds of consecutive steps. The significance of this progress lies not in merely proving “the model can start,” but in demonstrating that domestic hardware and software systems have begun to possess the engineering foundation required to handle complex model training pipelines.

    1. Training Adaptation is Not Pre-training

    When discussing such achievements, it is first necessary to distinguish between three easily confused concepts.

    1.1 Inference Deployment

    Inference deployment typically refers to loading an already trained model onto target hardware to complete weight reading, operator execution, input/output processing, and service encapsulation. The inference phase generally does not require saving intermediate results for backpropagation or performing gradient calculations, so its requirements for memory capacity, communication modes, and automatic differentiation systems are relatively low.

    1.2 Training Adaptation

    Training adaptation requires the target platform to run complete forward and backward computation processes, supporting loss calculation, gradient generation, gradient synchronization, optimizer updates, and checkpoint saving. For large-scale models, it is further necessary to handle the sharding of parameters, gradients, and optimizer states.

    In other words, training adaptation proves that a specific model architecture and its training code can establish a runnable, convergent, and continuously iterable training pipeline within the target hardware environment.

    1.3 Pre-training from Scratch

    Pre-training from scratch is a higher-level engineering task that typically involves massive data processing, long-term cluster operation, training strategy design, fault recovery, resource scheduling, and the coordination of thousands or more compute cards. The fact that a model has completed adaptation on target hardware does not directly imply that the model was pre-trained on this type of hardware.

    Therefore, when evaluating a training adaptation achievement, focus should be placed on the test scope, number of run steps, parallel scale, whether backpropagation was executed, whether optimizer updates were completed, and numerical stability during training, rather than making excessive inferences based solely on “the model can run.”

    2. Core Difficulties in Ultra-Large Model Training Adaptation

    2.1 Memory Pressure from Parameter Scale

    When model parameters reach hundreds of billions or even trillions, merely saving the weights consumes a massive amount of memory. If gradients, optimizer states, and activations are further considered, a single GPU’s memory usually cannot accommodate the complete training state.

    In actual training, strategies such as data parallelism, tensor parallelism, pipeline parallelism, or parameter sharding are often required to distribute different types of states across multiple compute cards and nodes. The parameter sharding scheme is particularly important because it reduces the scale of the complete state that a single process needs to hold.

    A typical training state can be abstracted as:

    1. Training Memory =
    2. Model Parameters
    3. + Gradients
    4. + Optimizer States
    5. + Forward Activations
    6. + Communication Buffers
    7. + Temporary Compute Space

    If only model parameter loading is resolved without synchronously handling gradients and optimizer states, the model might complete forward inference but cannot enter the stable training phase.

    2.2 Complex Operators and Automatic Differentiation Support

    Large models typically contain components such as attention computation, normalization, gating structures, sparse expert routing, positional encoding, and multimodal input processing. Different operators require not only forward implementation but also a correct backward computation path.

    During the adaptation process, the following issues must be confirmed item by item:

    • Whether the operator has a target hardware implementation;
    • Whether the data types meet training precision requirements;
    • Whether forward and backward results remain consistent;
    • Whether it can execute stably under different input shapes;
    • Whether operator fusion introduces numerical errors;
    • Whether dynamic control flows and sparse routing work correctly.

    For multimodal models, feature alignment issues for text, image, video, or other inputs must also be handled. The tensor shapes, data types, and sequence lengths output by encoders of various modalities may differ, and the training framework must maintain consistency within sharded and parallel environments.

    2.3 Multi-GPU Communication and Cross-Node Collaboration

    The key to dual-node, 16-GPU testing is not just the increase in compute cards, but the verification of cross-node communication links and distributed training mechanisms.

    In synchronous training, each process usually needs to complete the following operations:

    1. Each process reads its responsible parameter shard;
    2. Executes local forward computation;
    3. Completes backpropagation and generates local gradients;
    4. Exchanges or aggregates gradients through collective communication operations;
    5. Executes optimizer updates;
    6. Enters the next iteration.

    Any communication blockage, data inconsistency, or process state mismatch in any link can cause the entire task to stall. Especially when parameter sharding, gradient sharding, and data parallelism exist simultaneously, the communication order must be strictly consistent, otherwise deadlocks or gradient errors are prone to occur.

    Therefore, training adaptation must not only verify the correctness of single-GPU operators but also cover communication stability under single-machine multi-GPU, cross-machine multi-GPU, and different batch sizes and sequence lengths.

    3. Value of Native Parameter Sharding Training Path

    An important technical direction in this adaptation is constructing a native parameter sharding training path. Its core idea is: different processes only retain the parameters, gradients, or optimizer states required for the current stage, perform necessary data aggregation when computation is needed, and then release or re-shard after computation is complete.

    This mechanism primarily brings three benefits:

    Reducing Single-GPU Memory Usage

    After the complete model state is split across multiple processes, a single GPU no longer needs to save all parameters. For ultra-large-scale models, this is the fundamental condition for transitioning from “unable to start” to “can train.”

    Improving Cluster Resource Utilization

    The parameter sharding mechanism can be combined with data parallelism, allowing multiple compute cards to participate in training simultaneously, rather than leaving some devices in a waiting state for extended periods. Reasonable prefetching, release, and communication scheduling can also reduce idle time between computation and communication.

    Supporting More Complex Training Structures

    For multimodal and sparse models, parameter access patterns are often more complex. The native sharding path can establish a unified state management method during model loading, module execution, and optimizer update stages, reducing the cost of subsequently expanding new structures.

    However, parameter sharding is not simply about cutting the model into several pieces. Engineering implementation must also resolve issues like shard indexing, state consistency, communication timing, exception recovery, and checkpoint compatibility. Improper handling of any detail can cause training result deviations or task interruptions.

    4. What Continuous Stable Operation for Hundreds of Steps Means

    Running all training processes to complete hundreds of consecutive optimizer updates in a dual-node, 16-GPU environment is a representative engineering validation.

    Such tests usually require attention to the following metrics:

    Reasonable Loss Curve

    Training loss should vary within a reasonable range, without suddenly becoming infinite, NaN, or violently oscillating. It should be noted that a decrease in loss does not necessarily mean the model is trained correctly, but abnormal loss can usually directly expose problems with data, gradients, or operators.

    Stable Gradient Norm

    The gradient norm can reflect whether backpropagation experiences explosion, vanishing, or abnormal amplification. If the gradient norm continues to overflow, it may indicate problems with mixed-precision scaling, normalization computation, activation functions, or communication aggregation.

    Continuous Optimizer States

    Training not only updates model parameters but also synchronously updates optimizer states such as momentum and second-order statistics. If these states encounter errors during sharding, saving, or recovery, the model may exhibit training stagnation or only show anomalies after a certain number of steps.

    Process Synchronization

    In multi-GPU training, a single process exiting early, inconsistent communication operation order, or a significant drop in the computation speed of a single card can slow down or terminate the entire task. Therefore, continuous operation tests should also monitor process heartbeats, communication latency, memory usage, and device utilization.

    Exception Localization Support

    The value of stability testing is not just proving “no errors occurred,” but also being able to quickly locate the source of the problem when anomalies arise. Comprehensive logs should at least cover data loading, operator execution, communication operations, memory changes, loss changes, and checkpoint states.

    5. Engineering Closed-Loop from “Runnable” to “Trainable”

    A mature large model training adaptation process can usually be divided into the following stages:

    Stage 1: Model Architecture Parsing

    Confirm model configurations, parameter naming, weight formats, input/output definitions, and custom modules. For complex models, data dependencies between modules must also be sorted out.

    Stage 2: Operator Coverage Check

    Establish an operator list and verify the execution results of forward, backward, and different data types item by item. For temporarily unsupported operators, equivalent implementations or necessary computation graph rewrites should be adopted.

    Stage 3: Single-GPU Functional Verification

    Verify the complete training closed-loop on a small-scale model or shortened inputs, including loss calculation, backpropagation, and optimizer updates. The focus of this stage is to discover functional errors.

    Stage 4: Multi-GPU Scaling

    Gradually scale from single-machine multi-GPU to cross-node training, testing parameter sharding, gradient synchronization, data parallelism, and communication stability. Each scaling step should record throughput, communication ratio, and memory changes.

    Stage 5: Long-Term Stability Testing

    Observe loss, gradients, memory, device utilization, and process states through continuous operation for hundreds of steps or longer to confirm that the system does not have issues that are exposed with delay.

    Stage 6: Checkpoint and Recovery Verification

    Training tasks may be interrupted due to node failures, resource reclamation, or manual operations. Therefore, it is necessary to verify whether checkpoints include complete model parameters, optimizer states, random number states, and training progress, and confirm that convergence continues after recovery.

    6. Capabilities to be Strengthened in the Domestic Computing Ecosystem

    Hardware performance is only one part of large model training capability. Factors that truly affect user experience also include compilers, runtimes, communication libraries, automatic differentiation frameworks, debugging tools, and cluster management systems.

    The following directions need to be strengthened in the future:

    • Establish a more complete mainstream operator coverage system;
    • Improve the stability of mixed-precision training;
    • Optimize cross-node collective communication efficiency;
    • Provide observable memory and communication analysis tools;
    • Perfect the automated model conversion and adaptation process;
    • Support richer distributed parallel strategies;
    • Establish a unified fault diagnosis and recovery mechanism;
    • Reduce the cost of migrating models from development environments to production clusters.

    For users, when choosing a training platform, they should not only look at the peak performance of a single card, but comprehensively evaluate software compatibility, cluster scaling capability, task stability, debugging efficiency, and long-term operation and maintenance costs.

    7. Conclusion

    The training adaptation of ultra-large models on a domestic full-function GPU is essentially a systems engineering effort. It requires the underlying chip to have sufficient computing and storage capabilities, and also relies on the software stack to form synergy in operators, compilation, automatic differentiation, parameter sharding, and cross-node communication.

    Completing hundreds of stable optimizer updates consecutively on a dual-node, 16-GPU setup indicates that the relevant platform has moved beyond simple inference compatibility and entered the stage of executing a complete training pipeline. However, moving from training adaptation to large-scale production pre-training still requires continuous verification in cluster scale, long-term operation, fault recovery, data throughput, and automated toolchains.

    In the future, as domestic computing infrastructure continues to improve, the focus of industry competition will gradually shift from “whether it can run models” to “whether it can train models stably, efficiently, and at low cost.” Only by establishing a complete system covering model adaptation, distributed training, performance optimization, and operational support can the large-scale deployment of large models on domestic computing platforms be truly realized.