Domestic GPU Training Adaptation: From First Run to 400 Stable Steps

    Achieving training support on domestic GPUs is a fundamentally different challenge from achieving inference support. This article clarifies what "training adaptation" actually means, separates it from base-model pretraining, and walks through the six core stages of a complete training pipeline: model loading, sharding with FSDP2, forward and backward computation, gradient synchronization, parameter updates, and numerical-stability monitoring. It then explains why a two-node, 16-accelerator run that completed 400 consecutive optimizer updates with loss and gradient norms staying finite throughout is a meaningful but only necessary proof of stability, and it closes with a layered acceptance checklist for validating large-model training on new hardware. The article stays vendor-neutral and focuses on quantifiable, reproducible validation methods.

    1. Introduction: From “Inference Adaptation” to “Training Adaptation”

    Over the past period, news like “a domestic chip completes adaptation of an open-source large model on day one” has appeared frequently. Such progress shows that the usability of domestic accelerators in inference scenarios is improving rapidly. Yet the gap between “usable for inference” and “usable for training” spans a long engineering chain.

    Recently, a domestic full-function GPU vendor announced that, using its unified training-and-inference compute card and in-house software stack, it had completed training adaptation for a flagship model with nearly 3 trillion parameters. In a joint training run across two nodes with 16 accelerators in total, all 16 training processes completed 400 consecutive optimizer updates. Throughout the run, loss and gradient norms stayed finite, with no numerical overflow or abnormal interruption. The vendor states that it has built a native full-sharded data parallel (FSDP2) multimodal training path, connecting the full chain from model loading and shard scheduling to gradient synchronization.

    Behind this announcement lie several core concepts in distributed training. This article does not discuss any specific vendor or product. Instead, it distills the general technical questions: What is training adaptation? What stages does a training adaptation go through? How can you prove it “runs and runs stably” using quantifiable, reproducible methods? For teams training large models on domestic compute, understanding these answers is more valuable than remembering any single adaptation milestone.

    2. Clarifying the Concepts: Training Adaptation Is Not Base-Model Pretraining

    When spreading news like this, the industry often conflates “adaptation,” “integration,” and “pretraining.” It is therefore worth drawing the boundaries first.

    • Inference adaptation: Solves correctness and performance of a single forward pass, focusing on operator coverage, memory footprint, and single- or multi-card inference throughput.
    • Training adaptation: Beyond the forward pass, it must also solve backpropagation, optimizer updates, multi-node data synchronization, mixed-precision numerical stability, and long-running reliability. The goal is to run the complete training pipeline stably on the target hardware.
    • Base-model pretraining: Training model weights from random initialization on the target hardware. This is a system-engineering effort of a different magnitude and requires long-term occupation of large-scale compute.

    From public information, what the vendor completed this time was training adaptation of an open-source flagship model, not base-model pretraining on that hardware. Industry interpretation of similar cases supports this distinction. For example, one model technical report validates two types of accelerators side by side in the same document and provides a fine-grained expert-parallel validation scheme. The industry generally regards this as operator-level validation at the inference layer, and the report does not clearly state the original compute used for pretraining that base model.

    A more accurate phrasing of “completed training adaptation,” then, is: fully reproduced and validated the open-source model’s forward, backward, and parameter-update processes on the target hardware. This is likewise an important technical milestone—only its value lies elsewhere. The former tests operator coverage, numerical consistency, and cluster engineering; the latter tests the efficiency and stability of sustained training on a large-scale cluster.

    3. The Six Core Stages of a Training Pipeline

    A complete training pipeline can be decomposed into six stages: model loading, shard scheduling, compute and backward, gradient synchronization, parameter update, and numerical-stability observation. Their difficulties and validation focus are described below.

    3.1 Model Loading: From “Loads” to “Loads Correctly”

    Open-source model weights are typically published as sharded files, and the loading stage must handle:

    • Shard mapping: Determining which parameter shards each rank reads, avoiding duplicate loads or omissions.
    • Structural consistency: Weight order, naming, and tensor shapes must correspond exactly to the target model definition.
    • Data type: Explicit conversion rules are needed between the weights’ original precision and the training precision—especially for LayerNorm-type parameters, which usually stay at higher precision.
    • Multimodal components: Parameters of the vision encoder, projection layers, and language model must all be brought into the parallelism strategy.

    The validation method is to compare the loaded weights against the original weights tensor by tensor, ensuring both the maximum absolute error and the relative error fall within the expected range. If you jump straight to the training steps, loading misalignment often surfaces only when loss behaves abnormally, multiplying the debugging cost.

    3.2 Shard Scheduling: Full Parameter Sharding with FSDP2

    The core idea of Fully Sharded Data Parallel (FSDP) is that parameters, gradients, and optimizer states are all sharded across ranks within the data-parallel group. During forward and backward computation, parameters are dynamically gathered layer by layer and released immediately after use. This “gather when needed, release when done” approach keeps single-card memory from growing linearly with model size.

    Native FSDP2 brings two important improvements over earlier implementations:

    1. It uses per-parameter sharding rather than flattening an entire layer into a single flat tensor;
    2. Sharded parameters behave consistently with ordinary parameters in the framework, making it easier to combine with tensor parallelism, pipeline parallelism, expert parallelism, and other strategies.

    In practice, FSDP2 usually needs the following configuration to support training at the tens-of-billions or even hundreds-of-billions parameter scale:

    • Activation recomputation (gradient checkpointing): Trading a small amount of extra compute for memory space;
    • Prefetching: Gathering the next layer’s parameters ahead of time while the current layer computes, so communication overlaps with computation;
    • Mixed-precision strategy: Using BF16/FP16 for computation while performing gradient reduction and optimizer updates at higher precision.

    For multimodal models containing both vision and language modules, two additional issues arise: the vision side and language side may use different parallelism strategies; and when two sequence types are mixed in the same batch, differences in sequence length create imbalanced compute load.

    3.3 Compute and Backward: Operator Coverage and Gradient Correctness

    The set of operators used in training is clearly larger than in inference, and the following operators may never have actually run during inference adaptation:

    • Backward of normalization layers and activation functions (such as SwiGLU);
    • Backward of positional encoding (such as rotary position encoding);
    • Attention backward and the log-sum-exp stabilization implementation in softmax;
    • Backward of loss functions (such as cross-entropy) and auxiliary losses;
    • Routing backward related to mixture-of-experts (MoE).

    For validation, it is recommended to follow a “local to global” order: first fix the weights and run only the forward pass, comparing target-hardware outputs against the reference implementation layer by layer; then run a gradient check on individual parameters; finally compare end-to-end gradients. This quickly locates whether the problem lies in a specific operator or in the connections of the computation graph.

    3.4 Gradient Synchronization and Parameter Update: The Core of Distributed Correctness

    In data-parallel training, each rank computes different gradients on different data. Gradients must be reduced before updating parameters to keep the model consistent across ranks. The mainstream approach is:

    1. Sum or average gradients across ranks;
    2. Scale by the size of the data-parallel group;
    3. Shard gradients across ranks, then perform the optimizer update.

    If the framework also uses gradient accumulation, note the scaling timing: the sample count per rank may differ during accumulation, so you get a mathematically correct average gradient only by dividing by the global sample count and then reducing.

    Mixed precision is another risk source. BF16 has a large dynamic range and suits large-model training; FP16 requires loss scaling to prevent gradient underflow. A subtler issue is a mismatch between “computation precision” and “reduction precision.” If gradients participate in reduction as BF16, the accumulation of many small gradients may be “swallowed” by large gradients, manifesting as a clear shift in the convergence curve under different batch sizes. The safe practice is to perform gradient reduction and optimizer updates in FP32.

    3.5 Parameter Update: Optimizer States and Distributed Details

    Adam-class optimizers must additionally store first- and second-order moments, with memory overhead proportional to the parameter count. A memory budget estimate should be completed before training starts; otherwise, an out-of-memory (OOM) error is easy to trigger mid-run. The core formula is:

    1. Peak memory ≈ parameters + gradients + optimizer states + activations + temporary buffers
    2. ≈ param_count × (a + b + 4c + d) + activation memory
    • a: bytes resident per parameter. BF16 is 2; with an additional FP32 copy, use 6;
    • b: BF16 gradients are 2;
    • c: optimizer state items per parameter. Adam-class algorithms use 2 (first and second moment); momentum-only uses 1;
    • d: temporary overhead such as communication buffers, empirically 2 to 4.

    Taking 236 billion parameters with BF16 compute and a retained FP32 parameter copy as an example, just the three items of parameters, gradients, and Adam states require roughly 13.5 TB of memory by the formula above—so parameter sharding is essential to spread this across multiple cards.

    Beyond memory, two details deserve attention:

    • Gradient clipping under sharded optimizers: In FSDP2, the global gradient norm can only be computed after each rank completes gradient reduction. If you compute the local norm and clip on it, the update ratio across ranks becomes inconsistent, breaking model consistency.
    • The bf16-16 mode in the ZeRO family: This mode stores parameters and gradients in FP16 and performs computation in BF16, requiring no loss scaling. However, it cannot be directly equated with FSDP2’s per-parameter sharding and persistent parameters; before switching implementations, read the documentation and verify numerical consistency.

    4. Key Questions: Why “16 Cards” and “400 Steps”?

    4.1 Two Nodes, 16 Cards: Validating Cross-Machine Communication

    Parameter sharding and gradient reduction that a single machine can validate all become cross-machine communication in a two-node scenario. Moreover, most parallel frameworks assume intra-node link bandwidth is far higher than inter-node bandwidth, and their implementations perform collective communication in tiers—reducing intra-node first, then inter-node.

    Such “topology-aware” optimizations place higher demands on physical links, topology descriptions, and the collective communication library:

    • Improper affinity configuration between NICs and accelerators can make data bypass the fast path;
    • When process binding order does not match the topology, communication may repeatedly traverse inter-node links.

    Expert parallelism in MoE training likewise relies on large-scale all-to-all communication. Only in cross-machine scenarios can you find issues such as insufficient overlap between inter-node communication and computation, or collective communication timeouts.

    Each optimizer update (step) represents one complete round of “forward—backward—gradient reduction—parameter update.” With gradient accumulation enabled, one step also includes multiple micro-batches. Thus 400 steps already cover more than a thousand forward and backward computations, able to expose three categories of problems that only appear during continuous running:

    1. Cross-node inconsistency: Parameters or gradients that are inconsistent on some ranks are usually amplified within dozens of steps;
    2. Memory leaks and fragmentation buildup: These problems often take hundreds of steps to surface;
    3. Long-cycle numerical drift: After optimizer momentum accumulates to a certain point, gradient explosion may occur.

    It should be noted that 400 steps is usually still early in training, when the learning rate is mostly in warmup and the numerical distributions of parameters and activations have not yet undergone major evolution. Therefore, “stable for 400 steps” can only be regarded as a necessary rather than sufficient validation conclusion.

    4.3 Loss and Gradient Norm: The Two Most Direct Health Metrics

    • Loss staying finite indicates no NaN or Inf appeared in the forward and loss computation.
    • Gradient norm staying finite indicates no overflow or underflow occurred in backpropagation and gradient reduction.

    Only together do these show that a complete optimizer update is numerically valid. If the gradient norm is finite but abnormally large, it could also stem from division by zero, an unstable normalization-weight estimate (such as in RMSNorm), or an incorrect operator implementation, requiring further investigation.

    It is advisable to add a “numerical health check” during adaptation training. The example code below gives the basic idea in pseudocode; variables and functions are illustrative:

    1. # All items below are illustrative pseudocode; actual interfaces follow the framework documentation
    2. # Training loop skeleton (data loading, learning-rate scheduling, etc. omitted)
    3. for step, batch in enumerate(train_loader):
    4. loss = forward_backward(model, batch) / accum_steps
    5. loss.backward()
    6. if (step + 1) % accum_steps != 0:
    7. continue
    8. # Check 1: global gradient norm (must be computed after gradient reduction)
    9. grad_norm = global_grad_norm(model.parameters()) # compute the global L2 norm
    10. log_metrics(step, loss=loss.item(), grad_norm=grad_norm, lr=lr_scheduler.get_lr())
    11. # Check 2: loss and gradient norm must both be finite
    12. if not (is_finite(loss) and is_finite(grad_norm)):
    13. trigger_incident(step, reason="non-finite", batch=batch, metrics=metrics)
    14. # Check 3: gradient clipping (the example threshold is illustrative only)
    15. if grad_norm > max_norm:
    16. clip_grad_norm_(model.parameters(), max_norm)
    17. optimizer.step()
    18. optimizer.zero_grad(set_to_none=True)
    19. def trigger_incident(step, reason, batch, metrics):
    20. # 1) Preserve the scene: current metrics, sample indices, historical metrics of recent steps
    21. # 2) Roll back to the last "healthy checkpoint", skip the anomalous sample, and retry
    22. # 3) If triggered repeatedly at the same position, treat it as a code/numerical defect and stop training
    23. save_incident_report(step, reason, batch, metrics)
    24. rollback_to_last_good_checkpoint(skip_current_batch=True)

    5. From 400 Steps to Long Runs: What Still Needs to Be Added

    5.1 Pseudo-Stability from Capacity Factor and Token Dropping

    In MoE training, if a fixed expert capacity factor is set, tokens routed to the same expert that exceed its capacity are dropped, or passed through directly via a residual connection. As a result, even if the router behaves abnormally, the loss may still look “normal.” It is recommended to simultaneously monitor the actual number of tokens each expert receives, the token-drop rate, and the entropy of router outputs, so that problems are not masked.

    5.2 Loss Spikes and Training Interruptions

    Even when stable in the short term, long runs can still produce loss spikes or even divergence. Common triggers include:

    • Individual anomalous data samples;
    • A learning rate that is too high;
    • Drastic changes in router weights;
    • Low-precision accumulation errors.

    In engineering practice, the following strategies are usually combined:

    • Learning-rate warmup and decay;
    • Gradient-norm-based adaptive clipping;
    • Rolling back to the most recent healthy checkpoint on anomalous steps.

    5.3 Checkpoints and Resume-from-Checkpoint

    In large-scale training, node failures are almost unavoidable. The following four capabilities are all indispensable:

    • Sharded saving, so a single node’s storage does not become the bottleneck;
    • Saving optimizer state and learning-rate scheduler state;
    • Recording the data read position, ensuring reproducible data order on resume;
    • Continuity of the loss curve after resume, with no jumps.

    5.4 Reproducibility and Slow-Node Diagnosis

    With fixed random seeds and a fixed data order, loss deviation across multiple runs at the same step should be within a very small range. Also, even without node failures, a performance drop on a single card slows the whole training, because the speed of synchronous training is determined by the slowest rank. Time per stage should be recorded by rank to detect slow nodes promptly.

    6. Adaptation Acceptance Checklist

    Training adaptation can be broken into five stages for progressive validation, each “small to large”—control the scale first, then scale up:

    Stage Validation Goal Recommended Scale Pass Criteria (suggested)
    Load & single-GPU forward Correct weight loading, matching forward output 1 GPU Per-tensor error within threshold; forward-output error vs. reference within threshold
    Single-GPU training Correct backward and optimizer update 1 GPU Gradient check passes; loss decreases normally within hundreds of steps, no overflow
    Single-node multi-GPU Correct parameter sharding and gradient reduction 1 node, multiple GPUs Parameters consistent across ranks; loss-curve shift within expected range after scaling batch
    Two-node cross-node Cross-machine collective communication, topology awareness 2 nodes, multiple GPUs Stable for hundreds of consecutive steps; sufficient communication/compute overlap; no timeouts or deadlocks
    Long run & fault tolerance Long-term stability, resume from checkpoint Gradually scale up the cluster No abnormal interruptions over thousands to tens of thousands of steps; checkpoints recoverable, loss continuous after resume

    Combined with the two-node, 16-card case and 400 consecutive optimizer updates discussed above, the core focus of each stage can be summarized as follows:

    Focus What It Detects Typical Troubleshooting Direction
    Finite loss Whether NaN/Inf appears in forward and loss computation Data preprocessing, softmax numerical stabilization, anomalous samples
    Finite gradient norm Overflow or underflow in backward and reduction Mixed-precision strategy, reduction precision, denominator protection in division operators
    No abnormal interruptions Reliability of cross-node coordination Collective-communication timeouts, slow nodes, network jitter
    Loading & sharding Whether weights are correctly partitioned Per-tensor comparison, load order, random seeds
    Resume & recovery Whether training is recoverable Sharded checkpoints, optimizer state, data read position
    Resource efficiency Whether the hardware is fully utilized Communication/compute overlap, gradient accumulation, topology affinity

    7. Conclusion

    Returning to the initial distinction: two nodes and 16 cards completing 400 consecutive optimizer updates, with loss and gradient norms finite throughout, mark that the relevant domestic GPU platform has gained the preliminary ability to support full-pipeline training for trillion-parameter-scale models. The value of this capability lies mainly in three areas:

    1. The key operators needed for training (backward, optimizer, collective communication) have been fairly completely validated;
    2. Cross-node engineering problems (topology awareness, communication overlap, numerical stability) are beginning to be systematically exposed and solved;
    3. Using open-source models as a “ruler,” a reusable set of validation methods has been formed.

    From an industry perspective, the value of pairing domestic chips with domestic models lies in creating a positive feedback loop: model adaptation pushes hardware to fill gaps in operators and toolchains, while maturing hardware lowers the barrier to large-scale training. The direction for advancement is also clear:

    • Finer-grained expert parallelism;
    • Longer context;
    • More modalities;
    • Fault-tolerant training on larger-scale clusters.

    For engineers, judging whether a training adaptation succeeds should not rest on “how many models it supports,” but on whether it has formed a layered validation process, observable numerical health metrics, and reliable resume-from-checkpoint mechanisms. Only when these engineering capabilities are accumulated can large-model training on domestic GPUs truly move from “can train” to “out-of-the-box training.”