Adapting China-Made AI Accelerators for LLM Training: Practice and Stability Validation
This article explains how to validate LLM training on China-made AI accelerator cards. It separates inference checks from full training-loop validation and covers memory and model state management. It also interprets a two-node, 16-card test of 400 consecutive optimizer updates and outlines reproducible test practices, monitoring metrics, and checkpoint recovery testing.
1. What It Takes to Move from “Running” to “Training”
As large language model parameter counts keep growing, adapting accelerator cards is shifting from single-pass inference to the full training pipeline. For developers, both tasks require model operators to execute correctly on the hardware, but the engineering complexity differs considerably.
Inference focuses on model loading, forward computation, response latency, and throughput. Training must also handle backpropagation, gradient communication, optimizer state maintenance, and parameter updates. In cross-node training, processes must keep their execution order, data distribution, and communication operations consistent.
A reference report described a two-node, 16-card training adaptation test. All 16 training processes completed 400 consecutive optimizer updates. The loss values and gradient norms stayed finite throughout the test, and no numerical overflow or abnormal interruption was reported. The value of this result is that it shows the training pipeline can keep running under a specific configuration. It goes beyond showing that the model loaded or that one forward pass completed.
The technical reading still has limits. A successful training adaptation does not mean the model has completed pretraining from scratch on this hardware. Stable operation over a short window does not prove long-term convergence, production reliability, or efficiency at scale.
For this reason, training adaptation should be assessed along four separate dimensions: functional correctness, numerical stability, training efficiency, and long-term reliability. A general statement such as “supports training” cannot cover all of these.
2. Define What Is Being Validated: Training Adaptation Is Not Full Pretraining
1. Inference adaptation validates forward execution
Inference adaptation typically confirms that weights load, inputs are processed correctly, operators have usable implementations, and the model produces the expected outputs.
This stage can expose problems such as data type incompatibility, missing operators, insufficient memory, and abnormal execution paths. It cannot prove that the backward computation is correct or that the optimizer can keep updating parameters.
Even when inference runs stably, training can still fail. Some operators may lack backward implementations. Gradient precision may be insufficient. Communication calls may not match.
2. Training adaptation validates the full update loop
Training adaptation should cover at least the following pipeline:
Data loading and preprocessing → forward computation → loss calculation → backpropagation → gradient synchronization → optimizer update → state logging
A failure at any stage can stop training from progressing. For example, normal forward computation does not guarantee correct gradients. Gradients that can be computed do not guarantee consistent results after cross-device aggregation. A completed parameter update does not guarantee that memory will stay stable or that numerical anomalies will stay absent over many updates.
3. Full pretraining requires additional proof of training quality
Full pretraining involves longer runs, larger data consumption, and more demanding operational requirements. Beyond keeping the job running without interruption, it requires checking loss trends, evaluation results, data quality, and how well the training budget is used.
A rigorous test report should therefore state separately whether forward validation was completed, whether backward validation was completed, whether continuous parameter updates were completed, whether checkpoint recovery was verified, and whether a full training run with a defined data scale and quality evaluation was completed.
These conclusions cannot substitute for one another.
3. Core Constraints of Large Model Training: Memory and Model State Management
1. Parameter count is not the only factor in memory requirements
During training, GPU memory holds more than model weights. It must also accommodate gradients, optimizer states, intermediate activations, and temporary compute buffers. Different optimization algorithms, precision strategies, and model architectures create different memory overheads.
For models that use a sparse mixture-of-experts structure, the total parameter count should be distinguished from the number of parameters actually activated for each computation. Fewer activated parameters usually reduce part of the compute cost. However, this does not mean all weights and optimizer states can be left out of storage, and it does not mean communication overhead can be ignored.
For this reason, the statement “the parameter count is very large and 16 cards are used” cannot be used to conclude that the full model fits in memory permanently. It also cannot be used to conclude that full pretraining is feasible.
A credible adaptation report should describe the actual model configuration, the range of trainable parameters, the data precision, the optimizer type, and whether state offloading or other memory management mechanisms were used.
2. The role and cost of fully sharded data parallelism
Fully sharded data parallelism (FSDP) stores parameters, gradients, and optimizer states across multiple training processes. Compared with keeping the complete training state on every card, it reduces the storage pressure on each card.
In a typical implementation, each process gathers the parameters it needs for a computation and releases the full copies once they are no longer needed. During the backward pass, collective communication aggregates the gradients and distributes them to the corresponding shards.
This method does not come free of cost. Shard granularity, the timing of parameter gathering, and communication scheduling all affect training performance. Shards that are too fine can increase the number of communication operations. Shards that are too coarse can raise peak memory usage. Whether communication can overlap with computation is also an important factor in actual efficiency.
3. Activation recomputation must be evaluated together with other trade-offs
Activation recomputation reduces the memory needed to store intermediate activations. It re-runs part of the forward computation during the backward pass, trading extra computation for memory savings.
This technique helps relieve activation storage pressure for long sequences or deep networks. However, it can also increase the time per training step. Judging it by memory reduction alone is not enough. Effective throughput, step time, and the share of time spent waiting on communication should be observed as well.
The goal is not to minimize memory usage. The goal is to achieve higher effective training efficiency within the memory constraint.
4. What 400 Consecutive Steps on Two Nodes and 16 Cards Can Show
1. Evidence that multi-process training can run for a stage
Cross-node training requires multiple processes to coordinate. Completing 400 consecutive optimizer updates shows that, under the model configuration, data inputs, and runtime environment covered by the test, the critical training path did not stop because of an obvious execution error.
The count of optimizer updates must be kept separate from the count of forward passes. With gradient accumulation, one optimizer update may correspond to several micro-batches of forward and backward computation. The two counts should not be mixed up.
2. Preliminary evidence of numerical health
Keeping loss values and gradient norms finite means the monitored values did not reach infinity or non-numeric results. This is an important signal that training can continue.
However, finite values do not mean the computation is fully correct. Errors in gradient scaling, parameters that never update, or uneven sample allocation could still leave loss values finite.
A more complete validation should add comparisons of outputs and gradients against a small reference configuration, checks on the update magnitude of key parameters, and analysis of loss changes over a sufficiently long window.
3. Long-term operation and scaling efficiency are not yet proven
Short test runs cannot cover slow memory leaks, infrequent communication anomalies, data loading jitter, or the overhead of periodic checkpoint saving. They also cannot show that throughput increases proportionally as nodes are added.
For this reason, 400 consecutive updates are better treated as a stage-level functional acceptance result. Long-duration stress tests, fault recovery tests, and performance evaluations at multiple scales are still needed.
5. Build a Reproducible Training Adaptation Process
1. Fix the baseline and runtime configuration
Before testing, record the model structure, input dimensions, sequence length, micro-batch size, gradient accumulation steps, precision policy, optimizer configuration, and random seed.
Also record the number of accelerator cards, the node topology, the communication environment, and the relevant software versions. Results from different tests are only comparable when these conditions can be traced.
2. Expand from local correctness to the whole system
Progress in the following order: single operator → single layer → single card → single node with multiple cards → multiple nodes with multiple cards.
First confirm the forward and backward results of key operators. Then check local model structures. Finally, validate the full training run. This narrows the scope of fault diagnosis and keeps operator issues, memory issues, and communication issues from being troubleshot together.
For multimodal models, each input branch and its fusion path should be validated separately. Check that input masks, length alignment, and loss normalization are all correct.
3. Verify data partitioning and update semantics
In distributed training, it is not enough for all processes to run. Confirm that they process the data they are supposed to process. Check for duplicated samples, missing shards, and inconsistent handling of the final partial batch.
Gradient accumulation must also align with loss scaling, the timing of gradient synchronization, and the learning rate schedule. Otherwise, training may look stable while silently changing the intended update semantics.
6. Use Monitoring Metrics to Locate Bottlenecks, Not Just to Confirm the Job Is Alive
Training monitoring can be divided into four categories.
The first category is numerical metrics. These include loss values, gradient norms, parameter update magnitudes, and counts of non-finite values. They help detect training anomalies, but they should not be interpreted in isolation.
The second category is performance metrics. These include step time, sample or effective token throughput, and the distribution of step durations. Beyond averages, attention should go to tail latency and periodic jitter.
The third category is resource metrics. These include peak memory usage, device utilization, host memory, network traffic, and storage access latency. They help determine whether a job is limited by compute, communication, or input/output.
The fourth category is reliability metrics. These include the number of failures, checkpoint save time, recovery time, and the consistency of state after recovery.
Normal ranges differ across models and data distributions, so a single fixed threshold that ignores the baseline is not appropriate. A more reliable approach is to compare metric trends and anomalies under identical test conditions.
7. Checkpoint Recovery Is Part of the Training Pipeline
Long training runs must account for process exits, node failures, network anomalies, and storage write failures. Verifying continuous operation without verifying recovery does not make up a complete engineering acceptance.
A checkpoint typically needs to save model parameters, optimizer states, learning rate scheduler state, random number generator state, and the recoverable data consumption position. For sharded training, the checkpoint must ensure that every shard is complete and that all shards belong to the same logical training step.
A recovery test should follow a clear procedure. Run until a specified update count and save the state. Then stop the job on purpose, restore it, and continue training. Check whether the step count, learning rate, optimizer state, and data progress resume correctly.
Under controlled conditions, the results can also be compared with an uninterrupted reference run. Floating-point computation order and non-deterministic operations mean results will not always match bit for bit. Do not require exact equality everywhere. Define reasonable numerical tolerances in advance.
8. From Stage-Level Adaptation to Sustainable Delivery
The maturity of large model training adaptation depends on whether a repeatable engineering system exists. A single successful test run is not enough.
The operator layer needs continuous validation of forward and backward correctness. The distributed layer needs validation of state sharding, communication order, and cross-node coordination. The operations layer needs monitoring, anomaly diagnosis, checkpoint management, and recovery capability. The delivery layer needs clear configuration documentation, known limitations, and reproducible test procedures.
Completing 400 optimizer updates on two nodes with 16 cards is useful evidence of the training pipeline’s stability at this stage. Assessing its technical significance should focus on four questions: which conditions the test covered, which capabilities it demonstrated, which boundaries remain unverified, and how the missing evidence will be collected next.
Only by validating functional correctness, numerical stability, effective throughput, and fault recovery separately can large model training move from “it can start” to “it can run continuously and be delivered in a controlled way.”
