Training a 2.8T-Parameter Open Model on Domestic AI Compute: A Practical Adaptation Path
This article examines a practical adaptation path for training a 2.8-trillion-parameter open-source model on domestic AI compute. It outlines the memory, communication, and stability challenges of ultra-large training; explains why fully sharded data parallelism is a mainstream choice; details the model loading, shard scheduling, and gradient synchronization stages; and discusses the added complexity of multimodal training plus practical lessons for hardware-software co-design.
Training Ultra-Large Models: From Challenges to Implementation
Recently, a 2.8-trillion-parameter open-source flagship model completed training adaptation. The more important point is not the model itself, but the technical path validated behind it: using a domestic flagship AI training-and-inference integrated intelligent compute accelerator card and its accompanying unified compute software stack to build a complete training pipeline from model loading and shard scheduling to gradient synchronization. This provides a valuable engineering reference for the industry as it explores how to run ultra-large model training on domestic AI compute.
1. Core Challenges of Ultra-Large Model Training
What does 2.8 trillion parameters mean? With common half-precision storage and computation, the model weights alone require several terabytes of memory, far beyond what a single card or even a single machine can hold. During training, optimizer states, gradients, and activations must also be stored, so actual memory demand is several times the size of the weights themselves. This creates three major challenges:
- Memory wall: Single-card memory capacity is limited, so model states must be partitioned across multiple devices.
- Communication wall: Sharded data must be synchronized frequently across devices, and communication overhead can consume the gains from computation.
- Stability wall: Training cycles last weeks or even months, and any single-point failure or numerical anomaly can invalidate prior work.
Running ultra-large model training successfully requires solving all three problems at the same time; none can be omitted.
2. Why Fully Sharded Data Parallelism Became a Mainstream Choice
The approach widely adopted by the industry today is fully sharded data parallelism (FSDP-style). Its core idea is to shard model parameters, gradients, and optimizer states, temporarily gather them onto the current device on demand before computation, and release them immediately after computation. This minimizes peak memory usage.
Compared with traditional data parallelism or simple pipeline parallelism, the fully sharded approach offers these advantages:
- High memory efficiency: Optimizer states and gradients are evenly distributed across devices, significantly raising the upper limit on parameter scale.
- Good scalability: Devices are organized in a data-parallel manner, so scaling out does not require rewriting the model structure.
- Natural compatibility with hybrid parallelism: It can be combined with tensor parallelism and pipeline parallelism to form multidimensional hybrid parallel strategies.
In recent years, the approach has continued to evolve in the community. The second-generation implementation further optimizes sharding granularity and communication scheduling, supports fine-grained sharding control for specific layers, and makes complex structures such as multimodal models easier to integrate into training.
3. Three Key Stages in Building a Native Training Path
In this practice, the adaptation team built a native multimodal training path and connected the complete pipeline. It can be understood in three stages:
3.1 Model Loading Stage
Weight files for ultra-large models can reach several terabytes. The core problem at the loading stage is how to complete initialization without filling a single machine’s memory. A common approach is meta initialization: first build the model structure on a virtual device without actually allocating storage, then load weights directly onto target devices according to the sharding strategy. This avoids redundant copies in intermediate states. An illustrative code snippet is shown below:
# Typical flow for meta initialization + sharded loading (illustrative)with torch.device("meta"):model = build_model(config) # Build structure only; no real memory allocatedsharded_model = fully_shard(model, sharding_strategy="full_shard")load_checkpoint_to_shards(sharded_model, ckpt_path) # Write weights directly to shards
3.2 Shard Scheduling Stage
During training, the scheduler must precisely control when to gather and when to release. When forward computation reaches a certain layer, it triggers all-gather for that layer’s parameters; after backward propagation completes, the parameters are released. Scheduling quality directly determines training throughput: gathering too early wastes memory, while gathering too late blocks computation. Mature implementations overlap communication with computation, allowing data transfer and matrix operations to run in parallel and masking most communication time.
3.3 Gradient Synchronization Stage
After backpropagation produces gradients, reduction operations such as reduce-scatter must be performed across shards to ensure gradient consistency across devices. Key optimizations here include gradient bucketing to increase the granularity of each communication, asynchronous communication overlapped with computation, and communication pruning for sparse update scenarios. In multimodal training, the visual and language branches differ greatly in gradient scale, so sharding strategies also need targeted configuration.
4. Additional Complexity in Multimodal Training
Multimodal models process heterogeneous inputs such as text and images at the same time, making the training path more complex than for pure language models:
- Heterogeneous data pipeline: Preprocessing time varies widely across modalities, requiring independent data loading and packing strategies to prevent the data side from becoming a bottleneck.
- Large structural differences: Visual encoders and language decoders differ in parameter scale and activation characteristics, so a uniform sharding granularity may not be appropriate; module-specific configuration is needed.
- Numerical stability: Under mixed-precision training, differences in loss magnitude across modalities can easily trigger gradient anomalies, typically requiring gradient scaling and loss normalization to support convergence.
5. Implications for the Domestic AI Compute Ecosystem
The deeper significance of this adaptation work is that it validates the feasibility of hardware-plus-software-stack co-design. Competition in GPU-class hardware is no longer merely about peak compute; it is about the maturity of the complete software stack: operator coverage, compiler optimization capability, communication library efficiency, and compatibility with mainstream training frameworks. The value of a unified compute software stack is that upper-layer framework code needs to be as little aware as possible of underlying hardware differences, reducing model adaptation cost.
For teams planning to train large models on domestic AI compute, several practical suggestions can be drawn:
- Validate training pipeline integrity first: Start with a smaller model to run the full loading-sharding-synchronization flow, then scale up gradually.
- Prioritize communication optimization: Communication accounts for a high proportion of ultra-large-scale training, so overlap strategies and bucketing configurations deserve repeated tuning.
- Build robust monitoring and fault tolerance: Use monitoring, alerting, logging, and other infrastructure to detect numerical anomalies and hardware failures in time, and use periodic checkpoints to reduce retraining cost.
- Check operator coverage early: Before launching a new model structure, confirm whether high-performance implementations exist for key operators to avoid falling back to slow paths.
Conclusion
Training adaptation for ultra-large open-source models is essentially a stress test of training infrastructure completeness. From model loading and shard scheduling to gradient synchronization, the engineering details of every stage determine whether a training cycle lasting months can run stably to completion. The fact that domestic AI compute can complete adaptation validation at this model scale indicates that the hardware-software co-design path is maturing and provides a practical reference for the industry.
