Domestic GPU Training Adaptation and Stable Training Practices for Large Language Models
This article explains how training adaptation on domestic GPUs differs from inference adaptation and base pretraining. It reviews a reported two-node, 16-GPU validation in which 16 training processes completed 400 consecutive optimizer updates without non-finite loss or gradient norms, then breaks down the engineering requirements for stable training: backward operators, numerical control, memory management, collective communication, FSDP2-style sharding, gradient synchronization, checkpointing, fault tolerance, and observability. It also provides practical acceptance criteria and a path from small-scale validation to repeatable training workloads.
Introduction: Running on a Domestic GPU Is Not the Same as Training Stablely
Recently, a China-based GPU vendor announced that it had completed training adaptation for a flagship open-source large model with nearly 3 trillion parameters. The validation used two nodes with 16 accelerators in total for cross-node joint training. All 16 training processes completed 400 consecutive optimizer updates. The loss and gradient norms remained finite throughout, with no numerical overflow or abnormal interruption.
The significance of this result is not simply that another model has been supported. More importantly, it shows that the capability boundary of domestic full-function GPUs is expanding from inference deployment to end-to-end training. However, this kind of announcement is also easy to misread, for example as “domestic chips can already train trillion-parameter large models.” To understand its real significance, it is necessary to first clarify a set of concepts and then examine, from an engineering perspective, why training adaptation is difficult and how it should be verified.
1. Inference Adaptation, Training Adaptation, and Base Pretraining Are Not the Same
When people say “run a new model on new hardware,” they are usually referring to three types of work with different goals, difficulty levels, and acceptance criteria.
| Dimension | Inference adaptation, including “Day 0” support | Training adaptation | Base pretraining |
|---|---|---|---|
| Goal | Load weights and complete forward computation correctly | Establish the full loop of forward, backward, and parameter updates | Train a general-purpose base model from random initialization |
| Main challenges | Operator coverage, precision alignment, throughput, and memory | Backward operators, numerical stability, parallelism and communication, fault tolerance | Large-scale cluster efficiency, failure recovery, and data engineering |
| Computation graph | Forward only | Must save activations and build the backward graph | Same as training adaptation |
| Typical validation | Output comparison, single-GPU or single-node throughput tests | Continuous training for several steps at small or medium scale, with stable numerical behavior throughout | Hundreds to thousands of GPUs, weeks to months, evaluated by loss curves and convergence quality |
| Time scale | Days to weeks | Weeks to months | Months or more, with massive compute investment |
Three conclusions can be drawn from this comparison:
Day 0 adaptation mainly refers to inference.
It means that a new model can be loaded and inferred correctly on the day it is released. This work may look closely coordinated, but it is still fundamentally about forward operators and precision alignment.Training adaptation is harder by an order of magnitude.
It requires backward propagation, mixed precision, cross-GPU and cross-node communication, and long-period fault tolerance. These requirements exercise the underlying capabilities of the software stack.Training adaptation is not the same as base pretraining.
The industry already has a clear consensus on this point. For example, a well-known model technical report placed two mainstream AI accelerator architectures side by side to validate a fine-grained expert parallelism scheme for inference. This is generally understood as inference-side operator validation, not an explanation of the compute source for pretraining.
Similarly, the fact that an open-source large model has been “trained” on domestic chips does not mean that it was pretrained on those chips. Unless the vendor explicitly publishes the hardware composition used for base pretraining, the more accurate statement is “completed training adaptation,” not “a domestic chip trained model X.”
That said, “training adaptation” itself has clear value. It moves domestic chips from “inference only” to “capable of participating in training.” This is a necessary prerequisite for the practice of domestic chips training domestic models to move from isolated cases to routine work.
2. Why Training Adaptation Is Harder Than Inference Adaptation: Five Capability Leaps
1. From “the math is correct” to “every operator needs a backward implementation”
Transformer-like models rely heavily on fused operators, such as attention, normalization, and gated activations. Inference only needs their forward implementations. Training must also provide backward implementations that are numerically correct and have acceptable performance. This involves saving intermediate tensors, recomputation, and redistribution of data.
Take multi-head attention as an example. In inference, KV caching is typically used, and the computation is dominated by a skinny generative decoding step. In training, causal attention is performed over the full sequence in one pass. During the backward phase, the system must recompute attention probabilities and compute gradients with respect to the Query, Key, and Value inputs. The memory access patterns, parallel partitioning strategies, and numerical paths are different from those of inference. If only the inference operators are well implemented, training can easily suffer from memory spikes, sharp drops in throughput, or gradual accumulation of backward errors.
2. From “outputs match” to “numerical behavior is controlled over a long chain”
Inference performs one forward pass, and numerical error is confined to a single output. Training is a long chain of repeated forward, backward, and update steps. A numerical deviation of one part per thousand in a single step can be amplified through gradient accumulation, weight updates, and normalization statistics. The final symptoms may include loss spikes, sudden increases in gradient norm, or even Inf/NaN values.
Mixed precision makes the problem more complicated. BF16 and FP16 are both 16-bit formats. BF16 has the same exponent width as FP32, giving it a larger dynamic range and making overflow less likely, but its mantissa precision is lower. FP16 has more mantissa bits and therefore better precision, but a narrower dynamic range; it often requires loss scaling. If a hardware platform has different internal accumulation precision for certain operators compared with a reference implementation, the discrepancy may only appear in the middle or later stages of training.
3. From “fits on one GPU” to “manage parameters, gradients, states, and activations”
Training memory usage can be approximately expressed as:
Memory ≈ model parameters + gradients + optimizer states + activations + communication buffers and memory fragmentation
For an Adam-like optimizer with the common configuration of FP32 master weights plus FP16/BF16 compute copies, each parameter requires approximately:
- Compute copy and gradients: 2 bytes each;
- Master weights and first/second momentum terms: 4 bytes each; momentum-related terms can be further compressed if 8-bit optimizer states are used;
- Total: about 16 bytes.
Under this estimate:
- A 7B model requires about 112GB for these parts alone;
- A 100B model requires about 1.6TB, far beyond the memory of a single GPU, making sharding mandatory.
In addition, activation memory for Transformer models grows quickly with batch size and sequence length. In practice, selective activation recomputation is commonly used: some intermediate activations are discarded and recomputed during the backward pass, trading compute for memory.
4. From “high single-GPU throughput” to “thousand-GPU scaling”
Training throughput depends on two factors: effective compute utilization on each GPU and scaling efficiency across multiple GPUs and nodes. Besides computation, training involves several collective communication operations:
| Communication primitive | Typical use | Main characteristics |
|---|---|---|
| AllReduce | Gradient synchronization in traditional data parallelism | Reduces results and distributes them to all GPUs |
| AllGather / ReduceScatter | Parameter/gradient sharding and optimizer state sharding | Splits and reassembles data, or reduces and slices it |
| All-to-All | Token dispatch and collection in expert parallelism | High communication volume, prone to load imbalance |
| P2P Send/Recv | Passing activations/gradients between adjacent stages in pipeline parallelism | Sensitive to link latency, prone to pipeline bubbles |
When training crosses nodes, communication must traverse NICs, switches, and RDMA networks. Correct behavior is required at the same time in communication libraries, collective communication algorithms, and topology-aware scheduling.
5. From “a few minutes of benchmarking” to “weeks of uninterrupted reliability”
Inference stress tests are often measured in minutes. Large-scale pretraining, however, runs on hundreds or thousands of GPUs for weeks or even months. During that period, single-GPU failures, node dropouts, slow nodes, and network jitter are almost unavoidable. This imposes three requirements on the training side:
- Framework fault tolerance: Quickly detect, isolate, and recover from failures to reduce rollback losses;
- Fast checkpointing: Save and restore state quickly enough to minimize the cost of failures;
- Observability: Locate issues down to a specific GPU, node, or operator.
3. From Loading to Updating: Four Key Stages of the Training Path
Public information indicates that this training adaptation built a native FSDP2-based multimodal training path, covering model loading, shard scheduling, and gradient synchronization. Each stage can be broken down as follows.
1. Model loading: no longer “write to disk first, then load”
If a very large model is first fully instantiated in a single process and then split, the loading stage may fail because a single GPU does not have enough memory. The native approach is usually to build the model on a Meta device, which stores only shapes and data types as a “skeleton” without allocating real memory, then shard it layer by layer and stream weight shards into place. On domestic chips, this means that weight conversion tools, sharded loading interfaces, and custom operator registration must all correspond correctly.
2. Shard scheduling: compute-communication overlap is the core
A key design principle of FSDP-like approaches is:
- Shard parameters, gradients, and optimizer states at the layer granularity;
- Temporarily AllGather the parameters of a layer only when forward or backward computation reaches that layer, and release them after use.
The first generation is relatively easy to implement: the model structure is relatively flat, and the wrapper unit is basically the same as the actual computation unit. The second generation, FSDP2, moves to per-parameter sharding and treats sharded tensors as first-class citizens. This is better suited to more complex structures, such as:
- Nested modules;
- Expert layers with large differences in parameter tensor dimensions;
- Hybrid parallelism combined with tensor parallelism and pipeline parallelism.
The cost is that the framework scheduler must issue communication at the right time and overlap it with computation. For example, during forward computation of layer N, it can asynchronously prefetch the parameters of layer N+1; during the backward phase, it can prefetch required parameters according to the backward execution order of operators. This places high demands on event synchronization, stream management, and operator launch latency in the communication library. It is also a key variable affecting cross-node scaling efficiency.
3. Gradient synchronization: reduction, clipping, and anomaly skipping
During the backward phase, gradients are reduced with ReduceScatter according to shards and placed on the corresponding rank. Then the global gradient norm is computed across all ranks. This global computation is necessary because the clipping threshold applies to the overall gradient. If each rank clipped only according to its local norm, the effective learning rate would drift depending on how the model was sharded.
# Illustrative pseudocode only; it shows key steps in the training loop and is framework-agnostic.# Launch configuration: 2 nodes x 8 accelerators per node = 16 training processes (world size = 16)for step, batch in enumerate(dataloader):# 1. Forward + backward (FSDP prefetches sharded parameters and reduces gradients in the background)loss = model(batch)loss.backward()# 2. Global gradient norm: computed across all ranks to keep clipping threshold semantics consistentgrad_norm = global_grad_norm(model)# 3. Numerical anomaly protection: skip this update and log it instead of crashing the whole jobif not math.isfinite(grad_norm):optimizer.zero_grad()log.warning("non-finite grad_norm at step %d, skipped", step)continue# 4. Clip by global norm, then step the optimizertorch.nn.utils.clip_grad_norm_(model.parameters(), max_norm=1.0)optimizer.step()optimizer.zero_grad(set_to_none=True)# 5. Periodically save a sharded checkpointif step % ckpt_interval == 0:save_sharded_checkpoint(model, optimizer, step)
4. Optimizer update and checkpointing
Under FSDP2, each rank holds only its parameter shard and the corresponding optimizer state, and performs updates locally. This avoids redundantly storing the full optimizer state as in traditional data parallelism. Checkpoints are also saved in sharded form, avoiding the need to gather the full weights into a single process during restoration.
For this mechanism to work, custom operators, including backward implementations, the mixed precision policy, the distributed communication backend, the optimizer implementation, and sharded checkpointing must all be coherent within the software stack. If any one of these pieces is missing, training may stall at the first step or at step N.
4. How to Interpret “Two Nodes, 16 GPUs, 400 Consecutive Updates”
The configuration and metrics of this validation can be interpreted as follows:
- Cross-node joint training: 2 nodes × 8 GPUs. The process group crosses the boundary of a single machine, and collective communication must pass through host NICs and the RDMA network. This tests whether training can work across nodes.
- 16 processes progressing in sync: Within the same global step, forward computation, backward computation, gradient reduction, and parameter updates on all ranks complete without stragglers or hangs.
- 400 consecutive optimizer updates: Learning rate warmup, data-parallel synchronization, gradient accumulation boundaries, and checkpoint saving are repeatedly exercised during continuous iterations.
- Loss and gradient norms remain finite throughout: There are no Inf/NaN values and no numerical overflow.
- No abnormal interruption: The job continues running, with no process crashes or communication timeouts.
The gradient norm deserves special attention. Numerical problems in training often first appear as sudden spikes or jumps in the gradient norm, and only later show up as loss divergence. Continuously monitoring the gradient norm is like giving training an early-warning radar.
At the same time, it is important to remain measured. Four hundred steps on 16 GPUs is closer to feasibility validation and regression testing in training engineering. It is not on the same scale as long-period pretraining involving tens of thousands of GPUs or tens of thousands of steps. This path of “validate at small scale first, then scale up gradually” matches engineering practice:
- Small-scale smoke testing;
- Medium-scale continuous training;
- Larger-scale scaling efficiency testing;
- Long-period stability and fault-tolerance drills;
- Actual pretraining workloads.
5. Four Pillars of Stable Long-Running Training
1. Numerical stability: turn anomalies into manageable events
- Precision policy: Prefer BF16 to balance dynamic range and throughput; keep FP32 accumulation for precision-sensitive parts such as normalization and loss computation; avoid pure FP16 schemes that require dynamic loss scaling unless they are carefully managed.
- Gradient clipping + anomaly skipping: Clipping controls the magnitude of updates; when non-finite gradients appear, skip the current step to avoid letting one bad batch contaminate the model.
- Data and hyperparameter hygiene: Validate inputs and deduplicate samples; set learning rates and warmup steps reasonably. For MoE models, also pay attention to routing load balance and expert capacity to avoid numerical problems caused by a small number of overloaded experts.
- Forward/backward comparison: Compare one layer’s forward and backward results against a reference implementation using known inputs to identify which operator causes the deviation.
2. Communication stability: keep cross-node jobs from falling behind
- Check that RDMA NIC drivers and firmware versions are consistent; use AllReduce bandwidth and latency benchmarks to confirm link health;
- Set reasonable collective communication timeouts and retry policies to avoid a slow node dragging down the entire job;
- In hybrid parallelism, place parallel dimensions with heavy communication within the high-speed intra-node interconnect domain, and keep lighter-communication dimensions across nodes.
3. Fault tolerance: shorten the distance from failure to recovery
- Checkpointing: Cover model shards, optimizer states, and training progress; use sharded or asynchronous saving to reduce overhead; combine save frequency with rollback-cost control;
- Elastic training: Automatically reform the communication domain after node replacement, without requiring manual configuration changes and restarts;
- Layered fault domains: Distinguish GPU-level, node-level, and network-level failures, and define separate isolation and replacement strategies for each.
4. Observability: from “seeing loss” to “understanding the full stack”
The metrics to collect should go far beyond loss. At a minimum, they should cover four categories:
- Training quality: loss, gradient norm, learning rate, parameter update magnitude;
- Training efficiency: per-step time, token throughput per second, compute utilization, scaling efficiency;
- Hardware status: memory usage, temperature, power consumption, intra-GPU and cross-node link status;
- Job status: rank heartbeats, collective communication time distribution, slow-rank identification.
It is possible to use common cloud container platforms, logging services, and monitoring/alerting capabilities to collect and display these metrics centrally. Automatic alerts can be set for loss spikes, gradient-norm jumps, and per-step time degradation. Only when “anomalies can be detected, problems can be located, and responsibility can be traced to a GPU” can stable long-running training be reliably guaranteed.
6. How to Judge Whether a Training Adaptation Is Truly Complete
The following acceptance checklist can be used:
- Function: Forward, backward, and optimizer steps are all executable; custom operators have backward implementations; mixed precision modes can be switched.
- Numerics: Loss and gradient norms remain finite over hundreds of steps; deviations from the reference implementation are within an acceptable range.
- Stability: Continuous operation without crashes, communication timeouts, or silent errors; after a single-GPU failure is injected, the system can detect and recover from it.
- Performance: Record single-GPU throughput, intra-GPU and cross-node bandwidth utilization, and compute utilization; cross-node scaling efficiency meets expectations and there is no obvious communication bottleneck.
- Engineering: One-click startup, configuration templates, sharded checkpoints, and automated evaluation scripts are available, and the process is repeatable.
7. From “Can Train” to “Train Out of the Box”
Behind this kind of progress is usually a body of accumulated experience from domestic chips training domestic models:
- A 236-billion-parameter scientific foundation model completed full training from scratch;
- A 5D world model achieved full-stack native training;
- A full-process training workflow for an embodied intelligence “brain” model was completed together with research institutions;
- Training for trillion-parameter-class large models is also underway.
These cases cover very different workloads, including language, scientific computing, world models, and embodied intelligence. What they jointly test is the generality of the software stack, not merely tuning for a particular model structure.
To truly achieve “train out of the box,” systematic capabilities are needed across five layers:
- Operator layer: Complete the backward operators required for training and establish automated comparison and precision regression against reference implementations;
- Framework layer: Provide native support for mainstream training paradigms and hybrid parallelism combinations, while remaining compatible with domestic autonomous deep learning frameworks such as PaddlePaddle and mainstream international open-source frameworks;
- Communication layer: Ensure the collective communication library covers major parallel communication primitives and supports topology awareness and fault reconnection;
- Tooling layer: Provide supporting tools for environment and driver checks, performance profiling, precision diagnosis, and checkpoint management;
- Delivery layer: Form image-based and template-based training environments, carried on the cloud through common capabilities such as container platforms, object storage, and monitoring/alerting, so that users can submit a job and start training.
Conclusion
From “inference can run” to “training is stable,” domestic full-function GPUs are filling the most critical missing piece in the large-model training landscape. When judging this kind of progress, it is neither necessary to overstate a small-scale successful test as proof that “domestic chips can already train trillion-parameter models,” nor to underestimate its value merely because ultra-large-scale pretraining has not yet been completed. A more reasonable approach is to measure each step of progress with reproducible acceptance criteria: Are the operators complete? Is the numerical behavior stable? Can the system scale? Can it recover from failures?
For developers and enterprise users, as training adaptation on domestic chips matures, the choice of compute for model training and fine-tuning will become more diverse. However, what determines success or failure in training is still solid engineering capability: rigorous numerical management, full-stack observable monitoring, and reliable fault-tolerance mechanisms. Tools will change, but these fundamentals will not become outdated.
