Adapting Frontier Large Models to Domestic GPUs: End-to-End Stable Training Practices

    This article explains why adapting a model to a domestic GPU is not the same as being able to train it or producing a trained model, and describes the engineering practices required for end-to-end stable training. It covers model loading, sharding, synchronization, FSDP2, cross-node stability, numerical health monitoring, the operator/communication/toolchain stack, training maturity levels, and cloud-platform support.

    1. Adaptation, Training, and End-to-End Stability Are Different

    In discussions of large models and domestic compute, three concepts are often conflated: adaptation, being able to train, and actually producing a trained model.

    Many announcements describe a model as “adapted” to a chip, or available on “Day 0” for a new chip, when the model can be loaded, can run forward and backward passes, and can complete one inference or one training step. That is only the minimum threshold for being able to run.

    End-to-end stable training requires much more. The model must be able to complete thousands of consecutive optimizer updates on that hardware, with each step keeping the loss and gradient norm finite, keeping the convergence curve smooth, and avoiding numerical overflow, memory leaks, communication deadlocks, or abnormal process exits.

    A further distinction is important: completing training adaptation on a set of chips does not mean that the base model was pretrained from scratch on those chips. In some industry reports, the same model or training approach may be validated across multiple hardware routes, such as testing the same fine-grained parallelism strategy on different accelerator architectures. However, the source of the compute used for the base-model pretraining is often not explicitly stated. Therefore, the first principle for evaluating any claim about training a model on domestic compute is to look for continuous training step counts, numerical health indicators, and reproducible engineering details, rather than accepting a single “adaptation complete” statement.

    2. What End-to-End Training Requires: Loading, Sharding, and Synchronization

    If we break end-to-end training into its essential parts, at least three stages must be connected. If any stage is missing, the system may support inference but still fail to train stably.

    • Model loading: A model with trillions of parameters cannot fit entirely into one GPU’s memory. The loading stage must handle weight sharding, dtype conversion such as bf16/fp16 mixed precision, and initialization and sharding of optimizer states.
    • Sharding and scheduling: Parameters, gradients, and optimizer states are sharded across ranks. During forward and backward passes, the system uses collective communication to all-gather parameters when needed and to reduce-scatter gradients. The scheduling strategy directly determines the balance between memory usage and communication volume.
    • Gradient synchronization and updates: Gradients produced by backpropagation must be reduced across GPUs and nodes using all-reduce or reduce-scatter operations. Each rank then performs the optimizer step on its local parameter shard. Cross-node synchronization is often the main bottleneck for both stability and throughput.

    Only when all three stages are connected and can continue running in a multi-node environment can the system be considered capable of end-to-end stable training.

    3. A Core Technical Path: FSDP2

    For frontier large-model training, Fully Sharded Data Parallelism (FSDP) has become one of the mainstream paradigms. Its second-generation implementation, often referred to as FSDP2, further simplifies alignment and state management.

    The core idea is that, in addition to data parallelism, model parameters, gradients, and optimizer states are all sharded along the parameter dimension across ranks. Unlike traditional data parallelism, which keeps a full copy on every GPU, FSDP reduces per-GPU memory to shard-level storage.

    The typical workflow is as follows:

    1. Before computing a layer in the forward pass, temporarily all-gather the complete parameters for that layer.
    2. Release the gathered parameter copy immediately after computation, keeping only the local shard.
    3. During backpropagation, reduce-scatter gradients so each rank keeps only its responsible gradient shard.
    4. The optimizer updates the local parameter shard based on the local shard.

    This “gather when needed, release after use” mechanism reduces single-GPU memory from “full model plus full optimizer state” to shard-level usage, making it possible to train trillion-parameter models on a limited number of GPUs. For multimodal models, additional work is needed to handle sharding differences among heterogeneous encoders, such as vision, speech, and text towers, and to align pipeline stages so that one branch does not become the bottleneck.

    The following illustrative pseudocode shows a basic sharded training loop with numerical health monitoring. It is framework-agnostic:

    1. # Illustrative pseudocode: sharded training loop with numerical health checks
    2. for step in range(max_steps):
    3. # 1. Forward pass: gradient checkpointing reduces peak memory usage.
    4. outputs = model(batch) # Each rank cooperates on its local shard.
    5. loss = compute_loss(outputs, labels)
    6. # 2. Backward pass: collectives reduce gradients across GPUs and nodes.
    7. loss.backward() # Triggers reduce-scatter / all-reduce.
    8. grad_norm = measure_grad_norm()
    9. grad_norm = clip_grad(grad_norm, max_norm=1.0) # Clip gradients to prevent explosions.
    10. # 3. Optimizer: each rank updates only its local parameter shard.
    11. optimizer.step()
    12. optimizer.zero_grad()
    13. # 4. Numerical health check: loss and gradient norm must remain finite.
    14. assert isfinite(loss) and isfinite(grad_norm), \
    15. f"Numerical issue at step={step}, loss={loss}, gnorm={grad_norm}"
    16. # 5. Periodic checkpointing supports resumption and failure recovery.
    17. if step % ckpt_interval == 0:
    18. save_checkpoint(step)

    4. Cross-Node Multi-GPU Coordination: Judge by Continuous Optimizer Updates

    A practical way to assess whether a domestic hardware stack can handle training is to evaluate its continuous stability in a multi-node, multi-GPU environment. For example, consider a joint training setup using two nodes and 16 accelerators. The valuable metric is not simply “one step can run,” but:

    • 400 consecutive optimizer updates: The key point is “optimizer update steps,” not raw iteration counts. In scenarios with gradient accumulation or warmup, one optimizer.step() may correspond to multiple forward and backward passes. Completing 400 consecutive successful updates indicates that the pipeline has remained stable for a meaningful period.
    • Finite loss and gradient norm throughout: These are two primary signals of training health. If the loss becomes NaN or Inf, or if the gradient norm spikes and then collapses, the issue usually points to numerical precision, communication reduction, or operator implementation.
    • No abnormal interruptions: In cross-node environments, network jitter, collective-communication timeouts, or single-card failures can cause training to hang or exit. Completing 400 steps without interruption suggests that fault tolerance, timeout handling, and recovery mechanisms are largely in place.

    The real challenge of cross-node coordination lies in the communication topology. Intra-node communication usually has high bandwidth, while inter-node bandwidth and latency are more limited. Therefore, the communication volume of reduce-scatter and all-reduce operations, the overlap between computation and communication, and the aggregation granularity of gradient buckets directly determine whether the system can remain stable.

    5. Numerical Stability: Engineering Details That Keep Training from Collapsing

    One of the most common failure points in large-scale training is numerical instability. Keeping loss and gradient norm controllable usually requires a combination of the following practices:

    • Mixed-precision training: bf16/fp16 computation reduces memory usage and improves throughput. fp16 has a narrower dynamic range and often requires loss scaling to prevent small gradients from underflowing. bf16 has a friendlier dynamic range and is a common choice for trillion-parameter training.
    • Gradient clipping: Set an upper bound on the gradient norm, such as max_norm=1.0, to prevent gradient explosions caused by anomalous batches.
    • Activation recomputation: Trade computation for memory to reduce peak memory usage, especially for long sequences or multimodal inputs.
    • High-precision copies of weights and optimizer states: Even if forward and backward passes use lower precision, master weights and optimizer momentum can be kept at higher precision to reduce accumulated error.
    • Deterministic operators and reproducible random seeds: These make debugging easier and improve consistency when resuming from checkpoints.

    For domestic chips, additional attention is often needed for numerical consistency in operator implementations. Differences in rounding behavior for the same softmax, layer norm, or attention operation across different hardware can accumulate over long training runs and shift the convergence curve. This is one of the hardest parts of operator adaptation.

    6. The Engineering System: Operators, Communication, and Toolchains

    Moving a frontier large model from “able to train” to “stable training” depends not on isolated optimizations but on a complete engineering system:

    1. Operator layer: Provide broad coverage of training operators with correct numerical behavior and acceptable performance, especially custom kernels for attention, normalization, and mixed-precision operations.
    2. Communication layer: Implement collective communication primitives efficiently, overlap computation with communication, and use topology-aware scheduling.
    3. Toolchain layer: Automate operator mapping, graph optimization, distributed strategy configuration, logging and metrics collection, and fault localization. A more mature toolchain shortens the path from receiving a model to starting stable training.

    A mature engineering system should support both rapid inference deployment and end-to-end stable training, rather than being optimized for only one of the two.

    7. From “Able to Train” to “Ready to Train”: Four Maturity Levels

    Viewing domestic compute training capability through a maturity lens makes the progression clear:

    • Level 1: Can load and run one step: Validates basic operator support and parallel strategies.
    • Level 2: Can train continuously: Completes hundreds of consecutive optimizer updates in multi-node, multi-GPU environments while keeping numerical metrics healthy.
    • Level 3: Can reproduce: Produces consistent results under the same configuration multiple times and supports checkpoint resumption and failure recovery.
    • Level 4: Ready to train: Users can start training directly with the model and configuration, without deep customization of operators or parallel strategies.

    The industry is currently moving from Level 2 toward Levels 3 and 4. Full-stack from-scratch training practices completed on frontier models in areas such as scientific-computing foundation models, world models, and embodied-intelligence models represent validation points along this path. The ongoing push to train trillion-parameter models is a key test of whether the engineering system can handle extreme scale.

    8. Cloud-Platform Support for Large-Model Training

    For teams looking to deploy large-model training on domestic GPUs, cloud platforms can reduce engineering burden by providing common capabilities such as:

    • Container platforms: Orchestrate multi-node, multi-GPU distributed training jobs and manage GPU resource pools and job scheduling.
    • Object storage: Store training datasets and periodic checkpoints, supporting high-throughput reads and writes for large-scale checkpointing.
    • Monitoring, alerting, and logging services: Collect metrics such as loss, gradient norm, GPU utilization, and communication time in real time; issue alerts when anomalies occur; and shorten fault localization time.
    • Elastic compute: Scale resources according to training stages to balance cost and throughput.

    A cloud platform can combine these capabilities into a foundation for distributed training, allowing teams to focus on the model and parallelism strategy rather than low-level operations.

    Conclusion

    Training frontier large models on domestic GPUs is essentially a comprehensive test of full-stack engineering. The team must connect model loading, sharding, and gradient synchronization; prove stability in multi-node, multi-GPU environments through continuous optimizer updates and numerical health indicators; and build a solid foundation of operators, communication, and toolchains to move toward “ready to train.”

    To evaluate any claim about training large models on domestic compute, return to these hard indicators: how many consecutive steps can it train, are the numerical metrics finite throughout, can the results be reproduced, and can training resume from a checkpoint. Only then can domestic compute move steadily from “able to train” to “usable, easy to use, and ready to train.”