Practice of Adapting Emerging AI Accelerators for Ultra-Large-Scale Multimodal Model Training
This article analyzes the technical practice of adapting an emerging AI accelerator to train a 2.8-trillion-parameter open-source multimodal model. It explores the core challenges of ultra-large model training, including memory walls, communication overhead, and multimodal data complexity. Furthermore, it details the key adaptation points of Fully Sharded Data Parallel (FSDP2), the four stages of the complete training link, and industry implications for building robust AI software ecosystems.
1. Event Background and Technical Significance
Recently, an AI chip vendor completed the training adaptation for a 2.8-trillion-parameter open-source multimodal large model. This adaptation utilized the vendor’s flagship training-and-inference integrated compute card and self-developed heterogeneous computing software stack. It established a native Fully Sharded Data Parallel (FSDP) multimodal training path, connecting the entire training link from model loading and sharding scheduling to gradient synchronization.
This event holds significant meaning in the current computing environment. As large model parameters scale from hundreds of billions to trillions, the supply constraints of relying on a single GPU vendor have become increasingly prominent. Whether emerging AI accelerators can support the complete training of ultra-large models has become a key metric for measuring the maturity of their software ecosystems. Unlike inference adaptation, training adaptation imposes stricter requirements on operator coverage, communication efficiency, memory management, and numerical stability.
2. Core Challenges of Ultra-Large Model Training
2.1 Memory Wall
For a 2.8-trillion-parameter model, even with mixed precision (half-precision for parameters), the weights alone require about 5.6TB of memory, far exceeding the capacity of a single card. Including optimizer states (e.g., Adam’s momentum and second-order moments usually saved in FP32, requiring 8 to 12 times the memory of the parameters) and activations, the total memory demand reaches tens of terabytes. This necessitates multi-dimensional parallel distributed strategies.
2.2 Communication Overhead
Gradient synchronization in data parallelism, activation communication in tensor parallelism, and boundary tensor transfer in pipeline parallelism all consume significant interconnect bandwidth. When accelerators use self-developed interconnect protocols, the optimization quality of the communication library directly determines training throughput.
2.3 Complexity of Multimodal Data Flow
Multimodal training must simultaneously process heterogeneous inputs like text and images. The vast differences in encoder structures and sequence length distributions across modalities impose higher requirements on data loading, preprocessing pipelines, and dynamic batching.
3. Adaptation Key Points of FSDP
The native FSDP2 training path mentioned in the original context deserves close examination. The core ideas of FSDP (Fully Sharded Data Parallel) are:
- Sharding model parameters, gradients, and optimizer states across all compute cards.
- Performing all-gather aggregation of parameters on-demand during forward and backward computation, releasing them immediately after use.
- Reducing memory consumption to approximately 1/N (where N is the number of cards) compared to traditional data parallelism.
Compared to the first generation, FSDP2 typically employs dimension-based sharding (dtensor) with more uniform sharding granularity and better compatibility with compilation optimization paths like torch.compile. Adapting it “natively” on emerging accelerators means re-implementing sharding scheduling, communication primitives, and compute graph capture within the self-developed software stack, rather than a simple port. The engineering effort is illustrated below:
# Illustrative: General pattern of FSDP-style sharding wrappermodel = shard_model(model,sharding_strategy="full_shard", # Fully shard params/gradients/optimizer statesmixed_precision="bf16",backward_prefetch="backward_pre", # Backward prefetch to reduce comm waiting)
The key to a “native” implementation lies in whether all compute kernels (e.g., fused layer normalization, FlashAttention-type operators) are covered by the self-developed backend and whether communication runs over the high-speed self-developed interconnect.
4. Four Stages of the Complete Training Link
4.1 Model Loading: Must support streaming loading and sharded initialization for trillion-parameter models to avoid making CPU memory a bottleneck. A common approach is meta-device initialization followed by sharded materialization.
4.2 Sharding Scheduling: Automatically selects sharding dimensions and communication groups based on network topology (differences between intra-node and inter-node bandwidth). It typically adopts a hierarchical strategy: intra-node tensor parallelism, intra-rack data parallelism, and inter-rack pipeline parallelism.
4.3 Gradient Synchronization: Executes reduce-scatter after backpropagation to complete gradient shard aggregation, scheduled to overlap with all-gather to hide communication latency.
4.4 Fault Tolerance and Recovery: Hardware failures are inevitable in large-scale training. It requires combining asynchronous checkpoint saving and sharded state snapshot mechanisms to keep fault recovery time within the minute level.
5. Implications for the Industry
First, the essence of large model training adaptation is a systematic engineering effort of the software stack. Operator coverage, compiler optimization, communication libraries, and cluster scheduling are all indispensable. Peak hardware compute power is a necessary but not sufficient condition.
Second, the design of chips integrating training and inference is becoming a trend. One software stack serving both workloads can significantly reduce ecosystem maintenance costs.
Third, for enterprises planning to build their own training platforms, key evaluation criteria should include: backend compatibility with mainstream training frameworks, out-of-the-box support for mixed precision and distributed strategies, checkpoint and elastic scaling capabilities, and the completeness of cloud-based supporting systems like object storage, container platforms, and monitoring/alerting systems.
Overall, the breakthrough of emerging computing power in ultra-large model training marks an evolution from “usable” to “user-friendly.” The continuous refinement of the software ecosystem will dictate the pace of this progression.
