# Large Model Training Adaptation on Domestic GPUs: A Technical Breakdown

    This article breaks down what it really takes to train large models stably on domestic GPUs. It separates three often-conflated concepts (inference adaptation, training adaptation, and full pretraining), dissects a recent case in which a domestic GPU vendor completed 400 consecutive optimizer updates of a trillion-parameter open-source model on 16 cards across two servers, and walks through the six technical areas that training adaptation touches: parameter sharding and model loading, operator and compute-graph correctness, mixed precision and numerical stability, cross-node collective communication, memory and recomputation, and validation strategy. It closes with a four-layer validation matrix, practical stability criteria, a troubleshooting checklist, and four common misconceptions to avoid when evaluating an adaptation claim.

    1. Introduction: What Separates “Can Run Inference” from “Can Train Stably”

    “A domestic chip has adapted to model X” has become a staple of industry news. But what does “adaptation complete” actually mean? That the model can run inference on the new hardware? That it can train stably? Or that it can be pretrained from scratch on that hardware? These three milestones sit at very different technical levels. Conflating them both overstates a single point of progress and hides the part that is genuinely hard.

    Recently, a domestic GPU vendor completed training adaptation for a trillion-parameter open-source flagship model. The work was built on the vendor’s own software stack and implemented a native parameter-sharding training path (FSDP2), covering model loading, parameter-shard scheduling, and gradient synchronization end to end. In the validation run, the vendor placed 16 training accelerator cards across two servers into 16 training processes and completed 400 consecutive optimizer updates. Training loss and gradient norms stayed finite throughout, with no numerical overflow and no abnormal interruption.

    The case makes a good entry point. This article does not set out to evaluate any particular product. Instead, it uses the case as a thread to lay out systematically the core technical problems that must be solved for full-chain stable training of large models on domestic GPUs, together with a practical validation methodology.

    2. Clearing Up the Terminology: Three Kinds of “Adaptation” Should Not Be Mixed

    Dimension Inference adaptation Training adaptation Full pretraining
    Core goal The model runs and answers correctly The model trains and stays stable Acquiring general capability from scratch
    Chain involved Forward compute, memory and throughput optimization Forward and backward passes, parameter sharding, gradient reduction, optimizer update, numerical stability Long-horizon training on large clusters, data mixture design
    Typical validation Accuracy alignment, latency and throughput tests Short continuous training runs, loss and gradient-norm monitoring, numerical alignment A complete training cycle plus quality evaluation
    Hardware requirement Medium High Very high

    Three clarifications:

    1. Day-one support is not training capability. Getting inference working on launch day tests operator coverage and turnaround speed. Training adaptation requires the backward pass, distributed synchronization, and numerical stability to hold at the same time, which is a different order of difficulty.
    2. Parallel validation is not evidence of where the compute came from. When a technical report presents results on several hardware paths side by side, the usual purpose is to demonstrate portability or to complete inference operator validation. It is not a basis for inferring which class of chip powered pretraining of the base model. The source of pretraining compute counts only when the model owner states it explicitly.
    3. Adaptation complete is not pretraining complete. Adaptation gives the engine the ability to carry the load; pretraining is actually completing the long drive. Both are necessary, and neither substitutes for the other.

    3. Case Breakdown: What 400 Consecutive Steps Prove, and What They Do Not

    Observation This result Supported conclusion Validation still needed
    Operators and compute graph Training chain ran end to end Forward and backward computation for all operators the model needs executes correctly Operator-by-operator backward comparison against a reference implementation; separate checks on optimizer operators
    Distributed path Two nodes, 16 processes, parameter aggregation and gradient reduction Cross-node parameter sharding and gradient synchronization work correctly, with no hangs or corrupted results Collective communication performance at larger scale; load balancing at medium to large scale; recovery from failed nodes
    Numerical stability Loss and gradient norms finite throughout Training was free of numerical anomalies over several hundred steps Long-stability runs of thousands to tens of thousands of steps; learning-curve consistency against a reference implementation
    Training scale Two nodes, 16 cards Small-scale full-chain closed-loop validation is complete Scaling-efficiency curves; advanced parallelism such as long context and expert parallelism

    So “400 consecutive steps with no anomalies” carries one core signal: the full chain closes. Operators are usable, sharding is correct, communication flows, and numerics stay stable. That is the starting point of scaled training, not the finish line.

    4.1 Model Loading and Parameter Sharding: Where Training Really Differs from Inference

    Inference loads one complete copy of the weights. Training must fit parameters, gradients, optimizer states, and activations into the limited memory of each card at the same time, which makes parameter sharding unavoidable.

    Take fully sharded data parallel (FSDP2) as the example. Each parameter is split into N shards along dimension 0, and each process holds one shard. A training step proceeds as follows:

    • Forward pass: When execution reaches a layer, the full parameters for that layer are gathered, the computation runs, and the parameters are released immediately afterward.
    • Backward pass: Parameters are gathered again to compute gradients, then a reduce-scatter operation accumulates gradients into the shard owned by each process.
    • Optimizer update: Each process updates only the shard it holds, avoiding duplicated work.

    Compared with conventional data parallelism, where every card keeps full parameters, gradients, and optimizer states, sharding sharply reduces per-card memory and is the foundational path for training trillion-parameter models. The adaptation difficulties come down to three:

    • Sharded and optimizer states must line up exactly, or update results will diverge from single-card training.
    • Parameter gathering must overlap with computation, or communication becomes the dominant cost.
    • In multimodal models the vision encoder is often frozen or placed in a separate parameter group, and the text backbone and modality alignment layers typically use different learning rates and gradient handling. The sharding logic has to distinguish them correctly.

    Illustrative code (pseudocode, expressing logic only):

    1. for step, batch in enumerate(dataloader):
    2. # 1. Forward: gather parameters layer by layer -> compute -> release;
    3. # gathering can overlap with the previous layer's compute
    4. logits = model(input_ids=batch.tokens, images=batch.images)
    5. loss = compute_loss(logits, batch.labels)
    6. # 2. Backward: reduce-scatter lands gradients in their own shards,
    7. # overlapped with computation
    8. loss.backward()
    9. # 3. Numerical guards: gradient clipping + anomaly detection (see 4.3)
    10. grad_norm = clip_grad_norm_(model.parameters(), max_norm=1.0)
    11. if not isfinite(loss) or not isfinite(grad_norm):
    12. skip_step_and_log(step, loss, grad_norm) # skip and log, never continue silently
    13. optimizer.zero_grad(set_to_none=True)
    14. continue
    15. # 4. Update: each process updates only its own parameter shard
    16. # and the corresponding optimizer state shard
    17. optimizer.step()
    18. optimizer.zero_grad(set_to_none=True)
    19. # 5. Periodic checkpoint: save both parameter and optimizer state shards
    20. if step % ckpt_interval == 0:
    21. save_sharded_checkpoint(step, model, optimizer)

    4.2 Operators and Compute Graphs: From “It Computes” to “It Computes Correctly”

    Large model training involves many composite operators and unconventional structures. Common adaptation challenges include:

    • Attention variants: Grouped-query attention, sliding-window attention, and similar patterns. Without a matching fused implementation, the equivalent logic has to be composed from basic operators, and both performance and numerics must be checked one by one.
    • Positional encodings: Position interpolation and frequency scaling schemes used for long context involve exponentials, trigonometric functions, and complex arithmetic, all of which are hotspots for numerical overflow.
    • Gating and normalization: Gated activations and RMS normalization are element-wise operations that become sensitive to numerical precision under large-scale parallelism.
    • Mixture-of-experts structures: Routing and dispatch, grouped matrix multiplication, and capacity-factor control involve compute, but also a great deal of communication.
    • Multimodal structures: Variable-length sequence handling in interleaved image-text layouts requires support for padding-free sample packing and dynamic shapes.
    • Optimizer operators: In AdamW, computing the first and second moments typically involves square roots and element-wise division. If the implementation deviates from the standard “compute first, take the root after” formula, the error accumulates over thousands upon thousands of steps.

    In practice, adaptation follows a “equivalent first, optimize second, tune third” path: compose basic operators to guarantee numerical correctness, then build custom operators for hot spots to improve performance, then tune repeatedly at large scale. Each step uses operator-by-operator backward comparison as a quality gate.

    4.3 Mixed Precision and Numerical Stability: What Decides Whether Training Keeps Running

    bfloat16 has the same number of exponent bits as fp32, giving it a wide dynamic range and low overflow risk at the cost of mantissa precision. It has become the mainstream precision for large model training. The accompanying stability measures are:

    • Keep fp32 master copies of parameters, gradients, and optimizer states, and use low precision only in places such as matrix multiplications in the forward and backward passes.
    • Use fp32 for normalization, loss computation, and gradient-reduction accumulation.
    • Apply global-norm gradient clipping and warm up the learning rate gradually at the start of training.

    Even so, deep networks, low-precision accumulation, anomalous data, and very long sequences can still trigger numerical problems. Five anomaly patterns show up repeatedly in industrial practice:

    Anomaly pattern Typical symptom Where to look first
    Spike Loss or gradient norm jumps by orders of magnitude in one step, then recovers or diverges Bad data, long sequences, overflow in attention scores or logits
    Cliff Loss suddenly becomes NaN or Inf and stays there Division by zero, log(0), square root of a negative value, low-precision accumulation overflow
    Slow drift Fine early on, precision degrades steadily after thousands of steps Insufficient optimizer state precision, gradually accumulating error, learning-rate schedule issues
    Intermittent silence Metrics occasionally go bad but training raises no error Checkpoint skipping of anomalous steps is off, so a bad step has polluted the parameters
    Selective overflow Only specific processes or specific layers misbehave Uneven load across processes, inconsistent precision configuration across parameter groups

    For diagnosis, log activation and gradient norms, min/max values, and NaN/Inf counts at key locations, reproduce the issue with deterministic execution, and use the “run it on one card, reproduce it on one card” isolation approach to determine whether the problem originates in the data, the model, or communication.

    4.4 Cross-Node Communication: Where Adaptation Stops Being a Single-Machine Problem

    Parameter-sharded training performs two collective communication rounds per step:

    • Parameter gathering in the forward pass: Shards are assembled back into full parameters.
    • Reduce-scatter of gradients in the backward pass: Gradients from all processes are summed and then re-sliced back into shards.

    Consider a 236-billion-parameter scientific foundation model on 16 cards and make a rough estimate:

    • Per-step communication volume is about 5× “parameter count × bytes per parameter”, roughly 2.36 TB.
    • If effective per-card bandwidth is on the order of tens of GB per second, communication for parameters and gradients alone could take tens of seconds per step.
    • Even if part of the traffic moves at low precision, cross-node link bandwidth remains the decisive factor for overall throughput.

    This estimate covers only parameter and gradient traffic. It excludes activation communication and the extra overhead introduced by parallelism strategies, and the bandwidth figure is an order-of-magnitude assumption; actual numbers depend on the interconnect and the implementation. If a step takes tens of seconds, 400 steps means hours of continuous running. That is why “400 steps with no interruption” means much more than the step count:

    • It covers hundreds of parameter and gradient synchronizations with no hangs, timeouts, or corrupted results.
    • If periodic checkpoints were in place, it also indirectly validates saving and restoring parameter and optimizer state shards.
    • Memory fragmentation and leaks that tend to surface in long runs have a chance to show up early.

    Common engineering optimizations include:

    • Partitioning communication into buckets by parameter size, balancing message size against overlap granularity.
    • Overlapping compute and communication: gather the next layer’s parameters while the current layer’s backward pass is still computing.
    • Ordering processes by topology: cards on the same node form communication groups first, exploiting high-bandwidth intra-node links and cutting cross-node traffic.
    • Setting sensible communication timeouts and heartbeat detection so one stuck process cannot drag down the whole job.
    • Capping CPU threads per process so communication threads do not compete with compute threads.

    4.5 Memory and Recomputation: The Hard Constraint of Large Model Training

    Training memory consists of five parts:

    • Parameters.
    • Gradients.
    • Optimizer states (for AdamW, the fp32 first and second moments together are about 8 bytes per parameter).
    • Activations.
    • Communication buffers and temporary tensors.

    Parameters, gradients, and optimizer states shrink roughly linearly with parameter sharding. Activations, however, grow with batch size and sequence length, and often become the main bottleneck for long-context training. The usual countermeasures:

    • Selective activation recomputation: Recompute only the intermediate results that are expensive to store and cheap to recompute (such as intermediate attention matrices), trading a little extra compute for memory.
    • Optimizer state offloading: Move idle state to host memory, trading bandwidth for capacity, with throughput impact assessed.
    • Fixed shapes and preallocation: Combined with padding-free sample packing to reduce fragmentation.

    5. Validation: A Four-Layer Validation Matrix

    A single experiment can only demonstrate capability at one layer. Rigorous validation proceeds from the top down in layers:

    Layer Scale Core question Pass criteria (illustrative)
    L1 Operator Single card Are the forward and backward passes of an individual operator correct? Error within tolerance versus a reference implementation
    L2 Model Single card Does the model optimize stably under the full precision configuration? The whole network repeats forward and backward passes, with finite loss and gradient norms
    L3 Distributed functionality (this case) 2–4 nodes Are parameter sharding, gradient synchronization, and checkpointing correct? Hundreds or more consecutive updates without anomalies; sharded checkpoints can resume training
    L4 Scale Tens to hundreds of cards Scaling efficiency, long-horizon stability, convergence consistency Scaling efficiency target met; thousands to tens of thousands of steps without anomalies; learning curve follows the reference implementation’s trend

    L1 and L2 concern correctness, L3 concerns whether training stays stable, and L4 concerns whether training is fast and worthwhile. This case sits at L3: it shows that domestic GPUs have the foundation for stable training, but answering whether training is fast and worthwhile requires L4 data.

    6. Engineering Systems: From “It Trains” to “Train Out of the Box”

    A single adaptation success is only the start. The real moat is the engineering system around it:

    • Tooling: A standard toolset covering operator scanning, precision comparison, performance profiling, and log collection, so problems are diagnosable and runs are reproducible.
    • Automation: One-command multi-node launch, automatic sharding and checkpoint management, automatic anomalous-step skipping with alerting, which lowers the operational cost of large-scale training.
    • Standardization: Distilling the adaptation process into a standard flow of “operator coverage → precision alignment → distributed validation → long-stability testing”, so experience is reusable when a new model comes in.
    • Ecosystem: Mainstream deep learning frameworks in China and abroad, PaddlePaddle from Baidu among them, are all pushing multi-hardware adaptation. Coordination across framework, operator library, communication library, and scheduling platform decides whether users can start training with no code changes and minimal friction.

    7. Further Practice: More Large-Scale Training Scenarios

    Several teams have already put “domestic chips training domestic models” into production:

    • A roughly 236-billion-parameter scientific foundation model completed full training from scratch.
    • A 5D world model aimed at physical-law modeling achieved full-stack native training.
    • An embodied brain model for embodied intelligence completed end-to-end training.

    Training at the trillion-parameter scale is also under way.

    Different scenarios place different demands on training adaptation:

    Scenario Main technical challenges
    Scientific foundation model High-quality scientific data and relatively homogeneous modalities; tests long-run stability and throughput efficiency
    World model Fuses vision, physical state, and temporal information; tests multimodal data pipelines and variable-length sequence handling
    Embodied model Vision–language–action multimodal alignment; action outputs involve robotics priors, raising the bar for numerical precision and training stability
    Trillion-parameter model Combines more dimensions of parallelism; communication and memory pressure rise sharply with parameter count, making fault tolerance and recovery a hard requirement

    8. Stability Criteria: How to Tell Whether Training Is “Really Stable”

    Stability can be quantified along six dimensions:

    1. Numerical validity: Loss and gradient norms stay finite throughout, with a NaN/Inf count of zero.
    2. Trajectory sanity: No order-of-magnitude spikes in gradient norm, and a smooth loss descent.
    3. Consistency: The learning-curve trend matches a reference implementation (for example on GPU) under equivalent conditions, with per-step loss deviation within a reasonable range.
    4. Throughput steadiness: Per-step time variation stays within bounds, ruling out occasional stalls.
    5. Resource stability: No steady growth in device memory or host memory.
    6. Fault tolerance: Training can resume from a checkpoint, and loss picks up at roughly the level before the interruption.

    9. Common Misconceptions and a Troubleshooting Checklist

    Four common misconceptions:

    • Misconception 1: Day-one support means training-ready. Inference support covers the forward chain only.
    • Misconception 2: A short successful run means large-scale readiness. As scale grows, communication topology, load balancing, and fault tolerance problems surface all at once.
    • Misconception 3: No loss error means numerics are correct. Silent precision errors can lurk for thousands of steps before showing themselves.
    • Misconception 4: Running fast means training well. Throughput is only an efficiency metric; convergence quality still has to be confirmed with learning curves.

    A quick troubleshooting checklist:

    • Single-card numerics: operator-by-operator backward comparison; repeated forward and backward passes of the full network
    • Distributed correctness: parameter and gradient shard verification; checkpoint save and resume
    • Numerical stability: anomalous-step skipping, gradient clipping, fp32 optimizer states
    • Communication: bucket size tuning, compute/communication overlap, topology awareness, timeout settings
    • Memory: activation recomputation, communication buffer control, fragmentation monitoring
    • Long stability: thousands of steps or more of continuous running, with periodic sampling of key metrics

    10. Conclusion

    From inference adaptation to training adaptation, and then to full-chain stable training, domestic GPUs are steadily filling in the infrastructure capability that large model training requires. Two nodes with 16 cards and 400 consecutive updates demonstrate full-chain closure and short-horizon numerical stability. Going from “it trains” to “train out of the box” still demands sustained work on the operator ecosystem, parallelism strategies, fault tolerance, and tooling. For developers and enterprises, the most reliable basis for selection and deployment is to read each adaptation milestone soberly and to assess hardware and platform capability through layered validation.