Training a 2.8-Trillion-Parameter Model on Domestic AI Accelerators: A Full-Stack Analysis of the FSDP2 Distributed Training Pipeline

    This article provides a technical deep dive into the challenges and engineering solutions involved in adapting a 2.8-trillion-parameter large language model for training on domestic AI accelerators. It examines the core bottlenecks of extreme-scale model training—memory capacity, communication bandwidth, and operational stability—and explains how the FSDP2 (Fully Sharded Data Parallel) framework addresses these issues through dimension-aware sharding and fine-grained memory management. The discussion walks through the full training pipeline, including distributed checkpoint loading, shard scheduling, gradient synchronization, and fault recovery, offering a valuable reference for engineers building large-scale training systems on non-CUDA software stacks.

    Introduction: The New Demands of Extreme-Scale Model Training

    The recent open-sourcing of a flagship large language model with 2.8 trillion parameters has drawn significant attention across the AI industry. The relentless scaling of model parameters has pushed requirements for GPU memory capacity, compute throughput, and communication bandwidth to unprecedented levels. For domestic AI chips, the ability to reliably support the full training lifecycle of such models has become a critical benchmark for the maturity of their software and hardware ecosystems.

    A Chinese GPU manufacturer has reportedly completed training adaptation for this trillion-parameter model using its flagship training-and-inference AI accelerator card and proprietary software stack. The effort established a native FSDP2-based multi-modal training pipeline, covering the entire chain from model loading and shard scheduling to gradient synchronization. This implementation serves as a valuable reference for the domestic AI compute ecosystem. Below, we break down the technical components of this process.

    The Core Bottlenecks of Trillion-Parameter Model Training

    Training models with trillions of parameters presents three primary categories of bottlenecks:

    1. Memory Bottleneck

    In mixed-precision training, the combined memory footprint of model parameters, gradients, and optimizer states (such as momentum and variance) typically requires more than 16× the parameter count in GPU memory. Even with sharding, a 2.8-trillion-parameter model cannot fit complete optimizer states on a single GPU.

    2. Communication Bottleneck

    Data parallelism requires an all-reduce operation on gradients after the backward pass. The larger the model, the more data must be synchronized per training step, making communication frequently the limiting factor for overall cluster efficiency.

    3. Stability Bottleneck

    Training runs lasting weeks or even months are vulnerable to single-point failures that can interrupt the process. Robust checkpointing, fault detection, and automatic recovery mechanisms are therefore essential.

    FSDP2: The Evolution of Fully Sharded Data Parallelism

    FSDP (Fully Sharded Data Parallel) is a widely adopted distributed training strategy. Its core principle is to shard model parameters, gradients, and optimizer states across all computing devices. During forward and backward passes, parameters are temporarily gathered via all-gather operations on demand and released immediately after use, compressing per-GPU memory consumption to approximately 1/N of the original (where N is the parallel degree).

    FSDP2 introduces several key improvements over earlier implementations:

    1. Dimension-Aware Sharding with DTensor

    Instead of flattening parameters into 1D vectors, FSDP2 shards along the original tensor dimensions. This avoids the memory overhead and format-conversion costs associated with materializing full parameter tensors.

    A representative sharding declaration looks like this:

    1. from torch.distributed.tensor import DTensor, Shard, distribute_tensor
    2. # Shard the weight along dimension 0 across all devices
    3. sharded_weight = distribute_tensor(
    4. model.weight, mesh, [Shard(0)]
    5. )

    2. Finer-Grained Memory Management

    FSDP2 supports per-layer and per-module sharding policy configuration. Extremely large tensors—such as embedding layers—can be assigned dedicated sharding granularity, enabling fine-tuned memory optimization.

    3. Decoupling from Heterogeneous Hardware

    Sharding and communication primitives are abstracted through a backend layer that interfaces with specific hardware. This design makes it possible for non-CUDA architectures—such as MUSA-based proprietary software stacks—to integrate natively with FSDP2, which is the technical prerequisite for domestic accelerators to support it.

    Key Components of the Complete Training Pipeline

    To run extreme-scale model training on domestic compute infrastructure, the following four stages must be carefully engineered:

    1. Model Loading

    Large model weight files are typically stored in distributed checkpoint format. Loading must perform sharded reads directly according to the target parallel topology, avoiding the memory spike that results from loading full weights before sharding. In practice, this involves combining object storage with high-throughput cache layers to pull weight files efficiently.

    2. Shard Scheduling

    Sharding and communication orchestration strategies must be designed based on the cluster topology—accounting for differences in inter-GPU and inter-node bandwidth. Common patterns include intra-card replication with fully sharded inter-card communication, combined with hybrid parallelism (data parallel + tensor parallel + pipeline parallel) to minimize cross-node communication volume.

    3. Gradient Synchronization

    During the backward pass, gradients trigger reduce-scatter operations immediately upon computation, overlapping with compute. Optimizer state updates are performed independently on each shard. The communication library must implement collective communication primitives efficiently over proprietary interconnect protocols while ensuring numerical consistency.

    4. Fault Tolerance and Recovery

    Asynchronous or periodic checkpointing, combined with task orchestration platforms, enables automatic removal of failed nodes and restoration of training state, ensuring continuity for long-duration training runs.

    The Significance of a Multi-Modal Training Path

    The emphasis on “multi-modal training paths” indicates that the training framework must support not only text-based autoregressive tasks but also heterogeneous modules such as vision encoders and image-text alignment components. This imposes additional requirements on the software stack: operator coverage across different modalities, dynamic shape input handling, and scheduling of multi-stage data pipelines. Successfully supporting these paths demonstrates that the operator libraries and compilation optimizations in the domestic software stack now cover mainstream training scenarios.

    Conclusion and Outlook

    The successful adaptation of trillion-parameter model training marks a critical step for domestic compute from “inference-capable” to “training-capable.” For developers, several technical trends are worth tracking: the emergence of a unified sharding programming model based on DTensor, the standardization of distributed checkpoints, and scheduling optimizations that deeply fuse communication and computation. As the software ecosystem continues to mature, the engineering barriers to using heterogeneous compute for large-model training will continue to lower, providing a more solid foundation for the broader adoption of large language model technology.