Domestic GPU Large Model Training Adaptation: Four Key Capabilities Explained
This article breaks down what it takes to adapt a domestic AI accelerator for full large-model training, not just inference. Using the example of a domestic GPU vendor that ran 400 consecutive optimizer updates on a trillion-parameter model across two nodes and 16 cards, it explains why training and inference place fundamentally different demands on hardware, then details four critical capabilities: cross-node full-shard parallelism, systematic memory and parallel-strategy planning, numerical stability, and long-run monitoring with fault tolerance. It also provides a reusable adaptation roadmap, an acceptance checklist, a framework for evaluating whether an accelerator is training-ready, and a clear distinction between "training adaptation," "chip pretraining," and "large-scale pretraining." Developers and teams will gain a practical, reproducible method for assessing training capability based on numerical consistency, stability, recoverability, and observability.
Introduction: From “Running Inference” to “Training Models”
A domestic GPU vendor recently announced that it had completed training adaptation for a trillion-parameter flagship large model. The cluster consisted of 16 flagship AI training-and-inference cards across two nodes, and all training processes completed 400 consecutive optimizer updates. Throughout the run, the loss and gradient norms of every process remained finite, with no numerical overflow or abnormal interruption.
The news drew attention not only because of the model’s parameter scale. More importantly, it demonstrated an engineering path by which a domestic AI chip can move from “fast inference deployment” to “stable, end-to-end training.”
In large-model infrastructure, training and inference place fundamentally different demands on hardware, and the two should not be treated as equivalent:
| Dimension | Training | Inference |
|---|---|---|
| Compute pattern | Forward + backward + parameter update; high compute per token | Mainly autoregressive decoding; low compute per token, memory-bandwidth-bound |
| Memory composition | Parameters, gradients, optimizer states, and activations stacked together | Mainly parameters and the KV cache |
| Communication pattern | Gradient or parameter aggregation (reduction, redistribution) | Mostly within operators split by tensor parallelism |
| Fault-tolerance requirement | Must handle a range of failures during long runs | Mainly request-level timeouts and retries |
| Validation metric | Numerical consistency, alignment of multi-card convergence curves | Time to first token, throughput |
Against this backdrop, the core question of “training adaptation” is: can the complete “forward-backward-parameter update” loop run long-term, stably, and numerically correctly on a domestic GPU cluster? This article breaks down the key capabilities involved, drawing on common adaptation practices.
Part 1. Clarifying Concepts: Training Adaptation ≠ Chip Pretraining, and Inference Adaptation ≠ Training Adaptation
1. Training adaptation is not “pretraining with this chip”
Industry understanding of “adaptation” is often imprecise, so it is worth drawing the boundaries clearly first:
- Training adaptation: Using open-source model code, bring up the complete chain of model loading, data reading, forward and backward passes, parameter updates, and checkpoint saving on the target hardware, and validate correctness and stability under large-scale parallelism.
- Pretraining from scratch on that chip: All pretraining compute for the model is performed on such chips.
The former is a necessary condition for the latter, but a great deal of work still lies between them: ultra-large-scale cluster scheduling, long-run stability, training efficiency optimization, and data engineering.
A useful point of comparison: in its technical report, one open-source foundation-model vendor placed two AI accelerators of different architectures alongside GPUs and validated the same fine-grained expert-parallelism scheme. The industry generally regards this as operator validation on the inference side, and the vendor did not explicitly disclose the original compute source used for pretraining the base model. In other words, “running through on a type of hardware” and “completing pretraining on that hardware” are two different levels of concept, and external statements should avoid conflating them.
2. Smooth inference adaptation does not mean training readiness
Inference adaptation typically reuses mature operators that have been refined over a long period, with a relatively fixed compute graph. Training adaptation, by contrast, requires working through the backward pass, gradient aggregation, optimizer updates, and numerical stability layer by layer. A gap in any one of these prevents training from starting or continuing.
Therefore, “training adaptation complete” more precisely means: the target chip now has the full training chain needed to support the model, along with basic stability validation, not that any performance conclusion has been declared.
Part 2. Four Key Capabilities
Capability 1: Cross-Node Full-Shard Parallelism — Closing the “Load-Schedule-Synchronize” Loop
1. Why use fully sharded data parallelism
For a trillion-parameter model, the “one full replica per card” approach of standard data parallelism is not viable:
- Under mixed-precision training (for example, BF16 compute with FP32 master weights), just parameters, gradients, and Adam-style optimizer states require roughly 16 bytes per parameter;
- 3 trillion parameters would need about 48 TB of memory;
- With 128 cards, these three items alone would require about 375 GB per card.
Adding activations on top only widens the gap.
The idea behind Fully Sharded Data Parallel (FSDP) is to “aggregate on demand, release after use”:
- Each card stores only a shard of the parameters, a shard of the gradients, and the corresponding optimizer states;
- When the forward or backward pass reaches a given layer, the full parameters for that layer are temporarily aggregated;
- The moment computation finishes, the memory is released to make room for the next layer.
This turns memory usage from “unchanged as the cluster grows” into “declining roughly linearly as the cluster grows.” When the model far exceeds a single card’s memory capacity, this is the most direct and practical foundational approach.
2. The peculiarity of two nodes and 16 cards: confronting cross-node communication for the first time
Within a single node of 8 cards, there is usually a high-bandwidth interconnect with low latency and high bandwidth; across nodes, you can only rely on the network. Sharded parallelism performs two collective communications at every step:
- Forward phase: parameter redistribution, aggregating the parameter shards for the current layer;
- Backward phase: parameter redistribution and gradient reduce-and-redistribute, aggregating parameters and synchronizing gradients.
With 16 cards spanning two machines, all of these communications travel over the cross-node network, placing higher demands on the communication library’s topology awareness, transfer scheduling, and multi-stream concurrency maturity. The fact that this validation completed 400 consecutive updates across two nodes indicates that the training framework and collective communication library have achieved basic reliability in a cross-node setting.
3. Memory planning: not a single block of memory can be neglected
The memory used by a training process can be broken into blocks:
Memory usage ≈ parameter shards + gradient shards + optimizer states+ activations+ temporary buffers + communication buffers + fragmentation headroom
Notably, the first three decline as the number of cards increases, but activations and temporary buffers do not shrink accordingly:
- Activations must be fully retained until the backward pass completes;
- Temporary buffers are determined by the layer-by-layer re-aggregation behavior;
- Communication buffers also occupy a considerable amount under high concurrency.
Therefore, when planning memory, account for “items that shrink with scale” and “items that do not shrink with scale” separately, and reserve fragmentation headroom.
4. Efficiency optimization: communication overlap and selective recomputation
Beyond correctness, efficiency is equally critical. Common techniques include:
- Communication-computation overlap: The sharded-parallelism framework generally issues the parameter redistribution for subsequent layers ahead of time in dependency order during the backward pass, hiding communication beneath computation;
- Gradient accumulation: Trading time for communication, reducing the number of data synchronizations per token;
- Activation recomputation: Recomputing forward intermediate results during the backward pass, trading extra computation for memory.
It should be noted that two nodes and 16 cards constitute a small-scale validation environment, and its training throughput cannot be directly extrapolated to clusters of a thousand cards or more. Cross-node communication overhead, collective communication efficiency, and the combined effect of parallel strategies all need further validation at larger scale.
Capability 2: Systematic Memory and Parallelism Planning to Make Trillion Parameters “Fit”
1. Trade-offs among multiple parallelism dimensions
As the model continues to grow, sharded data parallelism alone struggles to balance memory and efficiency. Industry practice typically layers the following dimensions on top of data parallelism:
| Parallelism | What is split | Main purpose | Typical cost |
|---|---|---|---|
| Data / fully sharded data parallelism | Data batches / parameters, gradients, optimizer states | Improve throughput / reduce static memory | Gradients must be synchronized each step |
| Tensor parallelism | Matrix operations within a single layer | Per-layer parameter count and compute memory | Frequent intra-layer communication; best kept within a node |
| Pipeline parallelism | Layers divided into stages | Overall parameter count and memory | Pipeline bubbles; requires sensible partitioning |
| Sequence/context parallelism | Sequence dimension | Excessive activations for long contexts | Complex attention communication patterns |
| Expert parallelism | Experts in MoE | Total expert parameters | Requires efficient token dispatch |
The guiding principle: dimensions with the most intensive communication (usually tensor parallelism) should be kept within a node, while cross-node communication handles dimensions that are relatively sparse. The more dimensions there are, the larger the combinatorial space of partitioning, recomputation granularity, and communication-overlap strategies, and the harder tuning becomes.
2. Sharded loading and model partitioning strategies
Memory constraints exist not only during training but also at the “startup” stage. Loading the full weights directly can cause the loading process itself to fill up memory. Common approaches include:
- Reading directly in shards during loading;
- Building a model skeleton first via metadata or empty tensors, then loading weights in shards;
- Loading into CPU memory first, then uploading shard by shard to the device.
3. Optimizer choice
Optimizer states are themselves a major memory consumer. Adam-style optimizers must store first- and second-order moments for each parameter; when memory is tight, options include lower-precision moment buffers or optimizers with lower memory overhead. However, such changes alter numerical behavior and must be revalidated for convergence.
Capability 3: Numerical Stability — Keeping “Loss Finite, Gradient Norm Finite”
1. Why watch loss and gradient norm
The core observation metrics in this validation were just two: loss and gradient norm remaining finite throughout. This is no coincidence; they are the “thermometer” of a training run’s numerical health:
- Loss anomaly: NaN or Inf, sudden jumps, or persistent failure to decrease usually point to bad data, an excessive learning rate, or numerical overflow;
- Gradient norm anomaly: Sudden spikes often stem from abnormal samples or numerical instability, while persistently small values may indicate the optimizer is not behaving as expected.
Only when these two metrics stay finite across all training processes can we say the entire numerical chain of forward/backward computation, gradient aggregation, and optimizer updates has no “break points.”
2. Mixed precision and gradient clipping
- Mixed precision: BF16 has the same exponent bit width as FP32 and a large dynamic range, making it more common in large-model training; FP16 has a narrower dynamic range and typically needs loss scaling to prevent small-gradient underflow.
- Gradient clipping: Clipping by global norm effectively suppresses occasional gradient spikes.
- Numerical consistency validation: Parallel training should be compared against a reference implementation with the same configuration or a single-card/few-card baseline, and the loss curves should essentially overlap.
Illustrative code (pseudocode showing the key stages a training loop should contain):
# 1. Model loading and sharding: shard according to the parallel strategy at load time, avoiding a full-weight copy on a single cardmodel = build_sharded_model(config, sharding="full") # fully sharded data parallelismmodel = load_sharded_checkpoint(model, ckpt_path) # sharded loading, supports resuming from checkpointoptimizer = AdamW(model.parameters(), lr=lr, betas=(0.9, 0.95), weight_decay=wd)scheduler = cosine_schedule_with_warmup(optimizer, warmup_steps, total_steps)scaler = GradScaler(enabled=use_fp16) # can be disabled with BF16for step, batch in enumerate(dataloader):# 2. Gradient accumulation: multiple micro-batches share one parameter update, reducing cross-node synchronizationswith autocast(dtype=bf16 if use_bf16 else fp16):loss = compute_loss(model(batch)) / accum_stepsscaler.scale(loss).backward() # backward: triggers parameter re-aggregation and gradient synchronizationif (step + 1) % accum_steps == 0:# 3. Unscaled global gradient norm: used for both monitoring and clippinggrad_norm = clip_grad_norm_(model.parameters(), max_norm)scaler.step(optimizer) # under FP16, automatically skips Inf/NaN updatesscaler.update()scheduler.step()optimizer.zero_grad(set_to_none=True)# 4. Key metric monitoringmetrics = {"loss": loss.detach().float().item(),"grad_norm": float(grad_norm)}assert math.isfinite(metrics["loss"]) and math.isfinite(metrics["grad_norm"])log_metrics(step, metrics)if (step + 1) % ckpt_interval == 0:save_checkpoint(model, optimizer, scheduler, step) # 5. Save periodically
3. Training data also needs a “health check”
- Abnormal samples (all-zero samples, extremely long text, garbled characters) can trigger gradient spikes;
- Before training, computing length distributions, filtering empty values, and validating formats on the data can eliminate hidden problems in advance.
Capability 4: Long-Run Monitoring and Fault Tolerance — Enabling “Continuous Operation”
400 updates represent only a tiny fraction of trillion-parameter training. With a global batch size of 4096 and 1 trillion training tokens, a full pass requires roughly 610,000 steps. What truly determines whether training runs to completion is the ability to handle failures when they occur.
1. Common sources of failure
- Slow nodes: An individual device slows down, causing a “bucket effect” in collective communication and forcing the whole cluster to wait;
- Hardware failures: GPU or NIC failures, link flapping;
- Process anomalies: Memory overflow, or one process exiting and blocking the rest;
- Data anomalies: Read errors or dirty data triggering loss anomalies.
2. Response strategies
- Heartbeat and timeout detection: Set timeout thresholds for collective communications to promptly detect stalled processes;
- Periodic checkpoints: Save sharded checkpoints at fixed step intervals so training can resume from the latest checkpoint after a failure;
- Failure isolation and automatic restart: Leveraging elastic training and job scheduling to automatically recover after replacing a failed node;
- Layered monitoring: At the device level, track utilization, memory, and temperature; at the collective-communication level, track the time gap between processes reaching synchronization points; at the training level, track loss, gradient norm, learning rate, and throughput.
Part 3. Adaptation Practice Roadmap: From Zero to “Train Out of the Box”
Combining the capabilities above, a reusable training-adaptation process looks like this:
- Environment setup: Fix hardware and software-stack versions, establish a reproducible environment, and fix random seeds;
- Single-card validation: Check forward outputs against a reference implementation, and confirm whether loss and gradient norm are finite;
- Small-scale multi-card validation: Get the full training loop running on 8 cards within a single node, checking the correctness of parameter aggregation and gradient synchronization;
- Cross-node scaling: Repeat validation on two nodes and 16 cards, focusing on communication-overlap effects, collective-communication efficiency, and numerical consistency;
- Stability testing: Extend the number of steps, inject failures such as slow nodes and process exits, and validate checkpoint and recovery mechanisms;
- Efficiency tuning: Adjust parallel strategies, recomputation granularity, micro-batch size, and gradient accumulation steps to balance memory, throughput, and convergence;
- Toolchain consolidation: Codify environment configurations, launch parameters, checkpoint strategies, and monitoring items into templates for wider rollout to larger scale and more models.
Acceptance checklist:
- Loss across all processes matches the reference implementation, and gradient norm is finite throughout
- The loss curve decreases steadily with training steps
- Cross-node collective communication has no timeouts or deadlocks
- Checkpoints are saved periodically, and training can recover from them after a failure
- Key metrics (loss, gradient norm, throughput, communication wait) are observable
- The scope of adaptation is clearly documented: validation scale, steps, and configuration
Part 4. Scaling Up: New Challenges from Diverse Models and Larger Clusters
From base models to world models and embodied-intelligence models, and on to trillion-parameter flagship models, training adaptation is gradually covering many model forms, each bringing new challenges:
- Mixture-of-Experts (MoE) models: Require efficient expert parallelism and token-dispatch mechanisms. Load imbalance can overload some experts while leaving others idle, typically requiring load-balancing loss constraints and careful tuning of hyperparameters such as the capacity factor.
- Multimodal models: Text, image, and audio modalities differ markedly in sequence length and compute characteristics, requiring coordination of different modalities’ data organization, parallel partitioning, and loss weighting within the same training loop.
- Embodied-intelligence models: Often involve multi-sensor time-series inputs and action outputs, with more complex data-sampling and batch-organization logic.
Larger clusters also bring probability-driven stability problems: assuming a mean time between failures of 1,000 hours per card, a 10,000-card cluster will experience a hardware failure on average about every 6 minutes. This means the core competitive advantage of large-scale training has shifted from “can it run at all” to “can it automatically recover from continuous failures and scale near-linearly.” Failure detection and recovery mechanisms, sharded-checkpoint strategies, and elastic scheduling will all become essential infrastructure capabilities.
For developers evaluating whether an AI accelerator has training capability, the following dimensions can guide the assessment:
| Dimension | Key question | Validation method |
|---|---|---|
| Operator completeness | Are common operators implemented, and can the backward pass be differentiated? | Unit-level numerical comparison, gradient checks |
| Collective communication | Is cross-node communication stable and efficient? | Communication stress tests, timeline analysis |
| Numerical stability | Does overflow occur during long runs? | Stability tests of hundreds to thousands of steps |
| Framework compatibility | Are mainstream training frameworks and parallel strategies supported? | End-to-end runs compared against a reference implementation |
| Observability | Can slow nodes and abnormal processes be located? | Layered monitoring, fault-diagnosis tools |
| Recovery capability | Can training resume automatically after a failure? | Fault-injection drills |
| Migration cost | How much business-code rework is required? | Trial migration on a small model, interface review |
Part 5. Conclusion: From “Able to Train” to “Train Out of the Box”
400 consecutive steps of stable training on two nodes and 16 cards marks a key step for domestic AI chips in large-model training adaptation. But as the analysis above shows, this result validates “the training chain is connected and basic numerical stability holds,” not pretraining capability at a ten-thousand-card scale.
To move from “able to train” to “train out of the box,” three areas need continued refinement:
- Operator layer: Improve operator coverage and numerical precision;
- Framework layer: Optimize multi-dimensional parallelism and communication overlap;
- Toolchain layer: Automate monitoring, diagnosis, fault tolerance, and migration.
For developers and enterprises, rather than asking “can a given chip train,” it is better to establish an evaluation method centered on numerical consistency, stability, recoverability, and observability, and answer the question with reproducible tests. This is precisely the engineering foundation that the shift from single-point validation to large-scale deployment needs to complete.
