Training a 2.8 Trillion-Parameter Model on Domestic AI Accelerators: A Full Sharding Adaptation Practice
A Chinese GPU vendor has completed training adaptation for a 2.8 trillion-parameter flagship open-source model using its training-and-inference AI accelerator and software stack. This article breaks down the full training pipeline—model loading, parameter sharding and scheduling, gradient synchronization, and multimodal training paths—and covers key adaptation techniques including operator coverage, communication topology, memory management, fault tolerance, and verification methods.
1. Background: Training Challenges at Massive Parameter Scale
As large language models continue to grow, parameter counts have far exceeded what a single accelerator card can hold in memory. Take a 2.8 trillion-parameter model as an example. With standard mixed-precision Adam training, each parameter consumes roughly 16 bytes during training—covering low-precision weights, low-precision gradients, high-precision master weights, and two sets of optimizer states. A rough estimate puts the total training state at around 45 TB, far beyond the capacity of any single card.
As a result, the core challenge of ultra-large model training has shifted from “whether we can compute it at all” to “how to organize parameters, computation, and communication so that cluster resources are fully utilized while numerical correctness is preserved.” Parameter sharding, communication scheduling, and numerical stability together determine whether training can complete successfully.
2. Overview
Recently, a large model team open-sourced a flagship model with 2.8 trillion parameters. A domestic GPU vendor completed training adaptation for this model based on its flagship training-and-inference AI accelerator card and companion software stack. According to public information, the adaptation focused on building a native multimodal training path and establishing a complete training pipeline spanning model loading, shard scheduling, and gradient synchronization.
3. Breaking Down the Full Training Pipeline
3.1 Model Loading
An ultra-large model cannot be fully loaded into every process, or host memory would be exhausted almost immediately. The common approach is to first construct the model structure on a meta device, which records only tensor shapes and data types without allocating real storage or GPU memory. Then, according to the sharding plan, each shard’s weights are read from storage onto its designated device.
Checkpoints must also be stored per shard. Each shard saves its own parameters and optimizer states, along with layout metadata. During recovery, all devices read their own shards in parallel, so loading speed scales linearly with the number of devices while avoiding a single-point read bottleneck.
3.2 Parameter Sharding and Scheduling
The core idea of Fully Sharded Data Parallel (FSDP) is that each device holds only a fraction of the parameters, gradients, and optimizer states. Training a model layer proceeds as follows:
- Before the forward pass, an all-gather operation temporarily assembles the full parameters for that layer;
- After computation completes, non-local shards are released immediately to reduce peak memory usage;
- During the backward pass, parameters are gathered again, gradients are computed, and a reduce-scatter splits the gradients back across devices.
Scheduling efficiency depends heavily on the prefetch strategy. While computing layer i, the system should asynchronously prefetch layer i+1’s parameters so that communication latency is overlapped with computation. A larger prefetch window hides communication more effectively, but raises peak memory usage—so the two must be balanced.
Here is pseudocode for a single forward layer, illustrating the scheduling order:
# Pseudocode: single-layer flow in fully sharded forwardfor layer in model.layers:full_params = all_gather(local_shards[layer]) # Temporarily assemble full parametersoutput = forward(layer, full_params, x)release(full_params) # Release immediately to lower peak memoryx = output
3.3 Gradient Synchronization
Gradients produced during backpropagation must be summed across devices and re-sharded. Reduce-scatter performs both summation and splitting in one operation, so no device needs to store the full gradient.
Gradient clipping requires a global norm and therefore cannot be computed locally alone. Each device first computes the squared sum of its local shards, an all-reduce then produces the global squared sum, and taking the square root yields the global norm. The communication volume here is small, but if the order is wrong, the clipping result will be biased.
Communication overhead is disproportionately high for small tensors. In practice, multiple small gradients are packed into a single communication bucket to reduce the number of communication launches, while overlapping with backward computation.
3.4 Multimodal Training Path
A multimodal model consists of a vision encoder and a language backbone, which differ significantly in parameter scale, compute density, and sequence length. Shard granularity therefore needs to be designed separately for each, rather than applying a single-modality configuration across the board.
The number of tokens produced by image inputs varies with resolution, causing sequence shapes to change dynamically from batch to batch. Common mitigation techniques include length-based bucketing, sequence packing, and dynamic padding, all aimed at reducing wasted computation. Loss weights across modalities also need calibration; otherwise, gradient scales will interfere with each other, leaving one modality learning noticeably weaker.
4. Key Technical Aspects of the Adaptation
4.1 Operator Coverage and Precision Alignment
The training pipeline depends on a large set of forward and backward operators. The first step of adaptation is to confirm that every operator exists on the new hardware and produces correct results. Fused operators require separate validation of their numerical behavior.
Mixed-precision training must also handle overflow and underflow. Dynamic loss scaling—amplifying the loss when gradients are too small and rolling back automatically when overflow occurs—is a widely used technique for keeping low-precision training stable.
4.2 Communication Topology Design
Intra-node interconnect bandwidth is typically much higher than inter-node network bandwidth. Shard groups should be confined within high-speed interconnect domains whenever possible. For very large clusters, hierarchical sharding can be used: parameters are sharded within nodes, while only necessary replicas or gradients are synchronized across nodes. This significantly reduces cross-node traffic.
4.3 Memory Management
Activations are another major consumer of GPU memory. Activation checkpointing recomputes part of the forward results during the backward pass, trading extra computation for memory savings. Whether to enable it—and which layers to cover—should be decided based on actual memory headroom and compute overhead.
4.4 Fault Tolerance and Recovery
Long-running training inevitably encounters node failures. Periodically saving sharded checkpoints is the baseline measure. During recovery, the shard layout must be validated against the current cluster configuration to prevent parameters from being loaded incorrectly due to layout misalignment.
5. Verification Methodology
Adaptation results must be confirmed through systematic verification—simply getting training to run is not enough. Recommended verification steps:
- Single-step consistency: Fix the random seed and compare losses over the first several steps against a reference implementation; the error should fall within a predefined tolerance.
- Progressive scaling: Start with a small model and a few devices, then gradually increase model size and device count to isolate scale-related issues.
- Resource monitoring: Continuously record peak memory usage, communication time share, and device utilization to identify bottlenecks.
- Long-run stability: Run enough training steps to observe whether loss spikes, gradient overflow, or NaN results appear.
Verification scripts can be structured as follows:
# Pseudocode: single-step consistency checkset_seed(fixed_seed)ref_loss = run_reference(batch)new_loss = run_adapted(batch)assert abs(ref_loss - new_loss) < tolerance
6. Takeaways for Developers
- Build a trusted reference implementation first, then proceed with hardware adaptation, making it easier to localize the source of any discrepancies.
- Sharding strategy should be designed together with hardware topology; tuning either in isolation can introduce new bottlenecks.
- Monitoring must cover all three dimensions—memory, communication, and numerical health—none can be skipped.
- Adaptation results should be backed by reproducible experiment records, documenting hardware, software versions, configurations, and verification results.
7. Limitations and Notes
Public information so far confirms only that the training adaptation has been completed; throughput, scaling efficiency, and other performance metrics have not been disclosed. Readers evaluating actual performance should rely on officially released benchmark data and validate against their own model scale and cluster conditions.
