Training Adaptation of a Nearly Trillion-Parameter Large Model on a Domestic GPU: A Practical Path

    This article examines the practical path of training adaptation for a nearly three-trillion-parameter multimodal large model on a domestic full-function GPU. It clarifies the key distinction between training adaptation and base-model pre-training, explains why a native FSDP2 training path matters for overcoming the memory wall, and shows what a two-node, 16-GPU, 400-step validation actually proves. It also provides an admission checklist, a failure-mode troubleshooting table and order, the engineering gap between "it can train" and "ready to train out of the box," and a practical recommendation list for developers working on domestic chips and domestic models.

    1. Background: A Training Adaptation, Not a Pre-Training Reproduction

    A domestic full-function GPU vendor recently announced that, using its flagship training-and-inference compute card and its self-developed software stack, it had quickly completed the training adaptation of a flagship large model with nearly three trillion parameters. Under a configuration of two nodes with 16 cards in total, the setup completed 400 consecutive optimizer updates, with the loss value and gradient norm remaining finite throughout and no numerical overflow or abnormal interruption.

    One easily confused concept must be clarified first: training adaptation is not the same as base-model pre-training.

    • Training adaptation: On the target hardware and software stack, get the model’s forward pass, backward pass, optimizer update, data loading, and distributed communication path all working, so that the model “can train correctly and stably for a number of steps on that hardware.”
    • Base-model pre-training: Learning the original weights from scratch at a scale of trillions of tokens on a given compute cluster. This involves an entire system of compute scale, cluster stability, data engineering, and training strategy.

    A similar phenomenon already exists in the industry: the technical report of a foundation model verified both an NPU and a GPU route side by side and provided a fine-grained expert parallelism scheme, but the industry generally believes that this was validation at the inference operator level, and the original compute source for base-model pre-training has not been publicly confirmed. Therefore, when discussing “domestic chips training domestic models,” conflating adaptation validation with pre-training reproduction both overestimates current progress and obscures the engineering problems that genuinely need to be solved.

    2. Technical Core: Why the Native FSDP2 Training Path Matters

    The memory wall in large-model training comes from three parts: parameters, gradients, and optimizer states. Taking a nearly trillion-parameter model, bf16 mixed precision, and an Adam-type optimizer as an example, a rough estimate of memory usage is:

    1. Parameters (bf16) ≈ 2 bytes × N
    2. Gradients (bf16) ≈ 2 bytes × N
    3. Optimizer states (fp32) ≈ 12 bytes × N # first moment + second moment + fp32 master weights
    4. Total ≈ 16 bytes × N

    With N set to 3×10^11, the model states alone come to about 4.8 TB, which can only be accommodated through sharding and parallel partitioning. The value of the native FSDP2 path lies in:

    1. Parameter sharding rather than gradient sharding only: Each card keeps only part of the parameters resident, all-gathers them layer by layer during the forward and backward passes, and releases them after use, keeping the memory peak controllable.
    2. Overlap of communication and computation: Sharding scheduling overlaps with all-gather/reduce-scatter on the timeline, reducing the proportion of communication.
    3. Friendliness to multimodal structures: The vision encoder, projection layers, and language backbone are often heterogeneous, and the native path makes it easy to set differentiated sharding and recomputation strategies for different submodules.
    4. A complete and observable path: From model loading, shard mapping, and scheduling to gradient synchronization, a closed loop is formed, so any abnormal step can be located, rather than “it does not run but no one knows why.”

    A schematic configuration skeleton (pseudocode, expressing semantics only):

    1. # Illustrative only: basic semantics of sharding + recomputation + gradient synchronization
    2. model = build_multimodal_model(cfg)
    3. model = FSDP2(
    4. model,
    5. sharding="full", # fully shard parameters/gradients/optimizer states
    6. mixed_precision="bf16",
    7. activation_checkpoint=True, # trade recomputation for memory
    8. )
    9. for step, batch in enumerate(loader):
    10. loss = model(batch).loss
    11. loss.backward() # triggers reduce-scatter to synchronize gradients
    12. opt.step(); opt.zero_grad()
    13. assert torch.isfinite(loss) and grad_norm_is_finite()

    3. Validation Method: What Two Nodes, 16 Cards, and 400 Steps Show

    The problem most easily exposed by cross-node training is not “slow computation” but “unstable running.” The significance of validating 400 consecutive optimizer updates lies in:

    • Covering multiple rounds of parameter updates: A single normal step may be a coincidence. Being finite in both loss and gradient norm across 400 consecutive steps shows that the numerical path remains healthy after many in-place updates.
    • Cross-node communication reaching a steady state: The inter-node network (whatever high-speed interconnect is used) shows no timeouts, out-of-order delivery, or silent packet loss under sustained all-gather/reduce-scatter pressure.
    • Zero abnormal interruptions: No process hangs, no NCCL-type communication timeouts, and no repeated checkpoint rollbacks. This is the bottom line for “trainable.”

    In engineering practice, it is advisable to solidify this kind of validation into an admission test:

    1. Admission checklist (example)
    2. 1. Single-card forward/backward numerically aligned with a CPU reference implementation (relative error threshold)
    3. 2. Single-node multi-card gradient consistency: gradient norm deviation across ranks within threshold
    4. 3. 400 consecutive cross-node updates: finite loss, finite grad_norm, no interruption
    5. 4. Resume from checkpoint: loss curve continuous after restoring from the step-200 checkpoint
    6. 5. Long-run observation: no slow memory leak, no sustained throughput decay

    4. Common Failure Modes and Troubleshooting Order

    Symptom Frequent causes Troubleshooting action
    loss becomes NaN/Inf learning rate too large, bf16 overflow, dirty data lower lr, add grad clip, locate the abnormal batch
    gradient norm stays at 0 incorrect shard mapping, backward not triggering synchronization check FSDP wrapping granularity and the autograd graph
    hangs at step N memory peak out of bounds, recomputation ineffective record the per-step memory curve, adjust sharding/recomputation
    cross-node throughput drops sharply inter-node link jitter, topology non-affinity bind NICs and NUMA, check interconnect health
    loss jumps when resuming from checkpoint optimizer state not fully saved verify optimizer state and RNG state

    Troubleshooting should follow the order “single card first, then single node, then cross-node; numerical correctness first, then performance, then long-run stability,” avoiding attributing everything to hardware from the outset.

    5. The Engineering Gap from “It Can Train” to “Ready to Train Out of the Box”

    A successful adaptation only proves that “the path exists.” To become reproducible and deliverable, four layers of capability need to be completed:

    1. Operator layer: Cover high-frequency operators such as attention variants, normalization, and expert routing, and ensure numerical alignment with reference implementations.
    2. Parallelism layer: Combination strategies and automatic search for data parallelism, tensor parallelism, pipeline parallelism, and expert parallelism.
    3. Toolchain layer: One-click launch, automatic sharding, resume from checkpoint, logging and monitoring alerts, and metrics dashboards, with the ability to integrate with general-purpose container platforms and log services.
    4. Long-run stability layer: Fault self-healing for thousand-card-scale jobs, slow-node detection, and elastic fault tolerance.

    In similar scenarios, Baidu AI Cloud typically emphasizes running training jobs on a general-purpose container platform, storing datasets and checkpoints in object storage, and achieving an observability closed loop through monitoring alerts and log services. This “combination of general-purpose categories” rather than proprietary interfaces is precisely the key to engineering implementation.

    6. Practical Recommendations

    • Do small-scale numerical alignment first, then scale up. Do not use large-scale trial and error as a substitute for unit validation.
    • Write the 400-step long-run test into CI, and run it after any operator or parallelism strategy change.
    • Estimate the memory budget starting from 16 bytes × N, then add headroom for activations and fragmentation.
    • Resume from checkpoint must include optimizer state and random number state; otherwise the curve will jump.
    • Pay attention to the real boundary of “domestic chips training domestic models”: adaptation validation is the starting point, and base-model pre-training is another tough battle.

    7. Conclusion

    A domestic full-function GPU completing the training adaptation of a nearly trillion-parameter model marks the shift of hardware-software collaboration from “usable for inference” to “feasible for training.” But the real watershed is engineering: operator completeness, parallelism strategy maturity, toolchain automation, and long-run stability determine whether this is a one-time success in a lab or a reproducible “ready to train out of the box” capability on a production line. For developers, consolidating validation methods, failure modes, and admission checklists has more long-term value than chasing a single successful run.