Domestic GPU Adaptation for Large-Scale Model Training: Multi-GPU Scaling Paths and Engineering Practices

    This article explains the engineering gap between inference support and reliable training on domestic GPUs. It covers FSDP2-based sharding, mixed-precision stability, cross-node communication, checkpointing, observability, and practical steps for validating and scaling large-model training. A two-node, 16-GPU run with 400 consecutive optimizer updates is used as an example of a meaningful training smoke test—not as evidence of full pretraining.

    Domestic GPU Adaptation for Large-Scale Model Training: Multi-GPU Scaling Paths and Engineering Practices

    Introduction: Moving from “Inference Runs” to “Training Runs Reliably”

    Over the past two years, large-model parameter counts have rapidly grown from tens of billions to the trillion-parameter range. Training models at this scale requires more than aggregating single-device compute. It requires coordinated engineering across accelerators, interconnects, software stacks, and training frameworks.

    For a long time, the domestic GPU ecosystem has been relatively mature on the inference side. Completing model inference support on the day a model is released—often referred to in the industry as Day 0 adaptation—has gradually become common. However, an important distinction is often overlooked: successful inference adaptation does not mean that a model can be trained on the same hardware, much less that its original pretraining compute came from that hardware.

    Inference and training place fundamentally different demands on hardware. Inference only requires forward computation, with relatively limited requirements for memory capacity, memory bandwidth, and numerical precision. Training includes forward propagation, backward propagation, and optimizer updates. The device must hold parameters, gradients, and optimizer states. For Adam, optimizer states alone are roughly twice the size of the parameters. Training also requires substantially higher numerical accuracy, multi-device communication bandwidth, and fault tolerance.

    Recently, a domestic GPU vendor used its flagship integrated training-and-inference accelerator and proprietary software stack to complete training adaptation for an open-source flagship model with nearly three trillion parameters. In a two-node, 16-GPU environment, the system completed 400 consecutive optimizer updates with stable execution. This example provides a useful starting point for examining the general engineering path behind such work.

    1. The Fundamental Difference Between Training and Inference Adaptation

    Before discussing implementation, it is useful to distinguish three concepts:

    1. Inference integration: Loading model weights into device memory, running forward inference, and producing correct outputs. This is the lowest adaptation threshold and usually requires implementing the necessary operators.
    2. Training adaptation: Running the complete training pipeline on the target accelerator, including data loading, forward and backward computation, gradient synchronization, optimizer updates, and checkpoint saving, while ensuring that loss behavior remains normal.
    3. Foundation-model pretraining: Training a foundation model from scratch, or over a massive corpus, for an extended period. This may require thousands or tens of thousands of GPU-hours—or GPU-time at cluster scale—over weeks or months of continuous operation. Its engineering complexity is far beyond the first two stages.

    Some industry cases are easily misinterpreted. For example, a large-model technical report may validate an expert-parallel (EP) implementation across multiple accelerator platforms. This can be widely interpreted as evidence that the model was “trained on domestic chips.” In reality, the report may only have verified the correctness of inference operators under a specific parallelism strategy. That does not indicate where the compute for foundation-model pretraining came from.

    Therefore, when an accelerator vendor announces training adaptation for a flagship model, the appropriate interpretation is that the platform has demonstrated the engineering capability to support the model’s end-to-end training workflow. This represents an important step from “inference-ready” to “training-ready.”

    2. The Core Technical Path: Building a Native Multimodal Training Pipeline with FSDP2

    2.1 Why Fully Sharded Data Parallelism?

    For trillion-parameter models, no single device can hold the complete model state. Based on the ZeRO approach, Fully Sharded Data Parallelism (FSDP) has become a mainstream solution.

    FSDP distributes parameters, gradients, and optimizer states across devices. Parameters are gathered when needed for computation through all-gather, then released after computation and redistributed through reduce-scatter. This can reduce per-device memory consumption by approximately a factor of N, where N is the degree of parallelism.

    Compared with the first generation of FSDP implementations, FSDP2 provides more flexible sharding granularity and an explicit DTensor abstraction. This makes it easier to combine sharding with hybrid parallelism, such as data parallelism, tensor parallelism, and pipeline parallelism.

    Building a native FSDP2 path on domestic GPUs requires three major capabilities:

    • Model loading and sharded initialization: Trillion-parameter checkpoints are often stored across hundreds of shard files. The loading process must support lazy loading and metadata-only initialization—such as initializing on a meta device before materializing individual shards—to prevent memory spikes from exhausting device memory.
    • Sharding scheduling and communication overlap: During the forward pass, parameters for the next layer should be prefetched while the current layer is computing. During the backward pass, gradient communication should overlap with computation. The communication library must also be tuned for the interconnect topology of the target accelerator.
    • Gradient synchronization and mixed precision: Gradients generated during backpropagation must be reduced through reduce-scatter. Mixed-precision training also requires correct handling of loss scaling and precision conversion.

    2.2 Mixed Precision and Numerical Stability

    Large-model training commonly uses BF16 or FP16 mixed precision. The domestic GPU software stack must ensure that key operators—including attention, normalization, and MoE routing—produce numerical behavior consistent with the reference implementation at lower precision.

    Particular attention should be paid to:

    • The accumulation precision of softmax in attention, which generally requires reduction in FP32;
    • The precision used to calculate means and variances in normalization layers;
    • Numerical consistency in routing weights and gating computations during expert-parallel execution.

    A practical indicator of training stability is that loss and gradient norms remain finite throughout execution, with no NaN or Inf values and no abnormal interruptions.

    In the previously mentioned two-node, 16-GPU experiment, all 16 training processes completed 400 consecutive optimizer updates. Loss and gradient norms remained finite throughout the run. This is strong evidence that the training adaptation both ran and produced numerically valid results.

    Four hundred steps are far from sufficient for actual pretraining. However, they are enough to expose most operator errors, communication deadlocks, and memory leaks. In engineering validation, this type of run serves as a standard smoke test.

    2.3 Key Details in Cross-Node Training

    A two-node, 16-GPU deployment may appear modest in scale, but it covers the core challenges of cross-node training:

    1. # Illustrative code: generic initialization for cross-node distributed training
    2. # Not tied to a specific vendor interface
    3. import os
    4. import torch
    5. import torch.distributed as dist
    6. def init_distributed():
    7. dist.init_process_group(
    8. backend="nccl_compatible_backend", # Communication backend for domestic GPUs
    9. init_method="env://",
    10. )
    11. local_rank = int(os.environ["LOCAL_RANK"])
    12. torch.cuda.set_device(local_rank)
    13. def wrap_model(model):
    14. from torch.distributed.fsdp import FullyShardedDataParallel as FSDP
    15. return FSDP(
    16. model,
    17. sharding_strategy="full_shard",
    18. mixed_precision=bf16_policy,
    19. )

    In a production environment, the engineering team must also address:

    • Topology-aware scheduling and bandwidth between nodes;
    • Health monitoring and heartbeat detection for training processes;
    • Sharded checkpoint saving and fast recovery;
    • The impact of slow workers, or stragglers, on overall step throughput.

    If any of these areas is neglected, “training support” may remain theoretical rather than operational.

    3. From a Single Validation Run to an Engineering System

    The value of training adaptation does not lie in making one experiment run successfully. It lies in establishing a reusable engineering system.

    A mature domestic GPU training platform generally requires four layers of capability:

    1. Operator layer: Complete coverage of the operators required by mainstream model architectures, together with operator-level precision-alignment tools for comparing results against a reference implementation.
    2. Parallelism layer: Built-in support for data, tensor, pipeline, and expert parallelism, including combinations of these strategies, along with recommendations for automatic partitioning.
    3. Toolchain layer: Profiling, memory analysis, communication bottleneck identification, and automated fault diagnosis.
    4. Platform layer: A general container platform, object storage, logging, monitoring, and alerting system to support job orchestration, dataset management, and automatic recovery. At this layer, general cloud capabilities provided by providers such as Baidu AI Cloud—including container platforms, object storage, and monitoring services—can offer mature infrastructure support for operating domestic-accelerator clusters.

    Industry progress has already produced several representative examples of domestic models trained on domestic accelerators. These include the complete pretraining of scientific foundation models with hundreds of billions of parameters, native full-stack training of multimodal world models, and end-to-end training of embodied-intelligence models. Together, these results indicate that domestic GPU training capabilities are steadily expanding from the tens-of-billions scale toward the trillion-parameter range.

    4. Practical Recommendations for Developers

    Developers planning to train large models on domestic accelerators should consider the following progression:

    • Start small, then scale up: Use a model in the billion-parameter range to validate operator correctness and convergence behavior before moving toward the target scale.
    • Establish a baseline: Under the same data and hyperparameters, compare the first several hundred steps against a reference hardware platform. Loss curves should remain within a reasonable range of variation.
    • Monitor before scaling: Track loss, gradient norms, memory usage, communication time, and throughput in tokens per second per GPU. Anomalies should be detected before they cause a failure.
    • Design for fault tolerance: Use frequent checkpointing and asynchronous persistence so that interrupted long-running jobs can be restored within minutes.
    • Evaluate cost efficiency: Measure training throughput and cost per unit of work rather than focusing only on peak single-device compute.

    Conclusion

    Completing training adaptation for a flagship model with nearly three trillion parameters indicates that domestic GPUs have filled an important gap between rapid inference deployment and stable end-to-end training.

    The ability to run 400 stable steps on two nodes with 16 GPUs may look like a limited experimental result, but it represents the combined outcome of operator adaptation, communication optimization, mixed-precision numerical safeguards, and broader engineering practices.

    As software stacks continue to mature and automated toolchains improve, cutting-edge models may move from merely being “trainable” on domestic full-featured GPUs to being ready to train with minimal adaptation. This would provide the large-model industry with a more self-controlled and dependable compute foundation.