Training a 2.8T-Parameter Multimodal Model on a China-Based GPU Platform: An FSDP2 Adaptation Practice

    This article examines the engineering practice of adapting a 2.8-trillion-parameter open-source multimodal model for training on a China-based GPU vendor’s flagship training-and-inference integrated accelerator card and in-house software stack. It covers the hardware requirements, FSDP2 fully sharded data parallel principles, four key pipeline stages—shard-aware model loading, heterogeneous shard scheduling, overlapped gradient synchronization, and fault tolerance/checkpointing—and the software-stack implications for large-scale distributed training.

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

    An AI company recently open-sourced its flagship multimodal model with 2.8 trillion parameters, drawing broad industry attention to the engineering practices required for training ultra-large-scale models. At the same time, a China-based GPU vendor completed training adaptation for this model based on its flagship AI training-and-inference integrated accelerator card and self-developed software stack. The vendor built a native FSDP2 multimodal training path and connected the full training pipeline from model loading and shard scheduling to gradient synchronization. This progress not only validates the feasibility of supporting trillion-parameter model training with the vendor’s compute platform, but also provides a useful reference for engineering practices in large-scale distributed training.

    Why is training a trillion-parameter model so difficult? First, memory capacity is the initial barrier. In mixed-precision training, for example, 2.8 trillion parameters alone require several terabytes of storage for model weights. Add optimizer states, gradients, and activations, and a single card’s memory is far from sufficient. Cross-node distributed parallelism across hundreds or even thousands of accelerator cards is therefore mandatory. Second, multimodal model inputs are inherently heterogeneous: text tokens, image patches, and audio frames differ significantly in sequence length, compute density, and memory footprint, creating serious challenges for data pipelines and load balancing. Finally, communication overhead, fault recovery, and training stability on ultra-large clusters test the engineering maturity of the training framework and the underlying software stack.

    2. Hardware Foundation: Design Considerations for Training-and-Inference Integrated Accelerators

    Training-and-inference integration is an important design trend for current AI accelerator cards. Unlike pure inference cards or pure training cards, an integrated card must balance high-throughput training compute, large memory capacity, and efficient inference capability.

    For trillion-parameter model training, the core value of a training-and-inference integrated accelerator card is reflected in several areas:

    1. Memory Capacity and Bandwidth
    Memory pressure in large-model training comes mainly from four parts: model parameters, gradients, optimizer states (such as Adam’s first- and second-order moments), and activations from forward computation. With a fully sharded strategy such as FSDP2, each card only needs to hold a 1/N shard of the parameters, so memory usage can decrease approximately linearly. This places relatively friendly requirements on per-card memory capacity, but high-bandwidth memory is still needed to support frequent parameter aggregation operations.

    2. High-Speed Interconnect
    FSDP-style strategies require AllGather operations to collect full parameters before forward and backward computation of each layer, and ReduceScatter operations in the backward phase to synchronize gradients. The communication volume is enormous. Therefore, intra-node card-to-card interconnect and inter-node network bandwidth directly determine scalable training efficiency. Integrated accelerator cards typically provide high-bandwidth point-to-point interconnect interfaces and use high-speed RDMA networks for cross-node communication.

    3. Software Stack Completeness
    Whether hardware performance can be fully exploited depends on how deeply the software stack is compatible with mainstream training frameworks. A mature in-house software stack needs to provide complete components such as operator libraries, communication libraries, and runtime management, while maintaining good adaptation to mainstream deep learning frameworks to reduce model migration costs.

    3. FSDP2: Technical Principles of Fully Sharded Data Parallel

    FSDP (Fully Sharded Data Parallel) is a mainstream parallel paradigm for large-model training. Its core idea is to “shard everything”: model parameters, gradients, and optimizer states are all partitioned across compute cards and temporarily aggregated through communication only when needed.

    As a next-generation implementation of this paradigm, FSDP2 introduces several important improvements over earlier versions:

    1. Explicit Representation Based on Tensor Sharding
    FSDP2 uses distributed tensor abstractions to describe the sharding layout of parameters, making sharding strategies more explicit and composable. Developers can clearly define how each parameter tensor is partitioned across a device mesh, and the framework automatically inserts communication operations accordingly.

    2. More Flexible Parameter Management Granularity
    Early implementations managed sharding at the level of “flattened parameters,” while FSDP2 supports handling parameters at a finer granularity. This makes it easier to achieve more aggressive communication and computation overlap, and easier to combine with memory optimization techniques such as mixed precision and activation recomputation.

    3. Communication Scheduling Optimization
    FSDP2 refactors communication primitives at the low level, and the prefetch mechanism is scheduled more precisely. It can prefetch parameter shards for the next layer while computing the current layer, effectively hiding AllGather communication latency.

    A typical FSDP2 sharding configuration is illustrated below:

    1. # Illustrative pseudocode: FSDP2-style model sharding configuration
    2. from torch.distributed.tensor import Shard
    3. from torch.distributed._tensor import DeviceMesh
    4. # Build a device mesh: 8 nodes x 8 cards = 64-way data parallelism
    5. device_mesh = DeviceMesh("cuda", mesh_shape=(64,), mesh_dim_names=("dp",))
    6. # Apply a fully sharded strategy to each module of the model
    7. for layer in model.layers:
    8. fully_shard(layer, mesh=device_mesh, reshard_after_forward=True)
    9. fully_shard(model, mesh=device_mesh)

    For multimodal models, FSDP2 sharding strategies need to be designed separately for the vision encoder, cross-modal fusion layers, and language backbone. The vision encoder usually has relatively fewer parameters but huge activations, making it suitable for activation recomputation. The language backbone has a massive parameter count and is the main optimization target for sharding strategies.

    4. Four Key Stages of the Multimodal Training Pipeline

    4.1 Model Loading: Shard-Aware Lazy Initialization

    A 2.8-trillion-parameter model cannot be fully instantiated on a single card and then distributed. Instead, lazy initialization (meta device initialization) must be used together with a shard-aware weight loading process: first build the model’s structural skeleton on the meta device, determine the shape and sharding layout of each parameter tensor, and then have each data parallel group read its responsible shard data from distributed storage and place it directly onto the target device. This process avoids any single point holding a complete model replica and keeps the memory peak during loading at the scale of a single shard.

    4.2 Shard Scheduling: Load Balancing for Heterogeneous Computation

    In multimodal training batches, image resolutions and text lengths vary significantly across samples. If batches are split simply by sample count, compute loads across cards will be severely imbalanced, producing a “bucket effect.” In engineering practice, dynamic batching strategies weighted by total tokens or compute volume are commonly used, combined with sequence-dimension parallel splitting (such as context parallelism), so that long-sequence samples can also be evenly distributed. FSDP2 shard scheduling and sequence parallelism can be combined orthogonally to form a multi-dimensional hybrid parallel scheme.

    4.3 Gradient Synchronization: Deep Overlap of Communication and Computation

    During backpropagation, FSDP2 performs ReduceScatter to reduce gradient shards and distribute them to each card. Key methods for optimizing this stage include layered overlap of gradient communication with backward computation (synchronizing the previous layer’s gradients while computing the current layer), gradient bucketing to improve single-communication efficiency, and low-precision gradient communication (such as BF16 gradient reduction) where precision is acceptable. On thousand-card clusters, topology-aware scheduling is also needed to minimize cross-switch communication traffic.

    4.4 Stability Assurance: Fault Tolerance and Checkpoints

    In ultra-large-scale training, hardware failures are the norm rather than the exception. A complete training pipeline must include an asynchronous distributed checkpoint mechanism: each shard writes to persistent storage in parallel to avoid training interruption. Combined with training-state snapshots and automatic recovery workflows, fault loss can be limited to the most recent checkpoint period.

    5. Engineering Significance of Software Stack Adaptation

    Completing this kind of training adaptation on a China-based GPU platform is essentially a comprehensive test of software stack maturity. Operator coverage in the training framework, communication library performance, and memory manager efficiency—any weakness will be amplified at trillion-parameter scale. During adaptation, substantial work is usually required for low-level implementation and tuning of many operators, topology optimization of communication primitives, and deep integration with mainstream training frameworks. From an industry perspective, such practices gradually reduce large-model training’s dependence on a single hardware ecosystem and provide a technical path toward diversified compute supply.

    6. Conclusion and Outlook

    Training adaptation for trillion-parameter multimodal models is a three-way coordination of hardware capability, parallel strategy, and software stack engineering. The fully sharded paradigm represented by FSDP2, through full-dimensional partitioning of parameters, gradients, and optimizer states, combined with fine-grained communication scheduling and shard-aware loading mechanisms, makes training ultra-large-scale models on general-purpose intelligent compute clusters an engineering path that can be implemented in practice. In the future, with the proliferation of mixture-of-experts (MoE) architectures, growing long-context requirements, and deeper hardware-software co-optimization, distributed training technology will continue to evolve. Open, compatible, and reproducible training pipeline design will become an important foundation for the healthy development of the entire AI infrastructure ecosystem.