Distributed Training Adaptation for Ultra-Large Multimodal Models: An FSDP-Based Engineering Practice

    This article uses a recent training adaptation project as a case study to outline a general approach for training ultra-large multimodal models on new compute platforms. It covers the four layers a complete adaptation involves, how Fully Sharded Data Parallel (FSDP) works, the three key stages of a multimodal training pipeline, and a validation method based on alignment, convergence, scaling, and long-duration stability tests.

    1. Background: Training Challenges of Ultra-Large Models

    Recently, a leading large model team in the industry open-sourced a flagship multimodal model with about 2.8 trillion parameters. Models at this scale raise the bar for training infrastructure again. The memory of a single accelerator cannot hold the full model parameters and optimizer states, so traditional data parallelism fails under this memory cost and more thorough sharding strategies are required. In addition, a multimodal model contains heterogeneous substructures, including a vision encoder, a language backbone, and modality alignment modules. Their compute loads are highly unbalanced, which places greater demands on parallel scheduling.

    At the same time, China-made AI compute is maturing quickly. A Chinese GPU vendor adapted this open-source model for training on its flagship accelerator, which supports both training and inference, together with its in-house software stack. The vendor built a native FSDP training path for multimodal models and connected the full pipeline, from model loading and shard scheduling to gradient synchronization. This practice is representative and merits a detailed engineering analysis.

    This article does not evaluate any specific product. Instead, it uses this kind of adaptation work as a case study to outline a general methodology for training ultra-large multimodal models on new compute platforms.

    2. Why Training Adaptation Is a Systems Engineering Task

    Many people assume that “adaptation” simply means getting the model to run. In practice, it involves much more. A complete training adaptation covers at least four layers:

    1. Operator adaptation: Every operator the model uses, including attention variants, normalization, activation functions, and operators related to mixed precision, must have a correct and high-performance implementation on the target software stack. Missing operators need to be implemented, and inefficient operators need fusion optimization.
    2. Parallel strategy adaptation: The sharding semantics of the upper-layer framework (parameter sharding, optimizer state sharding, and gradient reduction) must map onto the underlying communication library and hardware topology. This ensures the correctness and efficiency of collective communication primitives.
    3. Numerical consistency verification: Given the same data and hyperparameters, loss curves and gradient norms on the new platform should stay within acceptable agreement with a reference implementation. This is the core criterion for judging whether the adaptation succeeded.
    4. Stability and fault tolerance: At the scale of 10,000 accelerators, hardware failures are routine. Capabilities such as checkpoint-based resumption, health checks, and removal of slow nodes directly determine the effective training time.

    Only when all four layers work can the process be called “training adaptation complete.” Being usable for inference alone does not meet that standard.

    3. Core Mechanics of FSDP

    Fully sharded data parallelism is the mainstream approach for training very large models. Its core idea is this: rather than having every device hold a full copy of the model, it shards parameters, gradients, and optimizer states across devices, and gathers them only when computation requires it.

    A typical forward and backward pass proceeds as follows:

    1. 1. AllGather: Before computing a layer, collect the full parameters of that layer from all devices
    2. 2. Forward: Run the forward computation with the layer's full parameters
    3. 3. Release: Free the gathered parameters right after computation and keep only the shards
    4. 4. Backward: During backpropagation, AllGather the parameters again and compute gradients
    5. 5. ReduceScatter: Reduce the gradients and reshard them across devices
    6. 6. Optimizer step: Each device updates only the parameter shard it holds

    This design reduces the memory footprint on each device to roughly 1/N of the original, where N is the parallel degree. That makes it possible to train trillion-parameter-scale models. Newer FSDP implementations add finer-grained sharding units (usually defined per layer or per submodule), independent mesh management for parameters and gradients, and deeper integration with mixed-precision policies. These changes further reduce communication peaks and memory fragmentation.

    For multimodal models, FSDP offers a clear advantage. Different sharding and communication policies can be configured separately for the vision encoder and the language backbone, which avoids the load imbalance that a one-size-fits-all approach causes.

    4. Three Key Stages of the Multimodal Training Pipeline

    Based on this adaptation work, the multimodal training pipeline can be broken into three key stages.

    4.1 Model Loading and Weight Conversion

    Open-source model weights are usually released in specific formats, such as sharded safetensors files. Their key names and tensor layouts may not match the training framework’s internal representation. The adaptation work must first implement:

    • Lossless parsing of weight files and on-demand loading, so that the full weights are not read into host memory at once, which could cause an out-of-memory error;
    • Key name mapping and tensor rearrangement, for example, splitting and recombining expert weights in a mixture-of-experts (MoE) structure;
    • Shard-aware loading, in which each device reads and instantiates only the parameter shard it is responsible for. This reduces peak resource usage during loading at the source.

    4.2 Shard Scheduling and Heterogeneous Module Orchestration

    The submodules of a multimodal model differ greatly in their compute characteristics. The vision encoder is compute-intensive but relatively small in parameter count. The language backbone has a very large parameter count and often includes sparse expert layers. A practical approach is to declare sharding policies at module granularity, for example:

    1. vision_encoder → replicated parameters + data parallelism
    2. language_dense → full sharding (parameters / gradients / optimizer states)
    3. moe_experts → full sharding + expert parallelism combined

    During the forward pass, the scheduler must trigger parameter gathering and release at module boundaries. It must also work with activation checkpointing to balance memory use against recomputation cost.

    4.3 Gradient Synchronization and Communication Optimization

    Gradient synchronization accounts for most of the communication cost in distributed training. Common engineering optimizations include:

    • Overlapping communication with computation: Pipeline the gradient reduction for layers that finish backpropagation early with the computation of subsequent layers;
    • Bucketing: Merge the reductions of many small tensors into larger messages to improve network utilization;
    • Low-precision reduction: Use half precision for gradient communication within an acceptable numerical error range, paired with error compensation to preserve convergence;
    • Topology awareness: Organize communication groups in layers, based on the bandwidth difference between high-speed interconnects within a node and the network between nodes.

    When adapting to new hardware, how well the underlying communication library supports these patterns directly sets the ceiling on scaling efficiency.

    5. Validation Methodology for Adaptation

    After the full pipeline is working, systematic validation is still needed:

    1. Small-scale alignment experiments: Run the reference framework and the target platform on dozens of accelerators. Compare intermediate activations and gradients layer by layer to locate the source of numerical deviation;
    2. Convergence validation: Train on a subset of real data for hundreds to thousands of steps, and confirm that the loss decline matches the reference curve;
    3. Scalability testing: Increase the parallel scale step by step, measure throughput as the accelerator count grows, and identify communication bottlenecks;
    4. Long-duration stability testing: Run continuously for several days, and record the failure rate, recovery time, and effective compute utilization.

    6. Conclusion and Outlook

    Training adaptation for ultra-large multimodal models is, at its core, an engineering discipline. It requires coordinating model architecture, parallel algorithms, communication libraries, and hardware design. This practice shows that China-made compute platforms with native full-sharding parallelism and a complete multimodal training path can already support training tasks at the trillion-parameter scale. For developers, understanding FSDP sharding semantics, module orchestration strategies for multimodal models, and systematic validation methods is more valuable over the long term than memorizing the APIs of one platform. This methodology transfers to any new-generation compute platform. As model sizes keep growing, the importance of co-optimizing training systems with software and hardware will only increase.