Engineering Practices for Adapting AI Accelerators to Ultra-Large-Scale Model Training

    As large language models scale toward trillions of parameters, underlying computing infrastructure faces unprecedented challenges. This article details the engineering practices of adapting AI accelerator cards for training a nearly 3-trillion-parameter open-source model. It covers the critical differences between training and inference adaptation, the implementation of native FSDP for multi-modal training, cross-node stability verification across a dual-node 16-GPU setup, and the progression toward an out-of-the-box training ecosystem.

    Engineering Practices for Adapting AI Accelerators to Ultra-Large-Scale Model Training

    As the parameter scale of large language models surges from hundreds of billions to trillions, the support capabilities of underlying computing infrastructure are facing unprecedented tests. Recently, an AI accelerator team successfully completed the training adaptation of a nearly 3-trillion-parameter open-source model using their self-developed flagship training-inference integrated accelerator cards and a general computing software stack. This breakthrough not only marks the deep application of emerging AI computing power in complex large model scenarios but also reveals a technical evolution path from “inference adaptation” to “full-link stable training.”

    1. Training Adaptation vs. Inference Adaptation

    Before delving into technical details, it is essential to clarify the fundamental difference between “training adaptation” and what the industry commonly refers to as “Day 0 inference adaptation.” Inference adaptation primarily focuses on operator verification and performance optimization during the forward propagation process to ensure the model outputs prediction results normally. In contrast, training adaptation requires the underlying hardware and software stack to fully support gradient computation during backward propagation, optimizer state updates, and data synchronization across multiple nodes.

    For instance, a recent technical report from a well-known open-source large model concurrently verified the inference capabilities of NPUs and GPUs from different vendors. Industry consensus suggests that such verifications remain at the inference operator level and do not involve the full-link computing power support required for base model pre-training. True training adaptation means that the chip must not only “compute” but also “remain stable” during large-scale iterative optimization, which imposes extremely high demands on the chip’s memory bandwidth, inter-chip interconnect bandwidth, and the distributed scheduling capabilities of the software stack.

    2. Building a Native FSDP Multi-modal Training Path

    For an ultra-large model with nearly 3 trillion parameters, the memory of a single accelerator card cannot accommodate the complete model parameters, gradients, and optimizer states. Therefore, constructing an efficient distributed training path became the primary task. This adaptation work built a native FSDP (Fully Sharded Data Parallel) multi-modal training path, successfully streamlining the entire link from model loading and shard scheduling to gradient synchronization.

    The core idea of FSDP is to shard the model’s parameters, gradients, and optimizer states within the data parallel group, with each accelerator card holding only a portion of the states. During forward and backward propagation calculations, required parameters are dynamically gathered using efficient collective communication primitives (such as AllGather). After computation, gradients are synchronized and averaged using ReduceScatter. This mechanism significantly reduces the peak memory pressure on a single card.

    In engineering implementation, the model loading phase typically requires integration with distributed file systems and object storage services to ensure efficient reading of massive weight data. Shard scheduling relies on the close cooperation of container platforms and scheduling frameworks to ensure consistency among training processes when allocating computing resources. By streamlining these phases, the underlying computing stack achieved the leap from “rapid inference deployment” to “full-link stable training” for cutting-edge complex multi-modal large models.

    3. Cross-node Joint Training Stability Verification on Dual-node 16-Card Setup

    The implementation of a theoretical framework must pass rigorous practical testing. In recent technical experiments, the team utilized a total of 16 flagship accelerator cards across two nodes to complete cross-node joint training tests. The results showed that all 16 training processes completed 400 continuous optimizer updates, with the loss and gradient norms remaining finite throughout, without any numerical overflow or abnormal interruptions.

    This result holds significant technical meaning:

    1. Numerical Stability Control: In ultra-large-scale training, mixed-precision computation (FP16/BF16) can easily lead to numerical overflow (such as NaN or Inf). The finite loss and gradient norms throughout the process indicate that the underlying operators possess robust numerical scaling and anti-overflow mechanisms during floating-point computation, and that the loss scaling strategy is reasonably configured.
    2. Cross-node Communication Reliability: Joint training across 16 cards on two nodes relies on cross-node network communication (such as RoCE or InfiniBand). 400 continuous steps without interruption verify the low latency and high reliability of collective communication operators like AllReduce in cross-node environments, demonstrating that network congestion control and topology-aware scheduling mechanisms are functioning well.
    3. Memory and Resource Management: Long-term stable operation means that memory fragmentation is effectively controlled, and no OOM (Out of Memory) errors occur. This is inseparable from the fine-grained management of the memory pool by the underlying software stack.

    4. Engineering System: Moving from “Capable of Training” to “Out-of-the-Box Training”

    The success of a single experiment is just the starting point; building a mature engineering system is the key to empowering the industry with computing infrastructure. Drawing on practical experience from large-scale AI computing platforms, such as Baidu AI Cloud, a comprehensive training engineering system should encompass the following core dimensions:

    1. Efficiency of Operator Adaptation: Facing evolving model architectures, the operator library needs rapid expansion capabilities. Through graph compilation technology and automatic operator generation tools, the cost of integrating new models can be reduced.
    2. Robustness of Multi-card and Multi-node Collaboration: In clusters of thousands or even tens of thousands of cards, hardware failures are the norm. The engineering system must possess comprehensive fault-tolerance mechanisms, such as real-time monitoring and alerting systems combined with distributed snapshots for checkpoint resumption, minimizing training interruption time caused by failures.
    3. Completeness of Automated Toolchains: Providing full-lifecycle tools covering environment construction, data preprocessing, task distribution, and performance tuning. Developers do not need to worry about underlying communication topologies and memory sharding details; they can launch large-scale training tasks simply through configuration files.

    In terms of large-scale training practice, the industry has witnessed the landing of multiple achievements where AI computing power trained AI large models. This includes not only completing the full training of a hundred-billion-parameter scientific base model from scratch but also supporting the full-stack native training of the world’s first 5D world model and the full-process training of embodied brain models. These practices fully verify the potential of full-function GPUs in complex scientific computing and embodied intelligence.

    5. Conclusion and Outlook

    Training adaptation for ultra-large-scale models is a systematic engineering endeavor involving the deep integration of underlying chip architecture, software stack optimization, distributed communication networks, and upper-layer framework collaboration. The success of this nearly 3-trillion-parameter model training adaptation proves that these AI accelerator cards possess solid capabilities in streamlining the complete training link and ensuring cross-node multi-card collaboration stability.

    Moving forward, as model parameters continue to push toward the trillion-level, the underlying computing stack will continue to refine its complete capabilities from operator adaptation and multi-card collaboration to automated toolchains. Leveraging the general capabilities of cloud-native AI infrastructure, such as the elastic computing scheduling and high-availability storage support provided by Baidu AI Cloud, the industry will accelerate the transition of cutting-edge large models on full-function GPUs from “capable of training” to “out-of-the-box training,” further lowering the engineering threshold for developers and unleashing the industrial value of large model technology.