Domestic GPU Training Adaptation: From Inference-Capable to Stable Training
This article explains why training adaptation is harder than inference for domestic GPUs, distinguishes inference validation, training adaptation, and base pretraining, and examines the memory budget for trillion-parameter models. It also covers a sharded training loop, acceptance metrics, how to interpret a 400-step optimizer-update result, and engineering risks with fallback options.
1. From “Can Run Inference” to “Can Train”: Where the Difficulty Lies
Over the past few years, adaptation work for domestic AI chips has mostly focused on inference. After a new model is released, vendors often complete operator integration and inference deployment as quickly as possible, commonly referred to as “Day 0” adaptation. Training adaptation is much harder. Training must cover not only forward operators but also backward gradient computation, optimizer updates, gradient synchronization, and mixed-precision scheduling. A failure in any part of the chain can cause training divergence or interruption.
Recently, a China-based full-function GPU vendor disclosed that its training-and-inference integrated AI accelerator card and self-developed software stack completed training adaptation for an open-source large model with nearly three trillion parameters, and ran 400 consecutive optimizer updates on 16 cards across two nodes. This indicates that domestic compute is moving from “can run inference” toward “can perform full-pipeline training.” However, the full methodology of this result has not been disclosed. Readers need to judge its meaning in light of the technical details below.
2. First, Distinguish Three Levels
News reports often mix several types of work together, but they validate different objects and have different meanings.
| Level | What is validated | What it shows | What it does not show |
|---|---|---|---|
| Inference validation | Operators and inference deployment | The model can produce correct outputs on the chip | Whether the chip can support training |
| Training adaptation | The full compute graph consisting of forward, backward, optimizer, and gradient synchronization | Whether the software and hardware stack can support the training workflow | Whether the model was pretrained from scratch on the chip |
| Base pretraining | The entire training process from initial weights to final weights | The main compute source for the model | Usually requires separate disclosure |
Adaptation validation is usually based on reproducing the training workflow from open-source weights. Therefore, “training adaptation” does not equal “completing pretraining on this chip.” Some vendor technical reports list multiple hardware platforms side by side but only validate inference operators; the original compute source for pretraining is not stated.
3. The Memory Budget for Trillion-Parameter Models
During training, memory usage far exceeds the model weights themselves. Taking mixed-precision Adam as an example, each parameter usually requires about 16 bytes, including low-precision weights, gradients, fp32 master weights, and two optimizer states. For nearly three trillion parameters, the total training state is about 48 TB.
Assuming 96 GB of memory per card, 16 cards total about 1.5 TB, far less than 48 TB. Therefore, without parameter sharding and CPU or NVMe offload, 16 cards cannot hold the full training state. MoE models activate only a subset of experts per step, which reduces computation, but the parameters and optimizer states of all experts still need to be stored.
To judge whether a validation run is valid, first identify which parallelism method it uses:
- Data parallelism, tensor parallelism, pipeline parallelism, and expert parallelism split different objects;
- Fully sharded data parallelism (FSDP or ZeRO) shards parameters, gradients, and optimizer states across cards;
- Whether CPU or NVMe offload is enabled determines whether very large-scale state can fit;
- The per-card memory and host memory configuration determine whether offload is feasible.
4. Key Steps in the Training Loop
The pseudocode below is a simplified illustration. In actual implementations, parameter reconstruction is performed layer by layer, and gradient norms also need to be aggregated across cards.
# Initialization: shard parameters and optimizer states across cards, executed onceshard = init_sharded_params(model, world_size)optimizer = build_optimizer(shard.params)for step in range(total_steps):for micro in range(grad_accum_steps):full_w = all_gather(shard.params) # Reconstruct parameters on demandwith mixed_precision():loss = forward(full_w, next_batch()) / grad_accum_stepsgrad_full = backward(loss)grad_shard = reduce_scatter(grad_full) # After reduction, each card keeps only its own shardaccumulate(shard.grad, grad_shard)clip_grad_norm(shard.grad, max_norm) # Sharded norms need cross-card aggregationassert_grad_finite(shard.grad) # Stop immediately if NaN or Inf appearsoptimizer.step()optimizer.zero_grad()if step % ckpt_interval == 0:save_sharded_checkpoint(shard, optimizer, step)
5. How to Accept a Training Adaptation Run
“Running” does not equal “running stably.” During acceptance, check the metrics in the table below and record the basis for each judgment. Thresholds should be set by the team with reference to a reference implementation; this article does not provide universal values.
| Metric | How to judge | Action on anomaly |
|---|---|---|
| Loss curve | Compare step by step with the reference implementation under the same configuration, data, and random seed | If the deviation exceeds the threshold, check operator precision first |
| Gradient norm | All values are finite, with no NaN or Inf | Stop training and trace back to the operator where the anomaly appears |
| Continuous updates | Record total steps, runtime, and number of interruptions | Check logs to locate the cause of interruptions |
| Throughput | Tokens processed per second, compared between single-card and multi-card runs | Check communication and data loading |
| Checkpoint resume | Save and restore mid-run, then compare loss after restoration | If inconsistent, check optimizer state and random number state |
6. How to Interpret the “400 Steps” Result
400 optimizer updates is a meaningful starting point. Within this number of steps, the loss and gradient norm remain finite, indicating that forward, backward, and gradient synchronization are basically correct under this configuration. For a hardware platform that has just entered the training track, this is a necessary condition.
But it cannot prove more than that. The currently public information does not state the number of activated parameters, parallelism strategy, offload method, precision, batch size, or throughput. 400 steps is also far from sufficient to test long-run training stability. When interpreting such results, one can first ask the following questions:
- Is the training using all parameters or only a subset?
- Which parallelism method is used, and is offload enabled?
- What are the runtime, throughput, and interruption records?
- Can the data, random seed, and reference implementation be reproduced?
7. Engineering Risks and Fallback Options
A successful adaptation is only a starting point. Long-term capability depends on the engineering system. Common risks include the following three categories:
- Operator precision alignment failure: Operators introduced by a new model have numerical differences from the reference implementation. The fallback option is to keep the reference implementation and run per-operator precision regression tests.
- Communication library version incompatibility: Mismatched driver, communication library, or framework versions may cause collective communication to hang. The fallback option is to pin a version combination and record the validated software stack.
- Inconsistent checkpoint resume: Loss jumps after restoration. The fallback option is to save the complete optimizer state at key checkpoints.
