Trillion-Parameter LLM Training on Domestic AI Accelerators: Adaptation Practices

    This article examines the engineering work required to adapt domestically developed training-and-inference AI accelerators to trillion-parameter open-source LLM training. It covers native FSDP2 sharding, multimodal pipeline integration, model loading and sharded scheduling, gradient synchronization, memory planning, fault tolerance, and performance tuning, and summarizes the implications for the domestic hardware-software stack.

    Trillion-Parameter LLM Training on Domestic AI Accelerators: Adaptation Practices

    1. Background: Training Adaptation Challenges in the Trillion-Parameter Era

    As the parameter scale of open-source large models continues to rise, flagship models with trillions of parameters have already appeared in the industry. These models place unprecedented demands on training infrastructure: the memory capacity of a single accelerator card is far from sufficient to hold a complete model, making efficient cross-card and cross-node parallelism essential. At the same time, the introduction of multimodal inputs makes the pipeline for data preprocessing, feature encoding, and main-model training more complex.

    Against this backdrop, the maturity of domestically developed training-and-inference integrated AI accelerator cards has become a focus of industry attention. Training adaptation is not merely about “getting the model to run”; it requires building a complete, stable, and efficient training chain from model loading and parameter sharding to compute scheduling and gradient synchronization. Only when this chain is fully connected can domestic compute truly support training tasks for frontier large models.

    2. Core Technical Paths for Training Adaptation

    2.1 Native FSDP2 Parallel Strategy

    Fully Sharded Data Parallel (FSDP) is one of the mainstream parallelism paradigms for large-model training. Its core idea is to shard model parameters, gradients, and optimizer states across devices, so that each device holds only a shard and aggregates full parameters on demand through communication primitives during forward and backward computation. As an evolved version, FSDP2 further optimizes memory usage, communication overlap, and parameter management granularity:

    • Finer-grained parameter sharding: reduces temporary memory peaks and lowers memory fragmentation;
    • Communication and computation overlap: prefetches the next layer’s parameters while computing the current layer, hiding communication overhead;
    • Native mixed-precision support: uses low-precision parameter copies for communication, balancing accuracy and bandwidth.

    Using native FSDP2 rather than a third-party wrapper means the software stack must deeply adapt to the accelerator card’s communication libraries and operator implementations. This is also an important indicator of the maturity of a domestic software stack.

    2.2 Connecting the Multimodal Training Pipeline

    Multimodal models usually consist of a vision/audio encoder and a language backbone. Compared with text-only models, their training pipeline involves additional steps:

    1. Decoding and preprocessing of multimodal data, which is usually CPU-intensive and needs to be decoupled from the GPU compute pipeline;
    2. Heterogeneous compute characteristics of the encoder and the backbone, which require differentiated parallelism and memory strategies;
    3. Coordination of loss computation and gradient backpropagation across multiple submodules.

    Adaptation work must ensure that the entire pipeline runs without blocking in a distributed environment, avoiding wasted compute caused by “GPUs waiting for data.”

    2.3 Three Key Stages of the Complete Training Chain

    Model loading stage: The weights of a trillion-parameter model are usually measured in terabytes, so sharded loading must be supported—each process reads and initializes only the parameter shard it is responsible for, avoiding memory explosion caused by full loading. A common approach combines lazy initialization with distributed checkpoint formats.

    Sharded scheduling stage: This determines how parameters, gradients, and optimizer states are partitioned across devices, and whether activations are recomputed (activation checkpointing). The scheduling strategy must balance memory usage and computational overhead, usually combining layer partitioning rules with automatic tuning.

    Gradient synchronization stage: Gradients produced by backpropagation must be reduced across devices. Efficient implementations usually adopt a bucket strategy to merge multiple small tensors for communication and overlap communication with backward computation. They also combine topology-aware communication algorithms to fully utilize intra-node high-speed interconnect and inter-node network bandwidth.

    3. Best Practices in Engineering Deployment

    3.1 Memory Budget and Configuration Planning

    Before starting training, the memory budget should be determined through theoretical estimation and small-scale trial runs: how much is allocated to parameter shards, gradient shards, optimizer states, activations, and communication buffers. For trillion-parameter models, it is advisable to first enable activation recomputation and low-precision optimizer states, then gradually relax constraints to achieve higher throughput.

    3.2 Stability and Fault Tolerance

    Long-cycle training must account for hardware failures and interruption recovery:

    • Periodically save distributed checkpoints, with support for shard-parallel writing and reading;
    • Introduce elastic training mechanisms so that training can automatically scale down and continue after a node goes offline;
    • Use logging services and monitoring alerts to track loss curves, gradient norms, and communication time in real time, enabling rapid anomaly diagnosis.

    3.3 Common Performance Tuning Methods

    Dimension Method Benefit
    Communication Bucketed aggregation, communication-compute overlap Reduces synchronization wait
    Memory Activation recomputation, shard granularity adjustment Supports larger batches
    Data Asynchronous prefetch, parallel decoding Eliminates I/O bottlenecks

    4. Significance and Outlook

    The successful adaptation of domestically developed training-and-inference integrated accelerator cards to trillion-parameter-scale open-source model training validates the feasibility of the domestic hardware-software stack under frontier training workloads. Its significance lies not only in a single model, but also in establishing a reusable methodology: deep adaptation of native parallel strategies, engineering of multimodal pipelines, and standardization of the complete training chain.

    For enterprises and developers, this means more diverse choices when selecting compute for large-model training. In the future, as the software stack continues to evolve in compilation optimization, communication libraries, and fault-tolerance mechanisms, the ability of domestic compute to support training of larger-scale and more complex models deserves continued attention.