Running Large-Model Training Pipelines on Domestic GPUs: Practices and Methodology
This article presents a practical methodology for validating end-to-end large-model training on domestic GPUs, using a two-node 16-GPU cluster and a 400-step training run as a reference case. It covers the full validation stack—hardware and drivers, collective communication, framework and operator support, parallel strategy, and data and convergence behavior—and discusses cluster setup, TP/PP/DP layout, data pipeline configuration, stability monitoring, common troubleshooting, and the path from pipeline validation to scaled training.
Running Large-Model Training Pipelines on Domestic GPUs: Practices and Methodology
I. Background: Why “Running Through the Training Pipeline” Is a Key Milestone for Domestic Compute
In recent years, as large-model parameter scales continue to grow, training compute has become core infrastructure for the development of the AI industry. With diversified compute supply, more and more enterprises are exploring how to complete large-model training and fine-tuning on domestic GPUs. A recent typical case in the industry is that a domestic GPU vendor, together with ecosystem partners, successfully ran the complete training pipeline of an open-source large model with tens of billions to hundreds of billions of parameters on a two-node 16-GPU cluster, stably completing 400 training iterations.
Behind this seemingly simple number is a complex engineering validation system. For developers, “completing 400 steps” is far more than making the program run without errors. It means full-stack validation from hardware drivers, communication libraries, and parallel frameworks to operator adaptation and data pipelines. Using such practices as a blueprint, this article systematically breaks down the complete methodology for validating large-model training pipelines on domestic compute.
II. Overall Framework for Training Pipeline Validation
The so-called “training pipeline” refers to the complete loop from raw data input to model weight updates. A rigorous pipeline validation should cover at least the following five layers:
- Hardware and driver layer: GPU devices can be correctly recognized by the operating system and compute runtime, and inter-device interconnect (such as RDMA networks) works properly.
- Communication layer: Collective communication across multi-node multi-GPU setups (AllReduce, AllGather, etc.) is available and bandwidth meets requirements.
- Framework and operator layer: The deep learning framework can execute forward and backward computation on the target hardware, and key operators (such as attention and normalization) have corresponding implementations.
- Parallel strategy layer: Data parallelism, tensor parallelism, pipeline parallelism, and other strategies can be correctly combined, and partitioning logic is correct.
- Data and convergence layer: Data loading, tokenization, and batching work properly, and the loss function decreases as expected.
A two-node 16-GPU configuration is exactly a “minimum viable cluster” for validating the above five layers: it involves both intra-node multi-GPU communication and cross-node communication, which is enough to expose most pipeline issues, while avoiding the heavy asset investment of hundreds of GPUs.
III. Environment Preparation and Cluster Setup
3.1 Hardware Topology Confirmation
In a two-node 16-GPU scenario, each server is equipped with 8 GPU accelerators, and the two machines are interconnected through a high-speed network. The first step in engineering practice is to confirm the hardware topology:
# Check local GPU device recognition (using a generic tool as an example)vendor-smi# Check NIC and RDMA statusibstat # or the corresponding high-speed NIC diagnostic command# Verify network connectivity and bandwidth between the two machinesping <peer_ip># Use a bandwidth testing tool to verify point-to-point throughput
Particular attention should be paid to the intra-node GPU interconnect method (PCIe or high-speed inter-chip interconnect) and cross-node network bandwidth, as these directly determine the choice of subsequent parallel strategies. For example, when intra-node bandwidth is much higher than cross-node bandwidth, tensor parallelism should be limited to the 8 GPUs within a single node as much as possible, while data parallelism or pipeline parallelism is used across nodes.
3.2 Software Stack Adaptation
The software stack usually includes: GPU drivers, compute runtime (a CUDA-like ecosystem programming interface), collective communication libraries, deep learning frameworks, and their domestic hardware adaptation layers. Common practices include:
- Using vendor-provided container images as the base environment to avoid dependency hell caused by manual installation;
- Confirming the compatibility matrix between framework versions and communication library versions;
- Validating software stack availability layer by layer through small operator-level unit tests (such as matrix multiplication and AllReduce), rather than directly launching large-model training.
The rule of thumb at this step is: validate communication first, then computation, and finally end-to-end operation. Many “training won’t run” problems actually stem from communication library configuration errors or NIC driver mismatches.
IV. Selection and Validation of Parallel Strategies
4.1 Typical Parallel Combinations Under 16 GPUs
For large-model training, the resource scale of 16 GPUs means it is impossible to fit the full model with data parallelism alone (especially at the hundred-billion-parameter level), so model parallelism must be introduced. A common combination in the industry is:
- Tensor parallelism (TP) = 8: Split the weights of a single layer by columns or rows across the 8 GPUs in one node, using intra-node high bandwidth for intra-layer communication;
- Pipeline parallelism (PP) = 2: Split model layers by stage across two machines, with only activations transferred across nodes, resulting in low communication volume;
- Data parallelism (DP) = 1: During the validation phase, data parallelism is not stacked first, simplifying problem localization.
This “TP intra-node, PP cross-node” layout is a classic communication-topology-aware approach. If the model scale is smaller, a simpler solution of TP=8 + DP=2 can also be used.
4.2 Validation Methods for Parallel Correctness
Incorrect parallel strategy configuration often does not immediately produce an error, but instead manifests as loss non-convergence or results inconsistent with a single GPU. Recommended validation steps include:
- Weight consistency check: After training for several steps, compare the gradients of each parallel group with the theoretical values from single-GPU small-batch training;
- Loss curve alignment: Under a fixed random seed and fixed data order, compare the loss trajectory of parallel training with a reference implementation; the early phase should basically overlap;
- Gradual pressure increase: First run a small model with a small vocabulary, then switch to the target large model, avoiding the introduction of multiple variables at the same time.
V. Data Pipeline and Training Configuration
Key work on the data side includes:
- Data preprocessing: Tokenize the corpus, pack it into fixed-length sequences, and store it in an efficient binary format to avoid repeatedly parsing text during training;
- Distributed sampling: Ensure that samples are not duplicated or missed across different data parallel ranks, usually through a global seed plus rank offset;
- Batch assembly: Reasonably set the micro batch size and gradient accumulation steps to maximize throughput under memory constraints. For example, global batch = DP size × micro batch × accumulation steps.
For hyperparameters, conservative configurations are recommended during validation: a lower learning rate, gradient clipping enabled, and mixed precision (such as BF16) training. Compared with FP16, BF16 has a wider dynamic range and is less prone to gradient overflow in large-model training, and has become a mainstream choice in the industry.
VI. Significance and Observation Metrics of 400-Step Stability Validation
Why does the industry often use “completing hundreds of steps” as the standard for pipeline validation? The reasons are:
- The first few steps mainly expose obvious errors such as initialization and shape mismatches;
- Dozens to hundreds of steps allow observation of whether the loss decreases normally and whether the gradient norm is stable, exposing operator precision and parallel logic issues;
- Continuous operation for hundreds of steps tests long-run issues such as memory fragmentation, memory leaks, and communication stability.
During the 400-step validation process, the following metrics should be closely monitored:
| Metric | Healthy behavior | Abnormal signal |
|---|---|---|
| Training loss | Smooth decline | Oscillation, NaN, prolonged non-decrease |
| Gradient norm | Stable within a reasonable range | Continuous surge or zero |
| GPU memory usage | Balanced across GPUs, no slow climb | Gradual increase (sign of leak) |
| Time per step | Fluctuation less than ±5% | Periodic jitter (communication or data bottleneck) |
| GPU utilization | Consistently high | Frequent idle (data starvation) |
With general cloud monitoring, alerting, and logging capabilities, the above metrics can be visualized and threshold alerts can be set, greatly shortening troubleshooting time.
VII. Common Issues and Troubleshooting Approaches
Based on extensive engineering practice, the most commonly encountered issues and countermeasures in domestic compute training validation are as follows:
- Unsupported operators or precision mismatch: Manifested as errors during forward computation or abnormal loss. The countermeasure is to locate the specific operator, compare it with a reference implementation, and use equivalent operator combinations if necessary.
- Communication timeout or hang: Mostly caused by network configuration, firewalls, or incorrect communication library environment variables. A minimal communication test program should be used first to isolate the problem.
- Out of memory (OOM): Mitigated by reducing micro batch size, enabling activation checkpointing, and optimizing parallel partitioning.
- Throughput below expectation: Use profiling tools to break down the time proportions of computation, communication, and data loading, and optimize accordingly—if communication accounts for a high proportion, adjust the parallel layout; if data loading is slow, increase prefetch threads or optimize storage reads.
VIII. From Pipeline Validation to Scaled Training
Completing 400-step validation is only the starting point. Moving toward scaled training also requires:
- Long-run training capability: Add checkpoint saving and resuming, as well as automatic fault restart mechanisms;
- Performance tuning: Operator fusion, communication-computation overlap, and asynchronous data pipelines;
- Cost evaluation: Estimate total training time and resource consumption based on measured throughput, and use cloud container platforms and elastic compute resources to scale the cluster on demand and control overall cost.
IX. Conclusion
Completing 400 steps on a two-node 16-GPU cluster is a landmark validation showing that large-model training on domestic compute is moving from “unusable” to “usable.” The core of the methodology is: layered validation, communication first, parallel topology awareness, and metric-driven stability observation. As the domestic GPU software ecosystem continues to mature, and as cloud infrastructure supports general capabilities such as elastic compute, container scheduling, and monitoring and alerting, large-model training and fine-tuning on diverse compute is moving from individual cases toward a replicable engineering paradigm. For developers, mastering this pipeline validation method has more long-term value than remembering a single number.
