Getting an LLM Training Pipeline Running on a Chinese-Made AI Compute Cluster: An Engineering Practice

    This article explains how to validate a full large language model training pipeline on a multi-node cluster of Chinese-made accelerators. It uses a two-node, 16-GPU run of 400 steps as the reference target. Readers will find guidance on environment consistency, parallelism strategy selection, what a multi-hundred-step test reveals, and common failure modes with troubleshooting approaches.

    1. Introduction: Why Validate the Training Pipeline

    As large language models keep growing in parameter count, single-accelerator training can no longer meet the requirements, so multi-node, multi-GPU distributed training has become the standard setup. However, a cluster that powers on is far from a cluster that trains stably. Many engineering details sit in between: driver and operator library compatibility, parallelism strategy selection, inter-node communication efficiency, memory management, and checkpoint-based resumption. A failure in any one of these can cause training to fail or cut efficiency sharply.

    Therefore, before committing to a large-scale training run, it is a widely accepted practice to first use a small configuration (for example, two nodes with 16 GPUs in total) to bring up the full training pipeline and verify it over several hundred steps. This article uses the validation goal of “completing 400 steps on two nodes with 16 GPUs” as a representative example. It breaks down the key technical stages and best practices.

    2. Overall Architecture of the Training Pipeline

    A complete large model training pipeline typically consists of the following layers:

    1. Hardware layer: accelerator cards, NVLink or a comparable high-speed interconnect, and RDMA networking between nodes.
    2. System layer: the operating system, drivers, communication libraries, and the container runtime.
    3. Framework layer: the distributed training framework, which handles parallel partitioning, gradient synchronization, and scheduling.
    4. Model layer: model definition, parallelism configuration, and the data loading pipeline.
    5. Operations layer: logging services, monitoring and alerting, and checkpoint management.

    Getting the pipeline to run means these five layers work together. The model runs forward and backward passes, updates its parameters, and produces a loss curve that follows the expected trend.

    3. Environment Preparation and Consistency

    The first hurdle in multi-node training is environment consistency. The driver version, operator library version, and training framework version must match exactly on every node. Otherwise, you may encounter numerical anomalies or communication hangs that are very hard to trace. The recommended practices are:

    • Use a unified container image that bundles the driver user-space libraries, the training framework, and all dependencies.
    • Distribute configuration through a configuration management tool to avoid the drift that comes from installing software manually on each machine.
    • Run an environment self-check script before launch to verify that each node’s GPU count, interconnect topology, and network bandwidth meet the requirements.

    An illustrative self-check logic is as follows:

    1. def check_cluster(nodes, expected_gpus=8):
    2. for node in nodes:
    3. assert node.gpu_count() == expected_gpus, "GPU count mismatch"
    4. assert node.rdma_bandwidth() > THRESHOLD, "RDMA bandwidth below threshold"
    5. assert node.lib_version() == BASELINE, "Library version mismatch"

    4. Choosing a Parallelism Strategy

    At the scale of two nodes with 16 GPUs, the parallelism strategy must be chosen based on the model’s parameter count:

    • Data Parallelism (DP): the most basic approach. Each GPU holds a full model replica, and the data is split across them. Combined with gradient sharding, it can substantially reduce memory usage, which makes it suitable for full fine-tuning of models in the 10-billion-parameter class or smaller.
    • Tensor Parallelism (TP): splits the weights of individual layers across multiple GPUs. It depends on high-speed interconnects between cards and is typically limited to a single 8-GPU node.
    • Pipeline Parallelism (PP): splits layers across different nodes. It has low inter-node communication volume, but it introduces pipeline bubble overhead, so it requires careful micro-batch scheduling.

    A common engineering combination is a 3D hybrid scheme: tensor parallelism within each node, pipeline parallelism across nodes, and data parallelism as the outer layer. During validation, start with the simplest configuration, such as pure data parallelism, to get the pipeline running. Then add parallelism dimensions one at a time. This makes problems easier to isolate.

    5. What a 400-Step Validation Run Tells You

    Why choose 400 steps instead of treating a single successful step as a pass? The reasons are:

    1. Numerical stability: the first few dozen steps mainly verify that the loss decreases normally and that NaN values or gradient explosions do not occur.
    2. Memory stability: sustained runs of several hundred steps can expose slow-building problems such as memory fragmentation and memory leaks.
    3. Communication stability: long periods of high-frequency gradient synchronization test network reliability under sustained load.
    4. Throughput target: measuring throughput (samples processed per second) at steady state shows whether effective compute utilization reaches the expected range.

    The recommended minimum pass criteria are: a healthy overall downward loss trend, throughput fluctuation within a reasonable range, no abnormal process exits, and checkpoints that save and restore correctly.

    6. Common Issues and Troubleshooting

    The following issues appear frequently in practice:

    • Hangs at startup: usually caused by incorrect communication library configuration. Check the network interface bindings and the topology detection results.
    • Loss fails to converge: first reproduce the problem on a single GPU in a single node to confirm that the data pipeline and learning rate settings are correct. Then investigate the parallelism implementation.
    • Out-of-memory (OOM) errors during training: enable activation recomputation, shard the optimizer states, or reduce the micro-batch size.
    • Throughput below expectations: use a performance profiling tool to distinguish compute bottlenecks from communication bottlenecks, then optimize accordingly.

    7. Conclusion

    Completing 400 steps on two nodes with 16 GPUs may look like a modest milestone, but it is a comprehensive test of how well the hardware, system, framework, and algorithm layers work together. For teams that plan to run large model training on Chinese-made compute or self-built clusters, following the path of “unified environment, minimal configuration first, progressive addition of parallelism, and long-run validation” can substantially reduce trial-and-error costs. As compute resources become more diverse, mastering this general-purpose training pipeline methodology has more lasting value than depending on any single platform.