Long-Context LLM Training on 16 Domestic GPUs Across Two Nodes: A Practical Field Report
This article documents a 400-step training run of the K3.1 model series on a two-node, 16-GPU cluster built with domestic (non-CUDA) accelerators. It covers communication topology planning, CUDA-to-domestic software stack migration, parallelism strategy, memory optimization for ultra-long sequences, fault tolerance, and a practical checklist for teams planning similar deployments. Readers will learn what was validated, why specific engineering choices were made, and which metrics they need to measure themselves.
1. What This Validation Answers
Whether domestic GPUs can support end-to-end large-model training has long lacked publicly available engineering details. In this work, we trained the K3.1 model series for 400 steps on a two-node, 16-GPU cluster, with the goal of confirming that the full training pipeline can run from start to finish. The scope of validation is a small-scale cluster; this article does not draw conclusions about scaling to larger deployments.
Because the available validation materials do not provide concrete figures for throughput, peak memory usage, or communication overhead, this article only describes what was done, why it was done this way, and which metrics readers should measure on their own.
2. Planning the Communication Topology for Two Nodes and 16 GPUs
The cluster consists of two servers, each equipped with 8 compute cards. Within a single server, the 8 cards communicate over high-speed intra-node interconnects, so inter-card data does not need to be routed through host memory. The two servers are connected via high-speed NICs, and cross-node communication uses the RDMA protocol.
Topology planning addresses two problems.
First, intra-node communication should use the high-speed interconnect whenever possible, avoiding detours through CPU memory. The specific interconnect type depends on the platform in use; readers should refer to the vendor’s documentation.
Second, cross-node links have higher latency and limited bandwidth, so data transfer across nodes should be minimized. The approach is to keep the most communication-intensive operations within a single machine, and only synchronize less frequent, larger-volume gradients across nodes.
Before training begins, use benchmarking tools to measure intra-node bandwidth, cross-node bandwidth, and communication latency, and confirm they match expectations before launching the formal training run. This step catches cabling errors and NIC misconfiguration early.
3. Migrating the Software Stack: Get It Running First, Then Optimize
Migrating from the CUDA ecosystem to a domestic compute platform is difficult because operator libraries, communication libraries, and low-level framework interfaces all need adaptation. Simply changing compilation commands is usually not enough.
We recommend a two-step approach.
Step one: get the model running. Use the adaptation layer provided by the platform, keep the original code unchanged as much as possible, and verify that forward computation, backpropagation, and optimizer updates all execute correctly. The goal of this step is to obtain correct results that can serve as a comparison baseline.
Step two: optimize for performance. Common techniques include operator fusion, which merges multiple small operators into a single kernel to reduce launch overhead. For collective communication operations such as AllReduce and AllGather, measure their actual bandwidth on the platform, and use the platform’s customized communication library if necessary.
Throughout the migration, record the version numbers of the framework, operator library, and communication library. Different version combinations can produce different failure modes and performance results.
4. Configuring the Parallelism Strategy: The Arithmetic of 16 GPUs
Sixteen GPUs can be partitioned across different parallelism dimensions, but the product of all parallelism degrees must equal the total number of GPUs. The configuration in this run is as follows.
- Tensor parallelism with degree 8: the 8 cards within each server jointly compute the large matrix multiplications of the same layer.
- Data parallelism with degree 2: the two servers process different micro-batches, and gradients are synchronized between the two machines.
- Pipeline parallelism with degree 1: 8 multiplied by 2 already occupies all 16 GPUs, so there are no additional pipeline stages.
Sequence parallelism is used for ultra-long sequence scenarios and is responsible for splitting the activations of operations such as LayerNorm and Dropout. It typically reuses the tensor parallelism communication group and does not consume additional GPUs.
Based on the actual GPU allocation, this setup has only two parallelism dimensions: tensor parallelism and data parallelism. It should not be described as four-dimensional parallelism. When planning your own cluster, first determine the GPU count for each dimension using this arithmetic, and only then discuss further optimizations.
5. Saving Memory for Ultra-Long Sequences
Ultra-long sequences cause activations to consume large amounts of memory. This validation mainly used two categories of methods.
Activation recomputation: during the forward pass, only a small number of key nodes are saved, and the remaining intermediate results are recomputed during backpropagation. This trades compute time for memory. The longer the sequence, the more memory is saved—and the longer the computation takes.
ZeRO optimizer state sharding: optimizer states and gradients are sharded across the GPUs, so each card stores only a portion. The benefit of sharding is directly tied to the data parallelism degree. With a data parallelism degree of 2, each card can save at most about half of the optimizer states, so the benefit is limited. Whether this can be applied to other 16-GPU configurations must be recalculated against the memory budget.
For scheduling, communication and computation overlap on the timeline. While waiting for gradient synchronization, the compute units can start the next micro-batch, reducing idle time.
6. Preventing Training Interruptions and Troubleshooting Failures
No training interruptions were observed during this 400-step run. It should be noted that the validation materials contain no fault injection test results, so “no interruption” only reflects this single run and does not guarantee stability in all scenarios.
Fault tolerance typically involves three layers.
First, communication timeout detection and reconnection. When a link jitters, the system attempts to re-establish the connection instead of terminating the process outright.
Second, periodic asynchronous checkpointing. Snapshots are written in the background, minimizing blocking of training iterations. The save interval should match the acceptable cost of losing progress to a single failure.
Third, key tensor validation. After gradient aggregation, perform lightweight checks—for example, detecting NaN values or values outside a reasonable range. When an anomaly is found, it should be traced to the specific GPU.
The following table can serve as a troubleshooting reference.
| Symptom | Metrics to Check First | Common Actions |
|---|---|---|
| Iteration time suddenly increases | Per-GPU compute utilization, communication time | Check for straggler GPUs or degraded links; isolate the node if necessary |
| Process exits with communication timeout | NIC status, cross-node latency, timeout parameters | Inspect network connections, verify the reconnection mechanism works, resume from the latest checkpoint |
| Loss shows NaN or suddenly diverges | Gradient norm, key tensor validation results | Roll back to the most recent healthy checkpoint, locate the faulty GPU, investigate numerical issues |
| Out of memory | Peak memory usage, activation footprint | Reduce micro-batch size or sequence length, enable recomputation, or increase the sharding degree |
7. Recommendations for Teams Planning Deployment
- Run benchmarks first and record intra-node bandwidth, cross-node bandwidth, and communication latency as a baseline for later comparison.
- Pin the versions of the framework, operator library, and communication library, and write them into configuration files.
- Determine the parallelism plan following the principle that the product of parallelism degrees equals the total GPU count, and document how many GPUs each dimension occupies.
- First get the pipeline working with shorter sequences and smaller batches, then gradually increase sequence length.
- After each tuning change, record throughput, peak memory usage, and the loss curve to keep results reproducible.
- Before formal training, run a fault injection test—for example, deliberately disconnecting a link—to confirm that reconnection and recovery procedures work.
