Domestic GPU Dual-Node 16-Card Training Adaptation: A 400-Step Validation Record

    This article details a 400-step training adaptation validation for a domestic GPU on a dual-node, 16-card configuration using FSDP2. It distinguishes between inference adaptation, training adaptation, and pre-training, outlines the FSDP2 sharded training workflow, and evaluates the hardware's stability and convergence. Additionally, it covers the three-layer engineering system required for mature deployment, a common troubleshooting checklist, and essential criteria for hardware evaluation.

    Inference Running Does Not Equal Training Usability

    Many teams evaluate an AI chip’s usability solely by checking if a model can be loaded and complete a forward pass. This type of validation is typically known as inference adaptation or Day 0 adaptation. Training adaptation, however, demands much more. It requires a complete pipeline covering backpropagation, gradient synchronization, optimizer state sharding, and numerical range control, while maintaining stability across multiple parameter updates.

    This article focuses on training adaptation validation. Its goal is to prove that an existing model can correctly execute the training process on new hardware, ensuring consistency in gradient calculation and parameter updates. It does not equate to pre-training from scratch, which requires initializing weights from zero and running for hundreds of thousands of steps to yield a usable model, requiring far greater compute and time than this validation.

    The differences among the three can be summarized as follows:

    • Inference adaptation: Validates model loading and forward computation, focusing on whether the output is correct.
    • Training adaptation validation: Validates backpropagation and parameter updates, focusing on stability and convergence trends over multiple steps.
    • Pre-training from scratch: Validates the complete training cycle, focusing on convergence quality and cost over long durations.

    Basic Workflow of FSDP2 Sharded Training

    This adaptation is based on the native FSDP2 (Fully Sharded Data Parallel 2) training path. FSDP2 shards model parameters, gradients, and optimizer states across GPUs layer by layer. Each card only holds a fraction of the state long-term, significantly reducing single-card memory pressure.

    A single training iteration generally involves the following steps:

    1. Model loading and sharding: Weights are sliced by layer. Each card loads the shard it is responsible for and records the shard index for on-demand cross-node retrieval.
    2. Parameter aggregation and forward computation: Before the forward pass, each card uses all-gather to temporarily collect the complete parameters needed for the current layer. Non-local shards are released after computation.
    3. Backpropagation and gradient reduction: During backpropagation, gradients are distributed to each card via reduce-scatter. Each card retains only the gradient results corresponding to its shard.
    4. Optimizer update: Each card updates only its local parameter shard and saves the corresponding first and second-order momentum, avoiding the replication of full optimizer states on every card.
    5. Numerical stability control: Reduces the probability of NaN or Inf during training through dynamic loss scaling, gradient norm clipping, and overflow detection.

    Multimodal models introduce two additional issues. First, vision encoders and text decoders have different structures and sensitivities to precision, requiring separate scaling strategies. Second, variations in batch sizes and sequence lengths for mixed image-text inputs mean that tensor shapes change dynamically during execution, placing strict requirements on sharding scheduling and operator interfaces.

    Dual-Node 16-Card Validation Design and Results

    The validation environment consisted of two machines, each equipped with 8 full-function GPUs, totaling 16 cards, interconnected via high-speed networking across nodes. Training utilized mixed precision (FP16 or BF16), with the AdamW optimizer and a cosine annealing learning rate schedule. The test objective was to have all 16 training processes participate, execute 400 consecutive optimizer updates, and record loss values and gradient norms throughout.

    It is important to note that the original test materials did not disclose parameters such as card models, memory capacity, framework version, sharding configuration, and global batch size. Therefore, this article makes no inferences about these configurations and no extended judgments regarding model scale. Readers should refer to publicly available versions of these parameters when citing the results.

    The validation results encompass three main aspects:

    1. Normal convergence: The loss value decreased gradually from its initial value without obvious divergence or violent oscillations in subsequent steps, indicating that backpropagation and parameter updates function properly on this hardware.
    2. Numerical stability: The gradient norm remained within a finite range throughout the process, with no occurrences of NaN or Inf. This relied on the automatic adjustment of the loss scaling factor and precision checks during sharded parameter updates.
    3. Continuous operation: Within the 400 steps, there were no abnormal process exits, no communication timeouts, and no node drops. This indicates that the basic communication links are usable for cross-node synchronous training at this scale.

    These results only prove that the training pipeline can run under the tested conditions. They do not guarantee the same stability at larger scales, over longer periods, or with different model architectures.

    Three Layers of the Engineering System

    A single successful validation does not signify mature capabilities. To enable new models to enter training quickly, the engineering system typically needs to cover the following three layers:

    • Operator layer: Requires efficient implementations for sparse structures and dynamic shapes. In MoE models, routing results cause significant variations in the number of samples received by different experts. Thus, the performance of grouped matrix multiplication and dynamic tensor reshaping heavily impacts training speed. When evaluating hardware at the operator layer, vendors should be required to provide benchmark data and test conditions for these operators.
    • Framework layer: Must support task submission, topology-aware scheduling, and checkpoint resumption. During long-term training, hardware failures and network jitter are difficult to avoid entirely. The system should be able to log anomaly signals, periodically save checkpoints, and migrate tasks upon node exceptions rather than terminating the entire run.
    • System layer: Requires continuous monitoring of throughput, memory usage, communication bandwidth utilization, and idle wait times. Looking solely at loss values and gradient norms cannot locate performance bottlenecks. Synchronization wait issues identified through profiling tools can usually be mitigated by adjusting sharding order and communication windows. Tuned parameters should be consolidated as default configurations for subsequent model reuse.

    Troubleshooting Checklist

    During the training adaptation process, the following issues are most common:

    • NaN or Inf: Check if loss scaling is effective, verify that the gradient norm clipping threshold is set reasonably, and locate the layer where the anomaly first occurred.
    • Communication timeout: Check the inter-node link status, ensure that the collective communication call order is consistent across all processes, and verify timeout parameters.
    • OOM (Out of Memory): Check the global batch size and sequence length, confirm whether the sharding strategy is effective, and evaluate if activation recomputation or parameter offloading is needed.
    • Checkpoint resumption failure: Verify that the shard indices, optimizer states, and random seeds in the checkpoint are completely saved.
    • Convergence anomaly after node migration: Confirm that the sharding layout before and after migration is consistent, and re-compare the loss curves of the initial steps.

    Information to Verify During Selection

    When evaluating domestic GPUs for training, one should not only look at the conclusion of “whether it runs,” but should require vendors to provide the following materials:

    • Card models, memory, interconnect methods, and framework versions used in testing.
    • Model architecture, parameter scale, batch size, and sequence length used for training.
    • Cross-node test steps, monitoring metrics, and failure records.
    • Calculation methods for throughput and utilization, along with baseline comparisons.
    • Support scope for MoE, long sequences, and multimodal architectures.

    If these details are missing from the materials, it is difficult to determine whether the conclusions can be transferred to your specific business scenario.

    Conclusion and Risk Warnings

    The dual-node 16-card, 400-step training adaptation validation demonstrates that domestic full-function GPUs possess basic feasibility in cross-node synchronous training. This is a significant progress, but it remains in the adaptation validation phase. Moving from stable operation to out-of-the-box training readiness requires continued investment in auto-tuning, multi-node scaling efficiency, and adaptation speed for new architectures.

    Users should be aware of two risks. First, framework compatibility layers typically introduce some performance overhead, which should be tested prior to migration. Second, compliance and privacy requirements for training data need to be evaluated separately and should not be ignored simply because the hardware is available.