Training Adaptation of Domestic GPUs for Large Models: From "It Runs" to "Out-of-the-Box Training"

    This article clarifies the distinction between training adaptation validation and full pre-training, breaks down the three core stages of the training pipeline, and provides a practical checklist for evaluating whether a domestic GPU platform is truly production-ready for large-model training. It covers model sharding, gradient synchronization, numerical stability, inference alignment, and the capabilities required to move from a single successful run to repeatable, reliable training.

    1. Distinguish “Adaptation Validation” from “Pre-training from Scratch”

    Training adaptation and pre-training are two different things. Adaptation aims to prove that a given hardware and software stack can complete the training pipeline: the model loads, parameters are sharded, gradients synchronize, and the training process remains numerically stable. Pre-training, on the other hand, starts from scratch and runs for weeks or months, consuming far more compute and data than adaptation validation.

    Some media reports may describe “completing training adaptation on a platform” as “training a model on that platform.” When reading such reports, ask three questions: Does the report specify training steps, number of GPUs, and parallel configuration? Is the original training compute of the base model disclosed elsewhere? Does the so-called “adaptation” cover inference, fine-tuning, or full pre-training? If this information is missing, treat the conclusion with caution.

    This article discusses the engineering methodology of training adaptation. If specific numbers come from original reports, the measurement conditions stated in those reports should be followed.

    2. Three Stages of the Training Pipeline

    Training ultra-large models on heterogeneous hardware requires careful partitioning of parameters, gradients, optimizer states, and activation values across multiple GPUs and machines. The training pipeline can be broken down into three stages.

    2.1 Model Loading and Sharding Strategy

    Using the PyTorch ecosystem’s Fully Sharded Data Parallel (FSDP) as an example, parameters, gradients, and optimizer states are sharded across devices and aggregated on-the-fly during forward and backward computation. The code below demonstrates the key configuration. Framework interfaces change with versions; always refer to the official PyTorch documentation for the version you use. Domestic GPUs typically connect to the framework through a compatibility layer or a dedicated device backend; device names and available operators should be confirmed with the vendor’s documentation.

    1. import torch
    2. from torch.distributed.fsdp import (
    3. FullyShardedDataParallel as FSDP,
    4. ShardingStrategy,
    5. MixedPrecision,
    6. )
    7. mp_policy = MixedPrecision(
    8. param_dtype=torch.bfloat16, # forward computation in bf16
    9. reduce_dtype=torch.float32, # gradient reduction in fp32 to reduce accumulation error
    10. buffer_dtype=torch.bfloat16,
    11. )
    12. model = FSDP(
    13. model,
    14. sharding_strategy=ShardingStrategy.FULL_SHARD, # shard params, gradients, optimizer states
    15. mixed_precision=mp_policy,
    16. device_id=torch.cuda.current_device(), # replace with the corresponding device interface on the domestic platform
    17. use_orig_params=True,
    18. )

    Activation recomputation must be enabled separately; it trades extra compute time for memory savings. CPU offload reduces memory pressure but adds data movement overhead, and whether to enable it depends on the bandwidth between the device and the host.

    2.2 Gradient Synchronization and Communication Optimization

    Across nodes, the communication overhead of gradient synchronization often becomes a bottleneck. The software stack typically requires three types of optimization.

    First, gradient bucketing: merge small gradients into larger communication blocks to reduce the number of communication calls. Second, overlap communication with computation: start communicating gradients of a layer as soon as its backward computation finishes, without waiting for the entire backward pass. Third, align the parallel strategy with the communication topology. For mixture-of-experts (MoE) models, the balance of expert routing directly determines throughput. If some experts receive far more tokens than others, some devices idle and overall efficiency drops.

    When validating communication efficiency, a common metric is the linearity of multi-GPU throughput relative to single-GPU throughput: multi-GPU tokens per second divided by (single-GPU throughput × number of GPUs). The closer the linearity is to 1, the lower the communication overhead.

    2.3 Numerical Stability

    The most common failures in large-scale training come from numerical anomalies, not hardware faults. Typical symptoms include a sudden spike in loss, a sharp increase in gradient norm, or NaN/Inf values that abort training. These issues often relate to mixed-precision conversion, reduction precision, initialization schemes, and learning rate schedules.

    The original report mentioned that across two nodes with 16 accelerator cards in total, 400 consecutive optimizer updates were completed, and the loss and gradient norm remained finite throughout. If this result is accurate, it shows the training pipeline can run at a moderate scale. However, 400 steps is a short smoke test; it catches obvious systemic defects but cannot prove long-term stability. To judge the credibility of this validation, the following information is needed: the number of active parameters vs. total parameters, memory usage and whether offload is enabled, the parallel configuration (data, tensor, expert parallel splits), and the sampling frequency of loss and gradient norm.

    3. Bridging Inference Deployment and the Training Pipeline

    Inference deployment is often treated as a separate stage, but it is tightly linked to training. The trained weights need to be converted into a format readable by the inference framework, and the precision and sharding method during conversion can introduce bias.

    After training adaptation is complete, add the following validations:

    • Fix the random seed and compare the forward output of the same weights between the training framework and the inference framework.
    • Check the parameter shape, data type, and vocabulary mapping after merging sharded weights.
    • Test inference with the same set of prompts, recording first-token latency and tokens generated per second.

    4. Capability Checklist: From “It Runs” to “Out-of-the-Box Training”

    A single successful training adaptation only proves the platform can run. To judge maturity, continuously check the capabilities below. The thresholds in the table are reference values; actual values should be calibrated based on model size, network conditions, and business requirements.

    Capability Validation Metric Reference Threshold Common Failure
    Operator coverage Whether all operators required by the target model have implementations or fallback paths No missing operators, or missing operators have automatic fallback Long-tail operators silently degrade to slow implementations
    Multi-GPU linearity Multi-GPU throughput / (single-GPU throughput × number of GPUs) Measure separately for 8 GPUs on one node and 16 GPUs on two nodes, confirming at each level Insufficient cross-node bandwidth, long communication waiting times
    Numerical stability Finiteness of loss and gradient norm, NaN/Inf count Thousands of consecutive steps without NaN; loss curve deviations from the reference platform are explainable Accumulation of mixed-precision reduction errors
    Checkpoint resume Continuity of the loss curve after interruption First few steps after resume follow the pre-interruption trend Optimizer state or random number state not saved
    Anomaly detection Time from anomaly occurrence to alert Alert within a few steps after NaN appears, automatically save the training state Anomaly only discovered after training ends
    Ecosystem compatibility Effort required to port mainstream open-source models Core models can be adapted within an agreed timeline Custom operator versions mismatch the framework

    Validation scale should progress step by step: 8 GPUs on one node, 16 GPUs on two nodes, then larger scales. The single-node baseline isolates operator and single-card issues, while the two-node setup mainly exposes node interconnect problems.

    5. Conclusion

    Domestic compute platforms are moving from inference-ready to training-reliable. Whether training adaptation becomes routine depends on three things: completeness of the training pipeline, reproducible evidence of numerical stability, and maturity of the supporting toolchain. When evaluating a platform, ask the vendor for training configuration, measurement methodology, and the full loss curve—not just peak compute figures.