Training Trillion-Parameter Multimodal Models on Chinese AI Accelerators: Engineering Adaptation Practices

    This article examines the engineering work required to adapt ultra-large open-source multimodal models, including a 2.8-trillion-parameter model, to Chinese AI accelerator clusters. It covers memory and compute constraints, native FSDP2 support, multimodal data pipeline complexity, model loading and weight sharding, shard scheduling, gradient synchronization, fault tolerance, and the value of unified training and inference stacks. It also provides practical recommendations for operator coverage assessment, small-scale validation, numerical precision alignment, communication diagnostics, and observability.

    1. Background: Scaling Open-Source Models Creates Training Adaptation Challenges

    In recent years, the parameter scale of open-source large models has continued to rise, with trillion-parameter and multimodal flagship models emerging. These models place extremely high demands on training infrastructure: they require compute clusters with thousands of accelerator cards, and the underlying hardware and software stacks must provide a complete training path, including efficient operator coverage, stable communication mechanisms, and mature distributed training framework support.

    At the same time, the ecosystem for Chinese AI accelerators has entered a critical stage. Hardware performance matters, but what really determines whether a platform can support large-model training is software stack maturity: whether the operator library is complete, whether compiler optimization is sufficient, whether the communication library supports large-scale collective communication, and whether distributed training strategies are natively available. Recently, a Chinese vendor announced that it had completed training adaptation for a 2.8-trillion-parameter open-source multimodal model, connecting the full path from model loading and shard scheduling to gradient synchronization. This provides a useful sample for observing the ability of domestic compute to support ultra-large-scale training, and the technical path behind it deserves closer analysis.

    2. Core Technical Challenges in Training Adaptation

    2.1 Dual Constraints of the Memory Wall and Compute Wall

    For trillion-parameter models, weight storage alone requires several terabytes of memory in half precision, far exceeding the capacity of a single card or even a single machine. Training also requires additional storage for gradients and optimizer states, multiplying memory demand several times over. This means training must rely on fine-grained sharding strategies that distribute model states, optimizer states, and activations across the entire cluster.

    At the same time, the compute unit architecture of Chinese accelerators differs from mainstream approaches. Operators in the model, such as Flash Attention variants in attention mechanisms, mixture-of-experts routing, and rotary position encoding, all require targeted adaptation and performance tuning. Any missing or low-performance operator can become a training bottleneck.

    2.2 Native Support for Distributed Strategies

    Large-model training generally uses hybrid parallelism, and Fully Sharded Data Parallel (FSDP) is a key component. FSDP2, as a new-generation sharding implementation, improves sharding granularity, communication-computation overlap, and state management compared with earlier versions. Whether an in-house software stack can natively build an FSDP2 training path, rather than running through a compatibility layer, directly determines training efficiency and stability.

    2.3 Engineering Complexity of Multimodal Data Flows

    Multimodal model training involves joint training of a vision encoder and a language model. Data preprocessing, modality alignment, and loss computation are all more complex than in text-only models. The data loading pipeline must ensure balanced sample partitioning and efficient prefetching in a distributed environment, avoiding data supply as a training bottleneck.

    3. Technical Breakdown of the Complete Training Path

    A complete large-model training adaptation usually requires connecting the following four stages:

    1. Model Loading and Weight Sharding

    Weight files for ultra-large models often reach several terabytes. The loading stage needs to support streaming reads, format conversion, and topology-aware initial sharding. Example pseudocode:

    1. # Pseudocode: FSDP2-based model initialization and sharding
    2. model = MultimodalModel.from_pretrained(
    3. checkpoint_path,
    4. dtype=torch.bfloat16,
    5. device_mesh=init_device_mesh("musa", (world_size,))
    6. )
    7. fsdp_model = FSDP2.fully_shard(
    8. model,
    9. sharding_strategy=ShardingStrategy.FULL_SHARD,
    10. cpu_offload=CPUOffloadPolicy(pin_memory=True)
    11. )

    The key is to avoid any single process holding the full weights during sharded initialization; otherwise, memory overflow will occur.

    2. Shard Scheduling and Computation Graph Orchestration

    After sharding is complete, the training framework must decide tensor split dimensions and communication timing based on cluster topology, including intra-node high-speed interconnect such as NVLink-type links and inter-node Ethernet or dedicated networks. Reasonable scheduling allows forward computation, parameter aggregation, backward computation, and gradient reduction to form a pipeline, so communication latency is hidden behind computation.

    3. Gradient Synchronization and Communication Optimization

    Gradient synchronization is the lifeline of training throughput. Common approaches include gradient bucketing to increase communication granularity, overlapping bucket-level communication with backward computation, and supporting bf16 or fp8 compressed communication to reduce bandwidth usage. On Chinese accelerator clusters, these capabilities need to be implemented through an in-house communication library, with topology-aware routing optimization for the network topology.

    4. Fault Tolerance and Checkpoint Resume

    At the scale of thousands of cards, hardware failures are common. The training system must support periodic asynchronous checkpoint saving, automatic recovery of the training state after a failure, and checkpoint saving must not block the main training stream.

    4. Engineering Value of a Unified Training and Inference Architecture

    One notable trend is the unified training and inference design concept: the same accelerator card and software stack can support both large-scale training and efficient inference services. This brings several practical benefits:

    • Operator and kernel reuse: Training and inference share the underlying operator library, reducing duplicate adaptation costs.
    • Precision consistency: Training and inference use a unified numerical computation path, reducing the alignment cost caused by training-inference precision deviation.
    • Elastic resource scheduling: Enterprises can dynamically allocate the same cluster between training and inference tasks based on business peaks and valleys, improving overall utilization.

    For organizations building self-controlled AI infrastructure, the combination of a unified training-and-inference accelerator and a unified software stack can significantly reduce the operational complexity of running multiple technology stacks in parallel.

    5. Practical Recommendations for Developers

    Based on general experience from this type of large-model training adaptation, the following recommendations are useful:

    1. Assess operator coverage first: Before formal training, check the target hardware and software stack’s operator support item by item against the model structure list, and plan custom kernel development for missing operators in advance.
    2. Validate at small scale before scaling up: First verify loss curves and throughput at the scale of tens of cards, confirm numerical correctness, and then expand to more than a thousand cards.
    3. Prioritize numerical precision alignment: Compare intermediate activations layer by layer with a reference implementation to identify sources of precision deviation.
    4. Build gradient synchronization diagnostics: Monitor the share of communication time, bucket size, and computation overlap rate to detect communication bottlenecks in time.
    5. Improve observability: Use logging services and monitoring and alerting capabilities to build observability for training jobs, with real-time detection of memory watermarks, communication latency, and loss anomalies.

    6. Conclusion

    Completing training adaptation for ultra-large open-source models on Chinese AI accelerators marks a key step for domestic software stacks from “capable of inference” to “capable of training.” The technical essence is a combination of native implementation of fully sharded parallelism, a complete operator ecosystem, efficient communication mechanisms, and a stable fault-tolerance system. As such adaptation practices accumulate, developers will be able to conduct large-model R&D on more diverse compute foundations, advancing AI infrastructure toward diversification and self-control. For technical teams, understanding and mastering the engineering methods of this training path has more long-term value than focusing on a single event.