FSDP2 Multimodal Training on Domestic GPUs: A Dual-Node 16-GPU Test and Stability Checklist

    This article examines what it takes to move beyond inference and run stable multi-node training with native FSDP2 on domestic GPUs. It walks through model loading and sharding, forward and backward computation, gradient synchronization, and optimizer updates; reports the results and limits of a two-node, 16-GPU, 400-step test; and provides reproducibility requirements, stability metrics, failure criteria, and a migration checklist.

    Running inference does not mean a system can reliably complete long-running, multi-node training jobs. The training path involves model loading, parameter sharding, forward and backward computation, gradient synchronization, and optimizer updates. Each stage can become a bottleneck or a failure point. This article uses native FSDP2 as the main thread to explain the key stages of the training path and summarizes the conclusions and limitations of a two-node, 16-GPU test so teams can assess their own migration work.

    Key Stages of the FSDP2 Training Path

    1. Model Loading and Sharding

    FSDP2 calls the sharding interface layer by layer at the module level. Parameters are split as tensors across processes, and each process stores only the portion it is responsible for. Peak memory must be controlled during loading. A common approach is to build the model structure on CPU or a meta device first, then load weights in a sharded manner. This avoids the full model briefly landing on a single GPU and causing an OOM (out-of-memory) error.

    2. Forward and Backward Computation

    Before forward computation, the framework uses All-Gather to aggregate the parameters required by the current layer on demand. After computation finishes, unnecessary copies are released. In the backward stage, parameters are aggregated again and gradients are computed. Whether communication and computation can overlap depends on operator efficiency and the parameter prefetch strategy. Teams need to use profiling tools to confirm whether communication latency is hidden by computation.

    3. Gradient Synchronization and Optimizer Updates

    Gradients produced during backward computation are distributed through Reduce-Scatter. Each process receives only the gradient result corresponding to its shard. Optimizer states are also stored in shards, so per-GPU optimizer memory usage decreases as the number of processes increases.

    Dual-Node 16-GPU Test: Results and Boundaries

    The test used two machines with 16 compute GPUs in total. Sixteen training processes completed 400 consecutive optimizer updates. During the test, the loss value and gradient norm remained finite. No NaN or Inf appeared, and there was no abnormal interruption.

    These results show that under the test conditions, the training path ran continuously for 400 steps, numerical checks passed, and cross-node communication did not cause interruption. However, they do not directly prove that the same configuration will remain stable with longer runs, larger models, different data distributions, or failure scenarios. Four hundred steps is a short-range validation. Supporting a stability conclusion requires longer stress testing and fault-injection results.

    The test report also needs the following information before the results can be reproduced:

    • Model size, architecture, and parameter count
    • Per-GPU batch size, global batch size, and sequence length
    • Mixed precision mode (BF16 or FP16) and loss scaling configuration
    • PyTorch and FSDP2 versions, and the communication backend
    • Inter-node network type and bandwidth, and intra-node accelerator interconnect
    • Optimizer type, learning rate schedule, and gradient clipping threshold
    • Monitoring frequency for loss and gradient norm, and the thresholds used to determine failure

    How to Determine Whether Training Is Stable

    Stability cannot be judged only by whether processes are still running. It is advisable to record the following metrics together:

    • Per-step loss, gradient norm, and learning rate, checking for NaN or Inf
    • Per-GPU peak memory, observing whether it keeps growing with steps
    • Per-step time and throughput, used to identify occasional communication jitter
    • Process exit codes and NCCL-related error logs

    A simple failure rule is: record a failure if consecutive non-finite values appear, if single-step time exceeds the baseline by several times, or if any process exits abnormally. Preserve the logs from the scene for troubleshooting.

    From “Can Train” to “Easy to Train”: Improvement Areas

    Getting the training environment to run is only the first step. When teams advance domestic GPU training, they can confirm the following checklist item by item:

    • Operator coverage: Are all operators required by the target model available, and do any need manual rewriting?
    • Topology adaptation: Is the multi-node communication strategy configured for the actual network topology?
    • Checkpoint resume: Have checkpoint saving and restoration been verified in practice?
    • Logging and alerting: Are loss anomalies, memory alerts, and process exits connected to monitoring?
    • Data loading: Can data-loading throughput keep up with GPU compute speed?

    Conclusion

    Native FSDP2 provides a clear engineering path for multimodal training on domestic GPUs. The two-node, 16-GPU, 400-step result shows that the basic training path can run. To turn these results into production capability, teams still need reproducible configurations, long-duration stress testing, and failure-recovery validation. Teams preparing to migrate can first complete small-scale validation according to the checklist and then scale gradually. This keeps risk lowest.