Scaling to Trillions: FSDP-Based Distributed Training for 2.8T-Parameter Models on Domestic AI Accelerators

    This article provides an in-depth technical analysis of the training adaptation of a 2.8-trillion-parameter open-source multimodal model on a domestic (non-mainstream) AI accelerator platform. It examines the core engineering challenges of trillion-scale training — including memory walls, communication bottlenecks, and software ecosystem portability — and takes a deep dive into the implementation of a native Fully Sharded Data Parallel (FSDP) training pipeline. The article covers the principles of FSDP and its second-generation improvements, what a "native multimodal training path" entails in practice, and concludes with universal engineering recommendations for teams looking to replicate similar large-scale training workloads on heterogeneous compute platforms.

    Introduction: The Push Toward Domestic Super-Scale Training

    A domestic AI chip vendor recently announced that, using its flagship training/inference integrated accelerator cards and in-house software stack, it successfully adapted a leading open-source model with 2.8 trillion parameters for training. The team built a native Fully Sharded Data Parallel (FSDP) multimodal training pipeline, connecting the entire training path from model loading and parameter sharding, through effective gradient synchronization.

    This is not simply a product announcement. Behind it lies a broader and more universal technical question: As models scale to the trillion-parameter level, how do you achieve efficient, stable, and scalable distributed training on non-mainstream heterogeneous computing platforms? This article looks beyond the specific vendor, focusing instead on the underlying technical practices applicable to any such undertaking.

    The Core Engineering Challenges of Trillion-Parameter Models

    What does a 2.8-trillion-parameter model actually mean in terms of memory? Consider BF16 mixed-precision training, the most common approach today. The model weights alone would occupy roughly 5.6 TB of accelerator memory. When using an Adam-family optimizer, we must also maintain per-parameter first and second moment states (typically in FP32, requiring 8 bytes per parameter), along with a separate master weight copy in FP32. The combined memory footprint per parameter easily exceeds 16 bytes, pushing total memory requirements beyond 40 TB.

    These requirements translate into three major challenges:

    1. The memory wall: No single accelerator or node can hold the complete model state. Parameters, gradients, and optimizer states must be sharded and distributed across hundreds to thousands of devices.
    2. The communication bottleneck: Once sharded, the forward and backward passes require frequent all-gather and reduce-scatter operations to assemble parameters and synchronize gradients across devices. The bandwidth and topology utilization of the collective communication library directly determine training throughput.
    3. Software ecosystem adaptation: Mainstream parallel training frameworks are typically validated on one type of accelerator first. When migrating to a new hardware platform, operator coverage, communication library compatibility, and memory management strategies all become potential barriers.

    FSDP: Principles and Value of Fully Sharded Data Parallelism

    To break through the memory wall, the industry’s standard approach is a ZeRO-style sharding strategy, whose standardized implementation in the PyTorch ecosystem is FSDP (Fully Sharded Data Parallel). The core concept is straightforward: no single accelerator holds the complete model state; instead, all state is evenly sharded across the devices and only temporarily materialized in full through collective communication exactly when needed for computation.

    A typical FSDP forward pass looks like this:

    1. for layer in model.layers:
    2. # 1. all_gather: assemble the complete weights for the current layer
    3. full_params = all_gather(layer.sharded_params)
    4. # 2. Compute locally using the full weights
    5. output = layer.compute(input, full_params)
    6. # 3. Immediately release the non-local shards to free memory
    7. release(full_params)

    The backward pass follows the same principle. After gradients are computed, a reduce-scatter operation reduces and distributes gradients directly to their respective owners, avoiding the need to hold full gradients on any single device. Combined with sharded optimizer states, the memory footprint is reduced from O(N) to O(N/D), where D is the number of sharding devices.

    The second generation of FSDP, commonly referred to as FSDP2, refines the sharding architecture by describing parameter partitioning at the DTensor level. This makes it more natural to compose sharding with other parallel strategies (such as tensor parallelism and pipeline parallelism) and reduces the integration cost for custom training frameworks.

    What a “Native Multimodal Training Path” Actually Means

    A key emphasis of this adaptation is that it is a native multimodal training path, not an after-the-fact compatibility patch. This distinction is meaningful on several levels:

    • Model loading: Trillion-parameter models typically store weights across hundreds of sharded checkpoint files. A proper loader must support lazy, sharded reads — mapping shards directly to target devices as needed — rather than “materializing the full model in CPU memory first, then sharding,” which would cause severe memory spikes and long startup delays.
    • Sharding strategy: Multimodal models typically consist of heterogeneous modules such as a vision encoder, a language backbone, and cross-modal projection layers. The parameter counts and compute densities differ significantly across these modules. A uniform sharding granularity results in load imbalance; the sharding policy must be tailored per module or even per layer.
    • Gradient synchronization path: The entire chain — from gradient computation, to triggering communication primitives, to optimizer updates — needs tight coordination with the communication library, including decisions about gradient precision (e.g., BF16 communication), gradient bucketing, and overlap with computation.

    Achieving an integrated “load → shard → compute → synchronize → update” loop means that every stage of the training pipeline has been end-to-end validated on the target platform, not merely that the model can run a few inference steps.

    Engineering Best Practices for Training/Inference Integrated Architecture

    For teams looking to replicate similar adaptation efforts on their own compute infrastructure, the following practices offer broadly applicable guidance:

    1. Validate operator and communication primitive coverage first. Before launching large-scale training, run correctness alignment tests for every operator class used in the target model (attention, normalization, MoE routing, etc.), and stress-test all_gather, reduce_scatter, and other collective communication primitives to measure achievable bandwidth on your actual hardware topology.

    2. Overlapping communication with computation is critical for throughput. Configure shard wrapping granularity and prefetch strategies carefully so that assembling the next layer’s parameters happens in parallel with computing the current layer. This often produces substantial end-to-end speedups.

    3. Fault tolerance and checkpoint/resume functionality are non-negotiable. Hardware failures are an expected occurrence in thousand-device training runs, not rare exceptions. The ability to asynchronously persist sharded checkpoints and quickly resume training is what determines the cluster’s efficiency and effective training time.

    4. Track convergence quality, not just successful execution. Loss spikes and gradient explosions under mixed-precision training require layer-by-layer investigation. It is advisable to first align the loss curves on a small proxy model before scaling up to the full configuration.

    Conclusion

    The successful training adaptation of a trillion-parameter open-source model on a multi-vendor computing platform marks a significant shift: large-scale training technology is moving from a single-ecosystem monopoly toward reproducible multi-platform execution. The technical fundamentals — sharded parallelism, communication optimization, and end-to-end pipeline validation — are universal methodologies that transcend any specific hardware. For enterprises, this translates into greater flexibility in computing resource selection. For developers, understanding the foundational principles of distributed training paradigms like FSDP offers greater long-term value than mastering the specifics of any single platform.