Training Ultra-Large Models on Domestic GPUs: Stability Verification and Engineering Approaches
This article explores the technical challenges and engineering paths for training ultra-large models on domestic GPUs. It distinguishes between inference deployment and actual training capabilities, detailing optimization strategies such as FSDP sharding, communication overlap, and mixed precision, while explaining the additional complexities of multimodal training. Furthermore, it outlines the criteria for stability verification (such as the 400-step smoke test) and provides a comprehensive framework for readers to evaluate the maturity and ecosystem compatibility of a training platform.
Why Successful Inference Integration Does Not Equal Successful Training
For a long time, the ecosystem development for domestic AI chips has primarily focused on “Day 0 integration,” which aims to complete inference deployment on target hardware as quickly as possible after a new model is released. The core objective of this work is to ensure that inference operators execute correctly and achieve usable performance.
Training imposes significantly higher demands on both hardware and the software stack, primarily in three aspects. First, the computational content differs. Inference only requires forward computation, whereas training must perform backward differentiation, gradient aggregation, and parameter updates, requiring higher operator coverage, precision consistency, and communication efficiency. Second, the system complexity differs. Training typically requires cross-node coordination, complex parallel strategies, and fault tolerance mechanisms. Third, the validation criteria differ. Training requires observing the changes in loss and gradient norms over long periods; numerical overflow, process hangs, or communication anomalies will directly cause training to fail.
Understanding the Boundaries of Training Adaptation
Training adaptation refers to successfully running the training pipeline of a specific model on target hardware, verifying that model loading, sharding, gradient synchronization, optimizer updates, and numerical checks operate normally. It proves that the hardware platform possesses the technical capability to train such models.
However, it does not equate to completing the base pre-training of that model on the hardware. Base pre-training requires massive computing power, long-duration execution, and deeply optimized scheduling, making it a different tier of engineering activity compared to adaptation verification. Conflating the two will lead readers to overestimate the significance of a single verification.
Similarly, parameter scale figures reported in public news should be treated with caution. Original sources often lack verifiable teams, release dates, framework versions, and test configurations. Therefore, this article treats them only as background for discussion and does not consider the numbers as confirmed conclusions.
The Sharding Logic of FSDP
Traditional Data Parallelism (DP) requires each GPU to store the complete model parameters, gradients, and optimizer states. For models with tens of billions or even trillions of parameters, this memory overhead is unacceptable.
Fully Sharded Data Parallelism (FSDP) works by sharding parameters, gradients, and optimizer states across all participating devices, with each device storing only its own shard. A single training step generally involves the following process:
- Before forward computation, temporarily gather the full parameters needed for the current layer via all-gather.
- After the forward pass, release the parameter shards not belonging to the current device.
- During the backward pass, parameters must be gathered again, as backward computation also relies on the full layer parameters.
- After the backward pass, reduce the gradients to each device’s shard via reduce-scatter.
- The optimizer only updates the shard held by the local device.
Consequently, the memory footprint per GPU decreases from the full model state to approximately 1/N of the model state, where N is the number of participating devices. This estimation only accounts for the sharded parameters, gradients, and optimizer states. Activation values, communication buffers, and temporary tensors still require additional space, meaning the actual memory usage will be higher than the theoretical value.
Communication Overlap, Prefetching, and Mixed Precision
Sharding introduces additional communication overhead, which is typically optimized in three directions in engineering.
First is communication-computation overlap, which involves initiating the parameter gather for the next layer in advance while executing the computation for the current layer, thereby hiding communication latency. Second is hierarchical prefetching, which predicts the parameter shards needed for subsequent layers based on the model structure and schedules them in advance. Third is mixed precision. Forward and backward passes use half-precision computation, while the optimizer retains FP32 master weights to ensure the precision of parameter updates.
Regarding gradient scaling, two formats must be distinguished. FP16 has a smaller dynamic range, and small gradients in the backward pass are prone to underflow, typically requiring dynamic loss scaling. BF16 has the same exponent bits as FP32 and a larger dynamic range, usually eliminating the need for loss scaling. Training paths using BF16 should not default to adding this step unless there is a clear implementation rationale.
Additional Complexities in Multimodal Training
Multimodal large models generally consist of a vision encoder, a language model backbone, and a cross-modal alignment module. The parameter scales, activation shapes, and memory characteristics of these three components differ significantly, requiring the training pipeline to configure different sharding granularities and checkpoint strategies for each.
At the data loading level, the mixing of heterogeneous samples must also be handled. Samples from images, text, and other modalities have varying lengths and computational volumes, and how batches are organized directly impacts throughput and peak memory usage.
When evaluating such training pipelines, it is recommended to record at least the following configurations; otherwise, results will be difficult to reproduce:
- Hardware: GPU model, memory per GPU, number of nodes, number of GPUs, network topology.
- Software: Framework version, operator library version, communication library version.
- Training: Model architecture, batch size, sequence length, optimizer, learning rate schedule.
- Parallelism: Sharding strategy, parallel dimensions, whether CPU or NVMe offload is used.
- Fault tolerance: Checkpoint interval, fault recovery time.
Stability Verification: The Significance and Limitations of 400 Steps
The industry commonly uses a smoke test to check if the training pipeline is basically functional, observing whether the loss changes normally within a limited number of steps, whether the gradient norm is within a reasonable range, and whether NaN or Inf occurs.
Achieving 400 consecutive optimizer updates without abnormal interruptions can demonstrate several things: the numerical pipeline has not exhibited obvious instability within this step count; cross-node collective communication has not experienced deadlocks, timeouts, or data misalignment during this duration; and the gradient norm has not shown persistent drift or spikes. The gradient norm is a sensitive indicator for troubleshooting hidden numerical issues. Even if the loss appears to be decreasing on the surface, anomalies in the gradient norm may foreshadow subtle errors in operator implementation.
The boundaries of this result are equally clear. 400 steps is still considered validation training, covering a very short time scale compared to the hundreds of thousands or millions of steps required for complete pre-training. It cannot be directly extrapolated to represent the stability of a full pre-training run.
When determining success, it is recommended to pre-define the following criteria: the loss is a finite value and shows an overall downward trend; the gradient norm is within a pre-set range; there are no NaN or Inf throughout the entire process; and there are no process hangs or communication timeouts. If any condition is not met, the specific step count and phenomenon should be recorded rather than vaguely marking the test as passed.
Necessary Conditions for an Engineering System
A single successful verification does not equate to platform maturity. Moving from rapid inference deployment to stable training typically requires the following capabilities:
- Operator adaptation and verification tools: Quickly locate missing or inconsistent operators and perform per-operator precision comparisons against reference implementations.
- Fault tolerance and checkpoint resumption: Hardware failures are common in large-scale training, requiring periodic checkpoint saving, support for faulty node isolation, and task restarts.
- Performance profiling tools: Separately tally the time consumed by communication, computation, and memory access to help identify bottlenecks.
- Automated parallelism configuration: Provide feasible parallelization schemes based on model architecture and cluster topology to reduce manual deduction.
Each item should have verifiable metrics, such as checkpoint interval, recovery time after a failure, and the pass rate of operator comparisons. Without these metrics, engineering capabilities are difficult to compare and reproduce.
How to Evaluate a Training Platform
When assessing the training progress of domestic computing power, you can judge from three dimensions:
First is verification depth: whether the platform has completed the full training pipeline, not just inference integration. Second is engineering maturity: whether fault tolerance, performance tuning, and automation tools are complete. Third is ecosystem compatibility: whether mainstream models and frameworks can be integrated with low migration costs.
Based on currently available public information, the most prudent conclusion is: within specific configurations and short-cycle validation ranges, such platforms already possess the technical capability to train certain large models. Whether they can support longer-cycle, larger-scale training still requires more comprehensive test data and reproducible configuration documentation to answer.
