Training a 2.8T-Parameter Multimodal Model on Domestic AI Compute: A Native FSDP2 Practice Guide

    How do you train a 2.8-trillion-parameter multimodal model when GPU memory, communication bandwidth, and heterogeneous operators all become bottlenecks? This article walks through a real-world adaptation effort on domestic AI accelerators, covering the native FSDP2 multimodal training path, meta-device model loading, dynamic sharding, gradient synchronization, and software-hardware co-optimization techniques.

    Training a 2.8T-Parameter Multimodal Model on Domestic AI Compute: A Native FSDP2 Practice Guide

    As AI technology evolves rapidly, ultra-large-scale multimodal models have become a defining trend in the industry. Recently, the open-source community released a flagship multimodal model with 2.8 trillion parameters. At this scale, traditional single-node training or simple data parallelism is no longer viable, and adapting such models for efficient training on domestic AI compute infrastructure has become a critical challenge for AI infrastructure developers. This article examines how one domestic compute vendor completed the training adaptation of this 2.8T-parameter model using its flagship training-and-inference accelerator and in-house software stack, with a deep dive into building and fully validating a native FSDP2 multimodal training path.

    Core Challenges of Training Ultra-Large Multimodal Models

    At the 2.8-trillion-parameter scale, training faces three core technical challenges:

    1. The memory wall: The model parameters alone (assuming FP16) require roughly 5.6 TB of memory. Adding gradients, optimizer states, and activations, the combined memory footprint far exceeds what even multi-node, multi-GPU clusters typically offer.
    2. Soaring communication overhead: In distributed training across many nodes, gradient synchronization traffic scales with parameter count. If computation cannot effectively overlap communication, GPUs sit idle waiting for communication, sharply reducing resource utilization.
    3. Heterogeneous compute adaptation: Multimodal models combine text, image, and other modalities, resulting in complex computation graphs and diverse low-level operators. Deep co-optimization between hardware architecture and the software stack is required to ensure custom operators run efficiently.

    The Native FSDP2 Multimodal Training Path

    To address these challenges, the team built a multimodal training path based on native FSDP2 (Fully Sharded Data Parallel 2), which represents a fundamental architectural redesign compared to FSDP1.

    FSDP1 shards at the module level: before the forward pass, it uses All-Gather to collect the full parameters of an entire module onto each card, then frees them after computation. This coarse-grained management makes peak memory hard to control for very large models and introduces substantial redundant communication.

    FSDP2 introduces parameter-level sharding, treating every parameter tensor as an independent sharding unit. This fine-grained approach delivers significant advantages:

    • Smoother memory management: Instead of allocating and releasing memory for an entire Module at once, operations happen on demand at the individual Parameter level, dramatically lowering peak memory and enabling larger batch sizes.
    • Compute-communication overlap: Finer-grained dependency control allows the All-Gather for the next layer to be issued while the previous layer is still computing, achieving highly efficient overlap of computation and communication.

    In multimodal settings, FSDP2 can more flexibly handle the differing parameter distribution characteristics of the image encoder, text embedding layers, and cross-modal attention mechanisms, keeping the overall computation graph flowing efficiently.

    Key Steps in Validating the Full Training Pipeline

    With the in-house software stack, adapting a 2.8T-parameter model requires validating the complete pipeline from model loading to gradient synchronization.

    1. Model Loading and Distributed Initialization

    Loading a 2.8T-parameter model directly will exhaust host memory. A common strategy is “on-demand loading with sharded storage.” During initialization, Meta Tensor techniques are widely used: the model is first initialized on the meta device, which records only parameter shapes and dtypes without allocating actual memory. The weights are then loaded in sharded form onto the compute nodes via a distributed file system or object storage.

    1. # Pseudocode: Meta initialization and sharded loading
    2. with torch.device('meta'):
    3. model = GiantMultimodalModel(config)
    4. # Convert Meta Tensors into real tensors and load the shard for this rank
    5. model = load_sharded_state_dict(model, checkpoint_path, rank=local_rank)
    6. model.to(local_device)

    2. Dynamic Sharding Scheduling

    Sharding scheduling is the heart of the FSDP2 path. During the forward pass, each card holds only 1/N of the model parameters (where N is the total number of GPUs). When a layer needs to compute, an All-Gather operation collects that layer’s full parameters from the other cards; once computation finishes, the non-owned shards are immediately freed to reclaim memory.

    During backpropagation, gradient computation is paired with Reduce-Scatter: after each card computes its local gradients, Reduce-Scatter aggregates them and scatters them onto the corresponding parameter shards. This ensures each card stores only the gradients and optimizer states for the parameters it owns, reducing memory usage by a factor of N.

    3. Efficient Gradient Synchronization and Communication Optimization

    In clusters with tens of thousands of cards, gradient synchronization efficiency directly determines training throughput. The native FSDP2 path applies deep optimizations here:

    • Topology-aware communication: Leveraging the underlying network topology (NVLink, PCIe Switch, InfiniBand), hierarchical communication domains are built. High-speed intra-node communication happens first, followed by inter-node aggregation, reducing cross-node communication hops.
    • Gradient bucketing and fusion: Small gradient tensors are merged into larger communication buckets to reduce scheduling overhead. Combined with NCCL or the in-house communication library, asynchronous execution on communication streams ensures gradient synchronization does not block the compute stream.

    Practical Advice for Software-Hardware Co-Optimization

    Getting an ultra-large model to achieve high near-linear scaling on real hardware takes more than framework-level strategies—software and hardware must be co-optimized:

    1. Deep operator library optimization: The in-house software stack should provide custom implementations of core large-model operators such as FlashAttention and RMSNorm, tuned for the underlying hardware architecture (matrix compute units, memory bandwidth), so these high-frequency operators can saturate the hardware’s theoretical peak performance.
    2. Fault tolerance and elastic training: In large clusters, hardware failures are routine. The training pipeline should support periodic automatic checkpointing and fast recovery, automatically evicting failed nodes and rebuilding communication domains to enable resumption from checkpoints within minutes.
    3. Monitoring and profiling: Integrate end-to-end profiling tools that monitor per-card compute utilization (SM occupancy), memory headroom, and communication bandwidth utilization in real time. Analyzing timeline logs makes it easy to locate communication bottlenecks or abnormal operator latency, providing data for further optimization.

    Conclusion

    The successful training adaptation of the 2.8T-parameter multimodal model marks a solid step forward for domestic AI compute in ultra-large-scale model training. By building a native FSDP2 multimodal training path and validating the full pipeline of model loading, sharding scheduling, and gradient synchronization, the effort broke through the memory wall and achieved efficient compute-communication coordination. As model sizes march toward the tens of trillions of parameters, the deep integration and continuous innovation of compute infrastructure and training frameworks will be the core driver of progress toward AGI. Developers working on large-model training should also build a deep understanding of underlying hardware characteristics and distributed training principles, tackling compute bottlenecks from an engineering perspective.