Training Trillion-Parameter Multimodal LLMs on Domestic GPUs: An FSDP2 Adaptation Practice

    Trillion-parameter multimodal models place systemic demands on the compute stack, from memory capacity and interconnect bandwidth to parallelism strategies and software maturity. This article breaks down how a domestic GPU vendor adapted training for a near-three-trillion-parameter multimodal model using a native fully sharded data parallel (FSDP2-style) path. It covers three critical engineering stages—model loading and parameter sharding, shard scheduling with compute-communication overlap, and gradient synchronization with numerical stability—plus the extra adaptation work required by multimodal pipelines and practical recommendations for teams training large models on domestic compute platforms.

    Training Trillion-Parameter Multimodal LLMs on Domestic GPUs: An FSDP2 Adaptation Practice

    Background: New Challenges for the Compute Foundation

    In recent years, the parameter count of large language models has continued to climb. Flagship open-source models with nearly three trillion parameters have emerged, typically built on Mixture-of-Experts (MoE) architectures with multimodal fusion designs. Training such models is no longer a matter of simply adding more GPUs; it places systemic demands on the compute foundation—memory capacity, interconnect bandwidth, parallelism strategy support, and software stack maturity.

    Take a model with nearly three trillion parameters: even stored in BF16 half precision, the weights alone require several terabytes of memory. Adding optimizer states (such as Adam’s first and second moments, typically twice the weight storage in floating point), gradients, and activations, a single GPU or even a single multi-GPU node is far from sufficient. Therefore, deep adaptation between the distributed training framework and the hardware-software stack becomes the decisive factor in whether an ultra-large model can run on a given compute platform.

    Recently, a domestic GPU vendor announced that, based on its flagship training-and-inference AI compute card and self-developed software stack, it completed training adaptation for this class of trillion-parameter multimodal models, building a native second-generation fully sharded data parallel (FSDP2-style) multimodal training path. This progress is representative for the domestic compute ecosystem. This article uses this type of practice as a blueprint to dissect the key technical stages behind it.

    Why a “Native” Fully Sharded Data Parallel Path Is Needed

    The core idea of fully sharded data parallelism is to shard model parameters, gradients, and optimizer states across all compute devices, so that each device holds only 1/N of the full state. During forward and backward computation, the required shards are temporarily gathered on demand via communication primitives. Compared with traditional data parallelism (where each GPU holds a complete model replica), this approach reduces memory footprint by nearly N times and is the mainstream choice for training ultra-large models.

    The “second generation” semantics evolve this further: fine-grained, per-parameter sharding units replace coarse-grained whole-layer wrapping, and streaming parameter all-gather and gradient reduce-scatter scheduling allow communication and computation to overlap more fully, reducing bubble time.

    “Native” emphasizes that this entire set of sharding, scheduling, and communication logic is not grafted onto the domestic software stack through external patches or compatibility layers, but is natively supported from operator implementations and the communication library to runtime scheduling, tailored to hardware characteristics. This directly determines the ceiling of training efficiency—compatibility-layer solutions often carry hidden losses in kernel performance, communication topology awareness, and memory pool management, which at the trillion-parameter scale amplify into unacceptable throughput degradation.

    Three Critical Stages in Bringing Up the Training Pipeline

    1. Model Loading and Parameter Sharding

    Loading a trillion-parameter model is itself an engineering challenge. The naive approach of “loading the full weights on a single device first, then distributing them” can fail during the loading phase alone due to insufficient memory. The correct approach is lazy loading combined with meta-device initialization: first build the model structure on a meta device and determine the shard ownership of each parameter, then have each compute device read only the shard data it is responsible for directly from distributed storage or a shared file system. This requires the software stack’s tensor abstraction layer to support distributed tensor types and align with checkpoint formats (such as sharded safetensors).

    2. Shard Scheduling and Compute-Communication Overlap

    Multimodal models typically contain heterogeneous modules—vision encoders, language backbones, cross-modal projectors—whose compute density and parameter scale differ significantly. The shard scheduler must be aware of these structural differences, selecting appropriate sharding strategies for different modules (for example, combining expert parallelism for MoE expert layers) and orchestrating the prefetch order: while executing layer i, it issues the all-gather for layer i+1 parameters in advance, hiding communication under computation. An illustrative configuration looks like this:

    1. # Illustrative code: differentiated sharding by module type
    2. for name, module in model.named_modules():
    3. if is_moe_expert(module):
    4. apply_expert_parallel(module, ep_group)
    5. else:
    6. apply_fully_shard(module, mesh=device_mesh)
    7. # Register a prefetch hook to overlap communication with computation
    8. register_prefetch_hook(module, next_modules[name])

    3. Gradient Synchronization and Numerical Stability

    After backpropagation completes, gradient shards on each device must be reduced and redistributed via reduce-scatter. At the trillion-parameter scale, gradient synchronization involves enormous communication volume, and mixed-precision training is sensitive to numerical stability. In practice, this typically requires: gradient bucketing to balance communication granularity against peak memory, gradient accumulation to enlarge the effective batch size, and a global gradient norm check before the optimizer update. The domestic software stack’s communication library must optimize collective communication algorithms for its hardware’s interconnect topology (such as inter-chip links and inter-node networks) to keep this stage from becoming a bottleneck.

    Additional Adaptation Work for Multimodal Training

    Compared with text-only models, multimodal training pipelines must also handle image/video preprocessing, load balancing for variable-length sequences, and combinations of different parallelism strategies across heterogeneous modules. On the data loading side, high-performance decoding and augmentation are needed to prevent data supply from starving the GPUs. On the training side, the vision encoder and language backbone may use different degrees of parallelism, which requires the parallelism framework to support flexible partitioning of multi-dimensional device meshes.

    Practical Recommendations and Best Practices

    For teams planning to train large models on domestic compute platforms, we recommend the following:

    • Start small, scale up: first validate the complete loop of sharding, communication, and checkpoint save/restore with a small-scale model, then gradually scale up;
    • Prioritize observability: integrate general-purpose logging services with monitoring and alerting, and continuously track key metrics such as communication time share, peak memory usage, and MFU (model FLOPs utilization);
    • Checkpoint fault tolerance: ultra-large model training runs are long, so efficient sharded checkpoints and fast failure recovery mechanisms are essential;
    • Operator coverage verification: inventory all operators used by the model in advance, confirm that the software stack provides high-performance implementations for each, and prepare fusion or substitution plans for any missing operators.

    Conclusion

    Completing training adaptation for trillion-parameter multimodal models on domestic compute marks that the domestic AI software-hardware ecosystem now has the foundational capability to host frontier large model training workloads. The core lessons are: take native fully sharded data parallelism as the main line, conduct deep hardware-software co-optimization around the three stages of model loading, shard scheduling, and gradient synchronization, and perform dedicated engineering refinement for the heterogeneity of multimodal scenarios. As the software stack continues to mature, the applicable scenarios for domestic compute in large model training will further expand.