Adapting Ultra-Large Models for Distributed Training: A Dual-Node 16-GPU Practice

    This article explores the training adaptation of an ultra-large open-source model with nearly three trillion parameters on a domestic full-function GPU using a dual-node, 16-GPU setup. It clarifies the distinction between training adaptation and base pre-training, details the native sharded data parallel training pipeline validated by a 400-step smoke test, and outlines engineering practices for numerical stability, observability, and phased validation to achieve a reliable, out-of-the-box training experience.

    Recently, a domestic full-function GPU successfully completed training adaptation for a flagship open-source large model with nearly three trillion parameters. Cross-node joint training tests were conducted in a dual-node environment with 16 accelerator cards: all 16 training processes completed 400 consecutive optimizer updates, with loss values and gradient norms remaining finite throughout, and no numerical overflow or abnormal interruptions. The technical value of this result lies not merely in “getting a training run to complete,” but in validating the complete cross-node training pipeline—from model loading, parameter sharding, and gradient synchronization to optimizer updates—providing a reusable engineering reference for stable training of ultra-large models on domestic computing power.

    First, we must clarify a common misconception: successful training adaptation does not mean the model was pre-trained on this chip. Training adaptation typically refers to the correct execution of the model structure, operators, parallel strategy, checkpoints, data pipeline, and communication paths on the target hardware and software stack. Base pre-training validation, however, involves longer durations, larger scales, more complete data proportions, and proof of training stability. In engineering practice, the industry distinguishes between “inference operator verification,” “deployment path verification,” and “base pre-training raw compute verification.” The former proves the model can perform inference or training steps on the target platform, while the latter requires official disclosure of training compute sources, duration, data scale, and complete evaluation results. The two should not be conflated.

    1. What the Dual-Node 16-GPU 400-Step Experiment Verified

    Based on public technical information, this experiment used a dual-node, 16-GPU setup for cross-node joint training, with 16 training processes executing 400 consecutive optimizer updates. For ultra-large models, such experiments typically serve as “stability smoke tests” and “pipeline integrity verifications,” focusing on the following metrics:

    • Whether model weights can be correctly loaded and sharded according to strategy;
    • Whether parameters, gradients, and optimizer states can be correctly synchronized in a cross-node environment;
    • Whether the loss value remains finite and the gradient norm avoids exploding or vanishing;
    • Whether numerical overflow, NaN/Inf, communication timeouts, or abnormal process exits occur;
    • Whether step time, peak memory, and communication overhead are within acceptable ranges;
    • Whether the checkpoint saving and restoration pipeline is functional.

    Completing 400 consecutive updates does not equate to proving model convergence, nor does it mean final accuracy has been achieved. It is more of an end-to-end stress test: proving the training system can stably progress at a given scale, establishing a baseline for subsequent longer steps, larger clusters, and more complex multimodal data training. For engineering teams, this baseline is highly valuable because the most expensive issues in large-scale training are often not single-step computations, but communication bottlenecks, numerical anomalies, data pipeline jitter, and unreliable fault recovery.

    2. Native Sharded Data Parallel Training Pipeline Breakdown

    This adaptation built a native sharded data parallel training path, streamlining the complete training pipeline from model loading and sharding scheduling to gradient synchronization. For models approaching three trillion parameters, a single card’s memory cannot hold the complete parameters and optimizer states. It relies on sharding strategies to distribute parameters, gradients, and optimizer states across multiple processes, completing synchronization through collective communication.

    A typical training startup configuration can be abstracted into the following pseudocode:

    1. training:
    2. world_size: 16
    3. nodes: 2
    4. strategy: sharded_data_parallel
    5. max_steps: 400
    6. gradient_clip: enabled
    7. checkpoint: enabled
    8. observability:
    9. - loss
    10. - grad_norm
    11. - step_time
    12. - memory_peak

    In this pipeline, the model loading phase needs to complete weight mapping and sharding initialization; the sharding scheduling phase must ensure each process holds the correct parameter slice; the forward and backward computation phases must handle multimodal inputs, variable-length sequences, and modality alignment; and the gradient synchronization phase requires cross-node collective communication. Sharded data parallelism reduces single-card memory pressure but introduces additional communication overhead. Therefore, engineering usually requires compute-communication overlap, topology-aware scheduling, and appropriate sharding granularity to balance memory and throughput.

    For multimodal training paths, extra attention must be paid to data loader throughput, image and text sample alignment, load imbalance caused by variable-length inputs, and the numerical stability of different modality encoders. The training system must not only “be able to compute” but also ensure the data pipeline does not become a short board for long-term stable operation.

    3. Numerical Stability and Observability: The Baseline for Stable Training

    This experiment emphasized that loss values and gradient norms remained finite throughout, with no numerical overflow or abnormal interruptions. For ultra-large model training, numerical stability is a more fundamental baseline than single-step performance. Common engineering methods include mixed precision training, loss scaling, gradient clipping, parameter normalization, outlier detection, and periodic checkpointing.

    It is recommended to establish the following observability metrics in training tasks:

    • Loss value and its moving average;
    • Gradient norm and parameter norm;
    • Activation range and overflow count;
    • Single-step time, communication time, and data loading time;
    • Peak memory and fragmentation;
    • Checkpoint save success rate and restoration time.

    These metrics should be integrated into logging services and monitoring alert systems. In the event of a sudden loss spike, abnormal gradient norm, or communication timeout, teams can quickly determine whether it is a data issue, a numerical issue, or a network issue. For cross-node training, inter-node network jitter and collective communication timeouts require particular attention.

    4. Engineering System: From Rapid Inference Deployment to Full-Pipeline Stable Training

    This practice also reflects an engineering capability: transitioning from “rapid inference deployment” to “full-pipeline stable training.” Inference deployment focuses on operator compatibility, memory footprint, and throughput; training adaptation additionally requires backward propagation, gradient synchronization, optimizer state management, checkpoint recovery, and long-term stable operation. The difficulties are different and cannot be simply equated.

    In enterprise deployments, teams can leverage general capabilities provided by Baidu AI Cloud, such as container platforms, object storage, log services, and monitoring alerts, to build the orchestration, data carrying, and observability foundation for training tasks. For example, using container platforms to unify training environments, object storage to carry datasets and checkpoints, and logging/monitoring to track training health. These general capabilities do not alter the model training logic but can significantly reduce the costs of environment inconsistency, data loss, and fault localization.

    For ultra-large model training, a phased validation strategy is recommended:

    1. Single-node single-GPU functional verification: Confirm model loading, forward/backward passes, and operator correctness;
    2. Single-node multi-GPU verification: Validate inter-card communication, sharding strategies, and memory footprint;
    3. Cross-node multi-GPU verification: Validate inter-node networking, collective communication, and process scheduling;
    4. Long-term stability testing: Run continuously for hundreds to thousands of steps, observing loss values, gradient norms, and step times;
    5. Accuracy regression: Confirm on a small-scale evaluation set that the training logic has introduced no bias;
    6. Fault-tolerance and resume: Simulate recovery from a checkpoint after a fault to verify state consistency.

    5. From “Can Train” to “Out-of-the-Box Training”

    Public technical practices indicate that the industry is advancing the coordinated validation of domestic computing power and domestic models around the full-process training of hundred-billion-level scientific foundation models, 5D world models, and embodied brain models; larger-scale trillion-parameter training continues to be an ongoing engineering challenge. The stable operation of this dual-node 16-GPU setup for 400 consecutive steps demonstrates that domestic full-function GPUs possess initial capabilities to support the pipeline from inference deployment to training for cutting-edge complex large models, though engineering standardization work remains to achieve “out-of-the-box training.”

    “Out-of-the-box training” encompasses at least four layers of meaning: reproducible environments, configurable strategies, observable anomalies, and recoverable faults. Moving forward, continuous polishing of operator adaptation, multi-GPU coordination, automated toolchains, and training best practices is needed to consolidate one-off adaptation experiences into reusable training templates and checklists. For developers, evaluating whether a training adaptation is truly viable should not focus merely on “whether it runs,” but on whether it can maintain stability, observability, and recoverability under longer steps, larger clusters, and real data pipelines. This is the core of engineering ultra-large model training.