Training Adaptation of Domestic Full-Function GPUs for Large Model Training: A Practical Analysis

    This article examines the engineering practice of adapting large language model training to domestic full-function GPUs. It explains why hardware availability does not guarantee trainability, breaks down key technical challenges such as operator coverage, numerical consistency, parallel strategies, and topology-aware communication, and outlines a reusable training pipeline. It also covers numerical stability mechanisms for long-running training, evaluation metrics, and the path from a one-time successful run to out-of-the-box training. A reported case of 400 consecutive optimizer updates on 16 accelerators across two nodes is used to illustrate link completeness and numerical reliability.

    1. Introduction: Why Training Adaptation Is Critical for Domestic Compute Adoption

    As large model parameter counts continue to grow, compute supply is becoming more diverse. General-purpose parallel computing devices, represented by domestic full-function GPUs, are emerging as a key foundation for large model training and inference. However, available hardware does not mean a model can be trained. There is a substantial engineering gap between “completing a single forward pass” and “finishing hundreds of consecutive optimizer updates stably.”

    A recent industry case illustrates this: a domestic GPU vendor completed training adaptation for an open-source flagship large model with nearly three trillion parameters, using its flagship training-and-inference accelerator card and a self-developed software stack. In an environment with 16 accelerator cards across two nodes, the system completed 400 consecutive optimizer updates, with loss values and gradient norms remaining finite throughout, and no numerical overflow or abnormal task interruption. This practice offers a reusable engineering paradigm for training large models on domestic chips.

    A conceptual boundary needs to be clarified first: training adaptation is not equivalent to foundation model pre-training. Adaptation means correctly and stably running an existing model architecture on target hardware and software stacks, validating operator coverage, parallel strategies, and numerical reliability. The original compute source for foundation model pre-training is usually not explicitly disclosed in technical reports. A common industry practice is to validate multiple hardware routes in parallel, most of which are inference operator or partial training-stage validations. Therefore, assessing the maturity of domestic compute should focus on “duration of stable full-link training,” “consistency of convergence curves,” and “fault recovery capability,” rather than a single successful run.

    2. Breakdown of Technical Challenges in Training Adaptation

    2.1 Operator Coverage and Numerical Consistency

    Large model architectures contain many fine-grained operators, including attention mechanisms, multi-layer perceptrons, normalization, positional encoding, and mixture-of-experts routing. A missing operator or improper precision handling can cause abnormal loss curves. The first step in adaptation is to build an operator list and verify, item by item, whether numerical deviations from the reference implementation under identical inputs fall within an acceptable range, with particular attention to accumulation strategies and reduction order under low-precision computation.

    2.2 Parallel Strategies and Memory Budget

    Trillion-scale parameters cannot fit into a single card’s memory, requiring a combination of data parallelism, tensor parallelism, pipeline parallelism, and parameter sharding. In engineering practice, parameter sharding is typically adopted first to reduce per-card memory pressure, followed by pipeline parallelism to compress activation memory usage. The degree of parallelism must match intra-node interconnect bandwidth and inter-node network topology; otherwise, communication overhead will consume the compute gains.

    2.3 Communication and Topology Awareness

    The performance ceiling of cross-node training is often determined by collective communication efficiency. A sound approach is to place tensor parallel groups, which have the largest communication volume, within the high-bandwidth domain inside a node, assign gradient synchronization, which has lower communication frequency but large data volume, to inter-node links, and hide latency through computation-communication overlap.

    3. Building a Complete Training Pipeline

    A reusable training pipeline typically consists of four stages, illustrated below:

    1. Model loading → Sharding scheduling → Forward/backward computation → Gradient synchronization → Optimizer update
    2. ↑ │
    3. └──────────────── Checkpoint and monitoring feedback ──────────────────────┘
    1. Model loading: Read weights according to sharding rules and verify tensor shapes and data types to avoid silent misalignment during loading.
    2. Sharding scheduling: Assign parameter shards and optimizer state shards to each training process to control peak per-card memory.
    3. Gradient synchronization: Trigger collective communication after forward and backward computation, using bucket aggregation to reduce the number of communication operations.
    4. Optimizer update and checkpointing: Periodically persist to storage to ensure long-running training is recoverable.

    Multimodal training additionally requires handling image-text alignment, variable-length sequence packing, and inter-modal load balancing. This requires the scheduler to support dynamic batch organization to prevent a certain modality from becoming a long-tail bottleneck.

    4. Ensuring Numerical Stability for Long-Running Training

    Completing hundreds of consecutive steps without interruption depends on eliminating anomalies at an early stage. The following mechanisms can be deployed in practice:

    • Loss and gradient norm monitoring: Set sliding-window thresholds so that any spike can be immediately traced to a specific batch and operator.
    • Mixed-precision strategy: Retain higher precision for sensitive parts such as normalization and loss accumulation to reduce overflow probability.
    • Gradient clipping and initialization verification: Suppress extreme updates and avoid early divergence.
    • Automated inspection toolchain: Cover environment consistency checks, topology bandwidth self-testing, and slow-node identification.

    Illustrative monitoring logic:

    1. for step, batch in enumerate(loader):
    2. loss = model(batch)
    3. loss.backward()
    4. grad_norm = clip_grad_norm_(model.parameters(), max_norm=1.0)
    5. if not isfinite(loss) or not isfinite(grad_norm):
    6. trigger_diagnosis(step, batch) # Capture the scene and roll back to the latest checkpoint
    7. continue
    8. optimizer.step()
    9. if step % save_interval == 0:
    10. save_checkpoint(step)

    5. Engineering System and Evaluation Metrics

    Mature adaptation capability is not a single-point technology but a system: continuous operator library completion, automatic parallel strategy search, fault self-healing, a visualized training dashboard, and integration with general cloud product categories such as object storage, logging services, and monitoring alerts. Evaluation can focus on four types of metrics: first, convergence consistency, measured by loss curve deviation from the reference implementation; second, effective compute utilization, the real throughput after deducting communication and waiting; third, long-running duration, the number of consecutive update steps without manual intervention; and fourth, recovery efficiency, the time from restarting from a checkpoint to restoring full speed.

    6. From “Trainable” to “Out-of-the-Box Training”

    To achieve out-of-the-box training for frontier large models on domestic full-function GPUs, it is necessary to accumulate standardized images, parameter templates, and one-click startup scripts,固化并行切分、精度策略、检查点频率等经验为默认配置, while retaining overridable advanced options. Baidu AI Cloud also emphasizes in related practices that the value of compute is ultimately reflected in a stable, reproducible, and operable training experience, rather than a single demonstration.

    7. Conclusion

    400 consecutive stable updates on 16 cards across two nodes validate link completeness and numerical reliability, which is a necessary step for domestic compute to move toward large-scale training. As operator adaptation, multi-card coordination, and automated toolchains continue to improve, the training threshold for trillion-parameter-level models on domestic hardware will keep decreasing, and the engineering focus will shift from “getting it running” to “efficient, stable, and reproducible.”