Technical Paths for Adapting Large Model Training on Domestic GPUs

    This article clarifies the difference between training adaptation and pretraining on domestic GPUs, explains a native FSDP2-based multimodal training path, and outlines the key engineering requirements for stable large-model training across multi-node and multi-card clusters, including numerical stability, operator adaptation, parallel coordination, and automated toolchains.

    1. Clarifying the Concept: Training Adaptation Is Not Pretraining on Domestic Chips

    As domestic AI compute continues to evolve, announcements such as “a certain accelerator card now supports a certain large model” appear frequently. However, these messages often blur two important concepts: training adaptation and pretraining.

    • Training adaptation: Making the model training pipeline—including forward computation, backpropagation, parameter updates, and gradient synchronization—run correctly and stably on a specific hardware and software stack. The focus is on whether training can run and remain stable.
    • Pretraining: The model’s large-scale parameters are actually trained on this hardware using massive datasets and compute resources. The focus is on where the training originated.

    A useful industry reference is that some open-source model vendors, when publishing technical reports for new model generations, validate multiple accelerator hardware architectures side by side. However, such validation usually focuses on the feasibility of inference operators or specific parallel strategies. It does not mean that the original pretraining compute of the base model came from those hardware platforms.

    Understanding this distinction helps readers evaluate “adaptation” news more rationally. It demonstrates that the hardware and software stack have the engineering capability to support this type of model training, rather than making claims about the provenance of model training. These are different levels of technical milestones and should not replace or exaggerate each other.

    2. Native FSDP2 Training Path

    For ultra-large models with trillions of parameters, a single accelerator’s memory cannot hold the complete model state. The combined size of parameters, gradients, and optimizer states is often several times the parameter count, so parameter sharding and parallel strategies are required.

    Native FSDP2—Fully Sharded Data Parallel—is a widely adopted distributed training paradigm. Its core idea is to shard model parameters, gradients, and optimizer states across the data-parallel group, and temporarily aggregate shards only when needed during forward and backward computation. This significantly reduces per-GPU memory pressure.

    Building a native FSDP2 multimodal training path means connecting the complete chain from model loading and shard scheduling to gradient synchronization:

    1. Model loading: Split complex models containing language, vision, and other multimodal subnetworks according to the sharding strategy and map them to the corresponding training processes.
    2. Shard scheduling: Efficiently perform parameter aggregation and gradient reduction during forward and backward passes, balancing memory usage and communication overhead.
    3. Gradient synchronization: Ensure gradients are correctly reduced within the data-parallel group and maintain numerical consistency of optimizer updates across processes.

    A simplified training loop is shown below as pseudocode:

    1. for step in range(total_steps):
    2. batch = next(data_loader) # Multimodal input
    3. loss = model(batch) # Forward pass; shards are gathered on demand
    4. loss.backward() # Backward pass and gradient reduction
    5. grad_norm = clip_and_measure_grad(model) # Clip gradients and compute norm
    6. optimizer.step() # Optimizer update with sharded states
    7. optimizer.zero_grad()
    8. # Numerical stability checks help catch anomalies early
    9. assert isfinite(loss), f"loss is not finite @ step {step}"
    10. assert isfinite(grad_norm), f"gradient norm is not finite @ step {step}"

    Whether this path is truly “native” depends on whether it is built directly on the vendor’s unified computing software stack rather than relying on simple wrappers around existing ecosystems. A native path usually means that operators, communication libraries, memory management, and the framework layer are co-designed, making stable end-to-end performance easier to achieve.

    3. Multi-Node and Multi-Card Coordination: Stability Is the Core Metric

    Running successfully on a single machine does not mean a cluster can remain stable. Training ultra-large models truly tests consistency across nodes and cards.

    In a typical validation scenario, two nodes with a total of 16 domestic training and inference accelerator cards can be used for cross-node joint training. All 16 training processes participate in the same optimizer update and complete 400 consecutive iterations.

    Evaluating whether such a test is successful should not rely only on whether the loss decreases. A stricter set of stability metrics matters more:

    • Loss remains finite throughout: No NaN or Inf appears, indicating that forward and backward computations remain numerically controllable.
    • Gradient norm remains finite: This indicates that gradient reduction, clipping, and optimizer updates are healthy, with no gradient explosion.
    • No abnormal interruption: Training processes do not crash, hang, or time out during communication over the full iteration cycle.

    Cross-node training introduces many more instability factors than single-node training: network bandwidth and latency between nodes, synchronization of collective communications such as all-reduce, and state consistency among distributed processes. Any small deviation in one part may be amplified after hundreds of steps and lead to numerical divergence.

    Therefore, “hundreds of consecutive updates with finite numerical values and no interruption” is itself persuasive evidence of engineering capability. It reflects not only compute scale, but also the collaborative stability of hardware, communication, and software stack during long training cycles.

    4. Numerical Stability: From “Running” to “Running Stably”

    Ultra-large model training has extremely demanding requirements for numerical precision. Mixed-precision training improves throughput but also introduces risks of overflow and precision loss. Multimodal models often have more complex gradient distributions, further increasing stability challenges.

    In engineering practice, multiple methods are usually combined to ensure numerical stability:

    • Gradient clipping: Limit the upper bound of gradient norm to prevent gradient explosion caused by individual batches.
    • Real-time monitoring of loss and gradient norm: Assert numerical finiteness at every step to locate anomalies as early as possible.
    • Reasonable mixed-precision configuration: Apply different precision strategies to parameters, gradients, and optimizer states to balance efficiency and stability.
    • Robust optimizer state updates: Ensure that momentum and second-moment estimates in AdamW-style optimizers remain correct under sharded conditions.

    For long-running training tasks, general cloud capabilities can also provide support. For example, a container platform can elastically schedule compute resources, monitoring and alerting services can track loss curves and hardware metrics in real time, and log services can retain training traces for later analysis. Platforms such as Baidu AI Cloud can provide these general cloud capabilities—containers, monitoring, and logging—to support long-cycle, large-scale training and help detect and locate stability issues earlier.

    5. Engineering System: Operator Adaptation, Multi-Card Coordination, and Automated Toolchains

    A successful training adaptation depends on a mature engineering system, not a single breakthrough. It generally includes at least three layers:

    1. Operator adaptation layer: Large models are composed of many operators, such as attention, normalization, and activation functions. Domestic accelerators need to provide correct and high-performance implementations for these operators, including the backward operators required for training.
    2. Multi-card coordination layer: This includes coordinated use of data parallelism, tensor parallelism, pipeline parallelism, expert parallelism, and other parallel strategies. Communication and load balancing need to be optimized with topology awareness.
    3. Automated toolchain layer: This covers environment configuration, model conversion, distributed launch, checkpoint resumption, and fault diagnosis. The degree of automation directly affects adaptation efficiency and reproducibility.

    Together, these three layers support the full capability chain from fast inference deployment to stable end-to-end training. Only when the toolchain is sufficiently mature can developers shift their focus from “getting the model to run” to “making the model perform better.”

    6. Ecosystem Practice and Evolution: From “Trainable” to “Out-of-the-Box Trainable”

    In the practice of training domestic models on domestic compute, several types of real-world cases have emerged. These include complete training of scientific foundation models ranging from tens of billions to hundreds of billions of parameters, full-stack native training of world models aimed at physical laws, and end-to-end training of brain models for embodied intelligence.

    The shared value of these practices is that they cover diverse scenarios—from pure language models to multimodal models, and from conventional training to world modeling. They validate the adaptability of domestic full-function GPUs across different model forms. Training models at the trillion-parameter scale remains an ongoing challenge for the industry and will be the ultimate test of the entire software stack and engineering system.

    Future evolution can be summarized along a clear path:

    • More complete operator coverage: Continue filling gaps in training operators and backward implementations, narrowing the functional gap with mainstream international ecosystems.
    • Stronger multi-card coordination: Improve communication efficiency and fault tolerance in ultra-large-scale clusters.
    • More intelligent automated toolchains: Further lower the barriers to migration and tuning.

    The ultimate goal is to enable frontier large models on domestic full-function GPUs to move smoothly from “trainable” to “out-of-the-box trainable.” Developers should be able to start training quickly without deep customization, while maintaining long-term stability and reproducibility. This is not only the completion of a technical adaptation, but also a key step for domestic compute to move from “usable” to “easy to use.”