Adapting Trillion-Parameter Model Training on Full-Function GPUs: A Technical Practice

    This article explores the technical practice of adapting a nearly three-trillion-parameter open-source large language model for training on a full-function GPU. It distinguishes training adaptation from basic inference access, details the implementation of a native FSDP2 multimodal training framework, and validates stability through continuous 16-GPU distributed testing. Furthermore, it highlights the engineering system required to scale from single-point verification to large-scale deployment, emphasizing the industry shift towards an "out-of-the-box" training experience.

    I. Background: A Milestone in Training Adaptation

    Recently, a domestic full-function GPU manufacturer announced the rapid completion of training adaptation for an open-source large language model (LLM) with nearly three trillion parameters, utilizing its flagship AI training and inference card and proprietary software stack. It is important to clarify that this “training adaptation” is not equivalent to the “Day 0 inference access” commonly mentioned in the industry. Successful adaptation or access does not mean the model’s base pre-training was performed on this type of chip. There is a fundamental difference between the two in terms of technical difficulty, engineering investment, and verification depth.

    In general industry practice, the relationship between large models and computing hardware can be divided into three levels:

    • Inference Access Layer: Completes operator coverage and inference framework integration, allowing the model to be deployed and run on the hardware. The barrier to entry is relatively low.
    • Fine-tuning Layer: Supports full or partial parameter training based on existing weights, requiring stable backpropagation and gradient synchronization capabilities.
    • Full-Stack Pre-training Layer: Supports large-scale training from random initialization for weeks or even months, placing extremely high demands on hardware reliability, communication efficiency, fault tolerance, and software stack maturity.

    This adaptation marks the extension of domestic GPU capabilities from the first and second layers into deeper training pipelines, offering significant reference value for the industry.

    II. Core Technical Path: Building a Native Distributed Training Pipeline

    1. Native FSDP2 Multimodal Training Framework

    The core of this adaptation is the construction of a native FSDP2 (Fully Sharded Data Parallel 2) training path. The core idea of FSDP is to shard model parameters, gradients, and optimizer states across data parallel cards, and temporarily aggregate them on-demand during forward and backward calculations, thereby significantly reducing single-card memory usage. For trillion-level parameter models, this approach is almost mandatory because the optimizer states alone (taking the Adam optimizer commonly used in mixed-precision training as an example, where each parameter requires additional storage for first-order moments, second-order moments, and master weights) can be several times larger than the model parameters themselves.

    A simplified schematic of the sharding logic is as follows:

    1. # Schematic pseudo-code of FSDP sharding concept
    2. for layer in model.layers:
    3. shard(layer.parameters) # Shard parameters across cards
    4. all_gather(params) # Temporarily gather during forward pass
    5. forward(layer)
    6. release_gathered(params) # Release after use
    7. reduce_scatter(gradients) # Reduce and scatter gradients during backward pass

    2. Enabling the Complete Training Pipeline

    The adaptation work successfully bridged the complete pipeline from model loading and sharding scheduling to gradient synchronization. Every step in this pipeline presents engineering challenges:

    • Model Loading: The checkpoint files for nearly three trillion parameters are massive, requiring highly efficient multi-stream parallel loading and format conversion capabilities.
    • Sharding Scheduling: Requires a multi-dimensional hybrid strategy combining expert parallelism, pipeline parallelism, tensor parallelism, and data parallelism to rationally partition the computation graph and balance the load across cards.
    • Gradient Synchronization: Cross-node communication bandwidth is the primary bottleneck. It is necessary to mask synchronization overhead through gradient compression, communication-computation overlap, and topology-aware collective communication optimization.
    • Multimodal Support: The training path must be compatible with visual, audio, and other encoders beyond text, placing higher demands on operator coverage.

    III. Stability Verification: The Significance of 400 Continuous Optimizer Updates on Dual-Node 16-GPU

    In the technical verification phase, the experiment used a dual-node setup with a total of 16 accelerator cards to complete cross-node joint training testing. All 16 training processes continuously completed 400 optimizer updates, during which the loss and gradient norms remained finite throughout, with no numerical overflow or abnormal interruptions.

    This seemingly simple metric is actually a comprehensive health check for the training system:

    • Continuous and finite loss decrease: Indicates that the numerical precision pipeline for forward computation, loss calculation, and backward gradient propagation is correct, and the mixed precision strategy (such as bf16 computation with fp32 master weights) is properly configured.
    • Controlled gradient norms: Indicates that the implementation of gradient clipping and reduction distribution is correct, with no gradient explosion or silent numerical overflow.
    • No abnormal interruptions in 16 processes: Indicates that the cross-node collective communication, fault-tolerant heartbeat, and scheduling mechanisms are stable, which is a prerequisite for scaling to larger clusters.

    Only upon passing this basic verification does the subsequent expansion to thousands or even tens of thousands of cards become feasible—the vast majority of failures in large-scale training can be exposed during early small-scale continuous run tests.

    IV. Engineering System: From Single-Point Verification to Scaled Implementation

    Regarding larger-scale training practice, the manufacturer has accumulated multiple results in training domestic models on domestic chips. This includes the complete from-scratch training of a 100-billion-parameter scientific foundation model, full-stack native training of world models, and full-process training support for embodied AI brain models. They are currently advancing trillion-parameter model training with ecosystem partners. These cases collectively demonstrate that training capabilities cannot remain at the level of laboratory demonstrations but must be consolidated into a reusable engineering system, encompassing:

    1. Operator Adaptation Layer: Rapid supplementation and precision alignment verification for new operators appearing in new model structures.
    2. Multi-Card Collaboration Layer: Providing a stable distributed parallel strategy library and automatic partitioning tools to lower the threshold for user tuning.
    3. Automated Toolchain: Including task scheduling, fault detection and automatic recovery, and training metric monitoring to ensure the continuity of long-term training.

    V. Outlook: Moving from “Capable of Training” to “Out-of-the-Box Training”

    Currently, the main contradiction for domestic computing power in the field of large model training has shifted from “whether it can compute” to “how well it can be used.” The future direction of evolution is clear: continuously polish operator coverage and performance, improve automated parallel and tuning tools, and enhance the deterministic performance of software-hardware collaboration. The ultimate goal is to achieve “out-of-the-box training” for frontier large models on domestic full-function GPUs—where users can efficiently carry out training tasks without caring about underlying adaptation details, just like using a mature ecosystem. This process is not only an engineering breakthrough for a single manufacturer but also requires the collaborative maturity of the entire software ecosystem, including frameworks, communications, and compilers, warranting continued attention from the industry.