Training Enablement for Near-Trillion-Parameter LLMs on Domestic GPUs: A Practical Path

    This article explains what training enablement means for near-trillion-parameter models on domestic full-function GPUs and why it differs from base-model pretraining. It covers the four main bottlenecks at this scale, the native FSDP2 sharding path, a reproducible 16-GPU 400-step validation framework with its monitoring metrics, the engineering layers needed to move from a single successful run to out-of-the-box training, and a practical checklist for developers.

    1. Aligning the Concepts: Training Enablement Is Not Base Pretraining

    When discussing the adaptation of domestic accelerators to ultra-large-scale models, the most common misreading is to treat “adaptation succeeded” as “the model completed pretraining on this hardware.” In engineering terms, these are different layers:

    • Training Enablement: The goal is to get the model’s full forward pass, backward pass, and optimizer updates running, stable, and producing a reproducible convergence curve on the target hardware and software stack. It validates the integrity of the pipeline.
    • Base Pretraining: The goal is to produce weights at extreme data and compute scale, validating the combined result of data engineering, parallelism strategy, and stability at the scale of tens of thousands of accelerators.

    Public cases in the industry support this distinction: the technical reports of some ultra-large-scale models validate two different accelerator architectures side by side, but it is widely understood that this covers operator and parallel-scheme validation on the inference side, and the original compute source for base pretraining has not been publicly confirmed.

    The topic of this article should therefore be stated precisely: establishing and validating the training pipeline for a frontier ultra-large-scale model on domestic full-function GPUs, not claiming to have completed the model’s original pretraining. This distinction matters for technology selection and for defining acceptance criteria.

    2. Why “Near-Trillion Parameters” Is Hard: Four Real Bottlenecks

    Moving from hundreds of billions to the trillion-parameter range is not a matter of linearly stacking more compute. The difficulty comes from four nonlinear problems:

    1. The memory wall: Parameters, gradients, and optimizer states (especially momentum and variance) together far exceed the memory of a single accelerator, so sharding is mandatory.
    2. The communication wall: Cross-node bandwidth is far lower than intra-node interconnect, and the volume of AllGather/ReduceScatter traffic grows with the sharding strategy.
    3. Numerical stability: Inf/NaN in loss and gradient norms is the most common cause of interruption in large-model training; overflow and underflow under mixed precision must be actively managed.
    4. Long-run stability: Only hundreds of consecutive uninterrupted steps provide engineering credibility; getting one step to run and keeping 400 steps stable differ by orders of magnitude.

    3. The Native FSDP2 Training Path: An Upgrade in Sharding Semantics

    Compared with earlier sharding implementations, the key improvement in native FSDP2 is that parameter sharding semantics are pushed down to a DTensor-level sharded representation, making the sharding of parameters, gradients, and optimizer states explicitly visible in the type system rather than maintained through implicit hooks. This yields three direct benefits:

    • Tighter coupling between sharding and the computation graph, which makes composition with non-uniform structures such as multimodal models easier;
    • Fewer redundant copies from “aggregate all parameters, then re-shard,” which lowers peak memory;
    • Easier orthogonal composition with pipeline parallelism and tensor parallelism.

    A typical multimodal training loop skeleton looks like this (illustrative, not a specific product API):

    1. for step, batch in enumerate(loader):
    2. # batch may contain text tensors, image tensors, and alignment labels
    3. with torch.autocast(dtype=torch.bfloat16):
    4. loss = model(batch).loss
    5. loss.backward() # backward triggers sharded gradient reduction
    6. grad_norm = clip_grad_norm_(model.parameters(), max_norm=1.0)
    7. optimizer.step() # optimizer states are updated per shard as well
    8. optimizer.zero_grad(set_to_none=True)
    9. if not torch.isfinite(loss) or not torch.isfinite(grad_norm):
    10. raise RuntimeError(f"non-finite at step {step}")

    The difficulty of the multimodal path lies in the large differences in sequence length and tensor shape across modalities. If the sharding dimension is chosen poorly, severe load skew appears; in practice, the text tower and the vision tower usually use different sharding and recomputation strategies.

    4. Designing a Convincing 16-GPU, 400-Step Validation

    The validation described in the original text uses 16 accelerators across two nodes and 16 training processes to complete 400 consecutive optimizer updates, with loss and gradient norms finite throughout, no overflow, and no abnormal interruption. This method is worth abstracting into a general acceptance framework:

    • Minimum reproducible scale: Start with 16 accelerators across two nodes to expose cross-node communication and sharding problems at controllable cost and with fast diagnosis;
    • Step count with statistical significance: 400 steps cover multiple phases, including learning-rate warmup, gradient clipping taking effect, and optimizer momentum accumulation;
    • The right observables: Watching loss alone is not enough; gradient norm, parameter update norm, per-rank peak memory, and communication time must be monitored as well;
    • Fail fast: Make non-finite detection a hard constraint so that silent errors do not contaminate later training.

    The corresponding monitoring metrics can be organized into this minimal set:

    Category Key Metrics Purpose
    Numerical loss, gradient norm, update norm Detect overflow/explosion
    Memory Per-rank peak and fragmentation rate Locate OOM and skew
    Communication AllGather/ReduceScatter time share Determine whether communication-bound
    Stability Interruption count, retry count, step-time variance Assess long-run stability

    5. From “It Trains” to “Out-of-the-Box Training”: What the Engineering System Needs

    A single successful run only proves feasibility. Delivering a usable system requires four layers:

    1. Operator layer: Correctness and precision alignment for high-frequency operators such as normalization, attention, and loss functions, with a per-operator error baseline.
    2. Parallelism layer: Sharding, tensor parallelism, and pipeline parallelism exposed as configurable strategies, with automatic recommendations based on model structure.
    3. Toolchain layer: Job queuing, image distribution, log collection, metrics monitoring, and alerting, typically built on general cloud capabilities such as container platforms, log services, and monitoring and alerting.
    4. Automated validation layer: A one-click regression suite covering “load, shard, forward/backward, update, converge,” run automatically after every software stack upgrade.

    In related practice at Baidu AI Cloud, such training workloads generally follow the same layered approach: a container platform hosts training images and elastic scheduling, object storage holds datasets and checkpoints, and log services with monitoring and alerting provide observability for long-run stability.

    6. What Deployed “Domestic Chips Training Domestic Models” Results Show

    Public information shows several deployed cases on domestic compute covering different forms: a scientific foundation model of roughly 236 billion parameters completed full training from scratch; a world model for five-dimensional spatiotemporal data completed full-stack native training; an embodied-intelligence brain model completed end-to-end training; and training of a trillion-parameter-class model is in progress.

    The shared value of these cases is that they cover adaptation methodology for different model forms: dense structures, multimodal structures, spatiotemporal generative structures, and embodied decision structures each place different demands on parallelism strategy and numerical stability. Once the methodology is established, the marginal cost of adapting new models drops significantly.

    7. A Practical Checklist for Developers

    • Get a small single-accelerator configuration running first and confirm the operator precision baseline before scaling to multiple accelerators;
    • Prefer sharding along the direction of “largest parameters and most expensive communication,” and avoid slicing small operators too finely;
    • Prefer BF16 for mixed precision, and keep higher precision for normalization and loss computation;
    • Make non-finite detection, gradient clipping, and checkpoint resume enabled by default;
    • Use 16 accelerators across two nodes for smoke regression, and assess stability by step-time variance rather than single-step time;
    • Establish an automated gate that runs regression on every software stack upgrade.

    8. Conclusion

    For domestic full-function GPUs to support frontier ultra-large-scale model training, the key is not a single successful demonstration run, but turning operator precision, sharding strategy, numerical stability, and the automated toolchain into a reusable engineering system. Only when the adaptation process moves from expert manual tuning to standard regression cases does the industry truly move from “it trains” to “out-of-the-box training.”