A Practical Guide to Full-Pipeline LLM Training Adaptation on Domestic AI Computing Platforms in China

    This guide covers how to adapt large model training to domestic AI computing platforms in China. It explains three criteria for judging platform maturity, how to build a native FSDP2 path for multimodal models, the sharding and communication trade-offs involved, and methods for keeping long training runs stable.

    1. From “Able to Run Inference” to “Able to Train Stably”: The Real Dividing Line in Compute Adaptation

    In the large model infrastructure field, a common misconception is that adapting an accelerator card is complete once it can deploy mainstream models for inference. In fact, training places requirements on computing platforms that differ from inference by orders of magnitude.

    In inference, operators are dominated by matrix multiplication and attention computation, the computation graph is fixed, and memory usage is predictable. Even if some operators are missing, the system can fall back to generic implementations. Training is very different. It requires full backward propagation operator support, high-precision gradient reduction communication, memory fragmentation management over long runs, and numerical stability across hundreds or even thousands of iterations. A single interrupted training job can waste several days of compute and time.

    For this reason, the industry increasingly judges whether a computing platform is truly mature by three hard criteria: whether it can complete full or large-scale parameter fine-tuning of a foundation model; whether it can run stably for long enough step counts on a multi-node, multi-GPU topology; and whether it can complete end-to-end adaptation shortly after frontier model architectures, such as mixture-of-experts and multimodal models, are released. This article examines the engineering practices for large model training adaptation along these three dimensions.

    2. The Core of Training Pipeline Adaptation: Building a Native FSDP2 Path

    Fully Sharded Data Parallel (FSDP) is one of the mainstream parallelism paradigms for large model training today. It shards model parameters, gradients, and optimizer states across devices along the data parallel dimension. During forward and backward computation, parameters are gathered (all-gather) on demand and released right after use. This reduces per-device memory pressure to a fraction of its original level. The newer implementation, often called FSDP2, uses a tensor-sharding-based abstraction, so parameter sharding and distributed tensor computation combine more naturally. It also provides a unified interface for hybrid parallel strategies that combine data parallelism, tensor parallelism, and expert parallelism.

    Building a “native” FSDP2 multimodal training path on a computing platform differs fundamentally from “compatibility-based porting.” A native path means:

    1. Model loading. The platform supports loading very large model weights directly in sharded form, rather than aggregating them on a single device and then splitting them. For multimodal models with tens to hundreds of billions of parameters (a vision encoder plus a language model backbone), the loading path must handle sharding strategies for each heterogeneous submodule separately. This prevents memory peaks from overflowing during loading.

    2. Shard scheduling. The difficulty in multimodal models is that submodules differ greatly in compute density. The vision tower has few parameters but large activations, while the language backbone has many parameters but shards efficiently. A native path must allow different sharding granularity and activation checkpointing strategies for different submodules, rather than applying one approach to everything.

    3. Gradient synchronization. In backpropagation, gradient reduction (all-reduce or reduce-scatter) accounts for most of the cross-device communication. A native implementation requires the communication library to be deeply adapted to the platform’s interconnect topology. This includes overlapping communication with computation, tuning gradient bucketing strategies, and preserving gradient reduction precision under mixed-precision training.

    A typical sharding configuration looks like this:

    1. # Illustrative config: differentiated sharding strategy for a multimodal model
    2. sharding_plan = {
    3. "vision_encoder": {
    4. "strategy": "full_shard",
    5. "reshard_after_forward": True, # Release gathered parameters right after the forward pass
    6. "checkpoint_activations": True, # Recompute activations to save memory
    7. },
    8. "language_backbone": {
    9. "strategy": "full_shard",
    10. "reshard_after_forward": False, # Keep parameters for the backward pass to reduce communication
    11. "checkpoint_activations": "selective",
    12. },
    13. "projector": {
    14. "strategy": "replicate", # Replicate small modules directly to avoid communication overhead
    15. },
    16. }

    The engineering logic behind this configuration is that a sharding strategy trades off memory usage, communication overhead, and compute efficiency. The value of a native training path lies in exposing these trade-off controls fully to the people who use the training framework.

    3. Long-Running Stability: The Real Test of Training Adaptation

    Completing the pipeline is only the first step. The real test is stability over long, continuous training. The industry typically uses “stable operation for several hundred or several thousand steps” as a staged acceptance criterion, for these reasons:

    • Memory fragmentation accumulates over time. Dynamic shapes, such as images of different resolutions and text sequences of different lengths in multimodal inputs, keep changing memory allocation patterns. Fragmentation often surfaces as out-of-memory (OOM) errors only after hundreds of steps.
    • Communication jitter grows with scale. In cross-machine topologies such as two machines with 16 cards, bandwidth differs noticeably between intra-node interconnects and cross-node networks. Synchronous training amplifies any slow node, or straggler, so techniques such as communication compression and hierarchical reduction are needed.
    • Numerical stability needs time to verify. Loss spikes in mixed-precision training do not occur on every run. Only sufficiently long training curves expose problems in gradient scaling and reduction precision.

    Common engineering methods for ensuring long-running stability include resumable periodic checkpoints with automatic restart after failures, pooled memory management with defragmentation, lossless or lossy fault-tolerant communication during training, and a monitoring and alerting system that covers loss curves, gradient norms, and communication time. These capabilities do not depend on any specific vendor’s product. They are general requirements for training platform engineering.

    4. Multi-Route Validation: Drawing the Boundary Between Inference and Training Adaptation

    Model developers often report validation across several compute routes in their technical reports. Such parallel validation mostly concerns the correctness and performance of inference operators. It does not indicate which compute platform was used for foundation model pretraining. For engineering teams, this means two things.

    First, a model running inference on a platform should not be treated as evidence of that platform’s training capability. The two need to be assessed independently. Second, when evaluating training adaptation results, focus on the specific training configuration being claimed: full-parameter training or parameter-efficient fine-tuning, single-node or multi-node, how many steps were run, and whether the loss converged normally. These details determine the real value of the result.

    For enterprise users who reproduce such training in their own or rented compute environments, including container platforms, object storage, and monitoring and alerting services on general-purpose clouds, a standardized acceptance process is recommended. First, validate operator and numerical correctness with a small-scale, short-step run. Next, scale to the target topology to verify throughput and stability. Finally, confirm engineering readiness with a long training curve.

    5. Conclusion: An Engineering System Matters More Than Isolated Breakthroughs

    A single successful model adaptation can be achieved through a focused effort. Keeping up with the evolution of frontier model architectures, however, depends on a mature engineering system. That system includes a unified operator development and validation pipeline, distributed training frameworks that cover mainstream parallel strategies, reusable communication and memory optimization components, and integrated support for rapid inference deployment followed by end-to-end stable training. For the domestic computing ecosystem, the platforms that make this system more general and more stable will be better positioned in the large model infrastructure race. For developers, understanding the FSDP2 sharding mechanism, the resource characteristics of multimodal training, and the methods for ensuring long-running stability are core skills that apply on any computing platform.