Adapting LLM Training to Domestic GPUs: Paths, Validation, and Limits

    A practical guide to adapting large language model training for domestic GPUs. This article explains the three levels of hardware adaptation—inference, training, and pretraining—walks through the key stages of building a native distributed training pipeline, and shows how to validate multi-node stability with loss curves and gradient norms, while being clear about what these results can and cannot prove.

    1. First, Distinguish Three Levels of Capability

    This article does not claim to have completed trillion-parameter training. It only discusses adaptation paths and the boundaries of public validation. When discussing domestic compute, the phrase “we adapted a large model to this hardware” can mean three very different things, and the distinction matters.

    Level 1: Inference onboarding. After a new open-source model is released, the chip vendor completes operator coverage, weight format conversion, and inference framework integration within a short time, so the model can serve inference on that hardware. This level mainly validates three things: whether operators are complete, whether inference accuracy aligns with the reference implementation, and whether throughput and latency meet targets.

    Level 2: Training adaptation. The model can not only run inference but also be trained or continue pretraining on the hardware, covering forward computation, backpropagation, gradient synchronization, optimizer updates, and checkpoint save/restore. Training places far higher demands on numerical stability, communication efficiency, and memory management than inference. A training run often lasts days to weeks, and any hidden numerical overflow or communication deadlock can fail the entire run.

    Level 3: Base-model pretraining. The model’s original pretraining itself is completed on that chip cluster. This is the highest level of capability proof.

    Successful training adaptation does not mean base-model pretraining has been done on that chip. Some technical reports validate multiple hardware routes at once, but the compute source used for the original pretraining may not be disclosed. When reading such reports, first confirm whether they validate inference operators, short training runs, or full pretraining.

    2. Three Key Stages of Training Adaptation

    Based on public technical material, adapting models above the hundred-billion-parameter scale to domestic GPUs roughly involves three stages.

    2.1 Build a Native Distributed Training Path

    Large model training typically uses fully sharded data parallelism (FSDP-style approaches) as the base framework. Model parameters, gradients, and optimizer states are sharded across multiple devices, and all-gather and reduce-scatter operations aggregate them on demand during computation. Multimodal models also need to coordinate the different computation graphs of the vision encoder, projection layers, and the language model backbone.

    A “native” path means sharding schedules, communication primitives, and mixed-precision policies run directly on the chip’s runtime and collective communication library, rather than being simulated through a compatibility layer. The following code is a structural sketch to help understand the training loop:

    1. # Pseudocode: illustrates the structure of an FSDP-style training loop only; not runnable as-is
    2. # References PyTorch's public fully_shard API; exact versions and APIs must be verified in your environment
    3. # Replace the device backend with the device identifier from the chip vendor's SDK
    4. from torch.distributed.fsdp import fully_shard
    5. model = fully_shard(model) # shard parameters, gradients, and optimizer states by rank
    6. optimizer = torch.optim.AdamW(model.parameters(), lr=1e-4)
    7. for batch in dataloader:
    8. with torch.autocast(device_type=DEVICE_TYPE, dtype=torch.bfloat16):
    9. loss = model(**batch).loss # mixed-precision forward pass
    10. loss.backward() # backprop triggers gradient aggregation
    11. optimizer.step() # update on sharded states
    12. optimizer.zero_grad()

    Two challenges stand out at this stage. The first is operator coverage: training-mode operators are far more numerous and complex than inference-mode ones, and every operator required by automatic differentiation must be implemented. The second is numerical alignment: each operator’s output on the domestic chip must match mainstream implementations within an acceptable error range, otherwise hard-to-diagnose deviations will appear during training.

    2.2 Complete the Full Pipeline from Model Loading to Gradient Sync

    The training pipeline involves more than forward and backward computation. A mature adaptation typically includes:

    • Weight loading and conversion: support mainstream open-source weight formats, plus resharding after tensor parallel splitting.
    • Sharding scheduling: decide sharding granularity and device placement based on memory capacity and network topology.
    • Activation checkpointing: recompute attention activations for very long sequences, trading compute for memory.
    • Gradient synchronization: overlap cross-device and cross-node gradient all-reduce with backward computation under constrained bandwidth.
    • Numerical monitoring: continuously log loss curves and gradient norms to detect divergence early.

    Each stage has typical failure modes. The table below serves as a troubleshooting checklist:

    Stage Input Common failure modes Validation method
    Weight loading Open-source weight files Shape misalignment after sharding, precision loss in conversion Compare layer-by-layer outputs before and after sharding
    Sharding scheduling Memory and topology info Per-device OOM, uneven cross-node traffic Log per-device memory peaks and communication time
    Activation checkpointing Long-sequence inputs Recomputed results differ from the original forward pass Compare gradients of both modes on the same input
    Gradient sync Per-device gradients Communication deadlock, broken overlap causing throughput collapse Decompose per-step time; check whether communication overlaps compute
    Numerical monitoring Loss, gradient norms NaN or Inf not caught in time Set alert thresholds; auto-stop on anomalies

    2.3 Build the Engineering Infrastructure

    Getting from “can train once” to “stable training” requires a full engineering stack: automatic fault recovery, slow-node eviction, performance profiling tools, and operator-level accuracy comparison tools. With these in place, every adaptation follows a standard process instead of depending on ad hoc heroics from engineers.

    3. How to Validate Multi-Node, Multi-Device Stability

    Credible training adaptation rests on quantifiable, reproducible experiments. The typical approach is multi-node joint training with continuous monitoring of two metrics:

    1. Loss curve: loss should remain finite and trend downward as expected. This shows forward and loss computation are basically correct.
    2. Gradient norm: gradient norms should stay finite, with no Inf or NaN propagation in bf16 or fp32. This shows the numerical chain across backprop, gradient aggregation, and optimizer updates is basically stable.

    These two metrics are chosen for clear reasons. The most common failure in large-scale distributed training is the cascading spread of numerical anomalies. A single NaN on one device can pollute gradients across the whole cluster through all-reduce, causing irreversible collapse. Gradient norms are the most sensitive to anomalies and usually show the earliest warning signs.

    Validation results must come with configuration details, otherwise the scope of the conclusions cannot be judged. At minimum, record:

    • Model parameter count and sequence length
    • Number of devices, nodes, and the communication topology
    • Parallelism strategy (the combination of data, tensor, pipeline, and expert parallelism)
    • Compute precision and optimizer configuration
    • Number of consecutive optimizer updates

    As an example from a public report: two nodes with 16 accelerator cards in total completed cross-node joint training, with 16 processes running several hundred consecutive optimizer updates, and loss and gradient norms stayed finite throughout. This result only shows that the numerical and communication links are preliminarily stable under that small-scale, short-run configuration. It cannot be extrapolated directly to pretraining at hundreds of billions of parameters over weeks.

    When anomalies appear, there should be a clear response procedure:

    1. On detecting NaN or Inf, immediately save the current checkpoint and stop further updates.
    2. Inspect activations and gradients layer by layer for finiteness to locate the first affected device and layer.
    3. Roll back model and optimizer states to the most recent stable checkpoint.
    4. Address the root cause based on the diagnosis—fix the faulty operator, skip the anomalous batch, or lower the learning rate.
    5. Log the event’s timestamp, device ID, layer name, and resolution for later review.

    4. The Capability Ladder of Domestic Compute

    Based on public information, the capability building of domestic general-purpose GPUs for large model training falls roughly into four layers:

    • Operator layer: fill in training-mode operators and build accuracy-alignment test suites against mainstream implementations.
    • Parallelism layer: support mainstream combinations of data, tensor, pipeline, and expert parallelism, especially the fine-grained expert parallelism commonly used in MoE models.
    • Cluster coordination layer: optimize cross-node collective communication and provide fault tolerance and elastic scheduling.
    • Toolchain layer: provide automated adaptation, performance profiling, and accuracy diagnostics to reduce the manual cost of adapting each new model.

    Public reports mention that a domestic team has completed training of a hundred-billion-parameter-scale scientific foundation model on domestic compute and is working toward trillion-parameter training. Trillion-parameter training is still in progress, and no publicly released, fully verified results exist yet. The original data and measurement criteria of these advances should follow official releases; this article has not independently verified them.

    This shows domestic compute is moving from “inference-ready” to “training-ready.” The next stage’s focus is engineering maturity—getting frontier models on domestic GPUs from “can be trained” to “train out of the box.”

    5. A Checklist for Evaluating Domestic Training Platforms

    When evaluating a domestic training platform, focus on:

    • Whether it provides native distributed training framework support, not just inference.
    • Whether it publishes reproducible multi-device stability data with clear measurement criteria: device count, step count, model scale, precision, and communication topology.
    • How broad the operator accuracy-alignment test coverage is.
    • Whether the fault recovery and monitoring toolchain is complete, including checkpoint rollback.

    Compared with peak compute specifications, these indicators better reflect real training capability. A more meaningful acceptance criterion is whether the platform can run thousands of consecutive steps at your target model scale without NaN or Inf, and keep the loss curve continuous after fault recovery.

    6. Closing Thoughts

    Training adaptation capability comes down to three things: operator completeness, distributed system stability, and engineering infrastructure. The true level of domestic compute in large model training must be judged by quantifiable, reproducible multi-node training results. Until then, readers should keep the distinction between inference onboarding, training adaptation, and base-model pretraining, and avoid mistaking progress on one for completion of another.