Trillion-Parameter Model Training on Domestic AI Chips: How to Judge Whether Adaptation Is Truly Ready
A domestic AI vendor recently open-sourced a 2.8-trillion-parameter LLM, and a domestic AI chip vendor announced full training adaptation on its accelerator and software stack. This article examines what such adaptation work typically involves — memory walls, communication bottlenecks, software-stack alignment, FSDP2 mechanics, and a four-stage training pipeline — and what engineers should verify before trusting the result.
I. Background
Recently, a domestic AI vendor open-sourced a flagship large language model with 2.8 trillion parameters. Shortly afterward, a domestic AI chip vendor disclosed that its unified training-and-inference accelerator card, together with the accompanying software stack, had completed training adaptation for this model, covering the full pipeline from model loading and sharded scheduling to gradient synchronization.
Public information about the scope of this adaptation is limited. This article names neither party and does not endorse the adaptation result. We were unable to verify the exact date of the event or the original disclosure links; readers may search and verify on their own. Actual product capabilities should be based on the vendors’ official documentation and on your own reproduction results.
The sections below discuss what this kind of work typically involves technically, and what to examine when evaluating it.
II. Three Categories of Challenges in Ultra-Large-Scale Training
1. The Memory Wall
Take 2.8 trillion parameters as an example. BF16 weights occupy 2 bytes per parameter, which in decimal units is about 5.6 TB. Gradients take another ~5.6 TB. Adam’s first and second moments each use 4 bytes, totaling 8 bytes per parameter, or about 22.4 TB. The three together add up to roughly 33.6 TB.
At 33.6 TB total, with 64 GB, 80 GB, or 96 GB of usable memory per card, the theoretical minimum card counts are about 525, 420, and 350 respectively. This figure only counts parameters, gradients, and the two optimizer moments; it excludes fp32 master weights, activations, communication buffers, memory fragmentation, and redundant copies. After including fp32 master weights (~11.2 TB), the total rises to about 44.8 TB, and the minimum card counts become roughly 700, 560, and 467. Actual deployments will require significantly more cards than the theoretical floor. These numbers are only a starting point for estimation, not a deployment plan.
2. The Communication Wall
Once the model is partitioned, gradient reduction and parameter aggregation generate substantial cross-device traffic. If communication cannot overlap with computation, cluster compute utilization drops noticeably. The choice of communication topology and collective communication algorithms directly affects training cost-efficiency. With the same number of cards, different interconnect schemes can produce very different training times.
3. The Software Stack
Mainstream training frameworks and operator libraries are mostly built around the mature GPU ecosystem. New hardware must achieve alignment in the compiler, operator library, communication library, and distributed-framework plugins, while simultaneously satisfying three conditions: semantic equivalence, numerical precision alignment, and usable performance. None of the three is optional. If any one falls short, training results can deviate from expectations — and the problem often only surfaces after extended runs.
III. How FSDP2 Works and Where Its Limits Are
FSDP (Fully Sharded Data Parallel) partitions parameters, gradients, and optimizer states across devices. When the forward or backward pass needs a given layer’s parameters, the system temporarily gathers the full parameters for that layer and releases them afterward. In traditional data parallelism, every card holds a full model replica; FSDP holds only shards, so the same memory budget can accommodate a much larger model.
FSDP2 is a newer iteration of this approach, with three main changes. First, parameter sharding is based on the DTensor representation, with the sharding layout described separately from the model definition, making the code easier to read and maintain. Second, sharding granularity can be as fine as a layer or module, so attention layers, MoE expert layers, and embedding layers can adopt different sharding strategies. Third, a prefetch mechanism aggregates the next layer’s parameters while the current layer is being computed, hiding communication latency inside compute time.
“Native support” means that fundamental operations such as shard scheduling, parameter gathering, and gradient reduction are implemented directly in the underlying software stack, without going through an external compatibility layer. This only describes the implementation path. Compatibility layers can exhibit memory leaks or handle leaks during long training runs; specific issues depend on the compatibility-layer implementation and long-duration stability testing. A short program that runs successfully only proves the interfaces can be called — it does not prove the system is stable over extended execution.
FSDP2 also has clear applicability boundaries. It solves the memory problem for parameters, gradients, and optimizer states; it cannot replace tensor parallelism, pipeline parallelism, or expert parallelism. Models with extremely large individual layers, very long sequences, or large MoE scales typically require a combination of multiple parallelism strategies, and the communication ordering and device mapping between strategies must be verified individually. For smaller models, the communication overhead introduced by FSDP2 may exceed the memory savings it provides, so empirical comparison is necessary.
IV. Breaking Down the Full Training Pipeline
A complete adaptation must work through at least four stages.
Step 1: Model Loading and Weight Conversion
Large-model weights are generally stored in sharded formats. During adaptation, you must verify the parsing of shard metadata, precision conversion (for example, to BF16), and device-side memory mapping. Back up the original weight files before loading. It is advisable to complete loading validation on a small, homogeneous cluster first, confirm correctness, and only then scale to the target size. On failure, retain logs, checksums, and copies of the original weights.
The code below only illustrates the calling sequence. The device type, communication backend, API names, and parameters must be checked against the PyTorch version in use and the interfaces provided by the vendor; do not use it directly in production.
# Prerequisites (using NVIDIA and NCCL as an example; for other vendors,# substitute the corresponding device type and communication backend)# 1. Launch with torchrun, which automatically injects the following# environment variables:# WORLD_SIZE: total number of training processes, usually equal to the# total number of devices# RANK: global rank of the current process# LOCAL_RANK: rank of the current process within the local node# MASTER_ADDR / MASTER_PORT: rendezvous address and port for the# process group# Example: torchrun --nnodes=N --nproc_per_node=8 --rdzv_backend=c10d \# --rdzv_endpoint=$MASTER_ADDR:$MASTER_PORT train.py# 2. PyTorch 2.6 or later is required; FSDP2's fully_shard lives in# torch.distributed.fsdp.import osimport torchimport torch.distributed as distimport torch.distributed.checkpoint as dcpfrom torch.distributed.checkpoint.state_dict import (get_model_state_dict,set_model_state_dict,)from torch.distributed.device_mesh import init_device_meshfrom torch.distributed.fsdp import fully_shardlocal_rank = int(os.environ["LOCAL_RANK"])world_size = int(os.environ["WORLD_SIZE"])device_type = "cuda" # Replace with the device type provided by the vendortorch.cuda.set_device(local_rank) # Replace with the vendor's device-setting APIdist.init_process_group(backend="nccl") # Replace with the vendor's communication backendmesh = init_device_mesh(device_type, (world_size,))model = build_model(config) # config must match the architecture in the weight metadatafor block in model.layers:fully_shard(block, mesh=mesh)fully_shard(model, mesh=mesh)state_dict = get_model_state_dict(model)# Pre-load validation: compare the keys, shapes, and dtypes in the checkpoint# metadata against the model's state_dict. If they do not match, stop# immediately — do not force the load.dcp.load(state_dict, checkpoint_id=checkpoint_path)set_model_state_dict(model, state_dict)
Step 2: Sharding and Scheduling Strategy
Data parallelism scales the sample dimension; tensor parallelism splits matrices within a single layer; pipeline parallelism partitions the model by depth; MoE architectures additionally require expert parallelism. A common mapping looks like this:
- Data parallelism: deployed across nodes, carrying the scaling of sample batches.
- Tensor parallelism: placed on the high-bandwidth intra-node interconnect, splitting the matrices of attention and feed-forward layers.
- Pipeline parallelism: partitioned across nodes by layer segments, with relatively small communication volume.
- Expert parallelism: distributes MoE experts across different devices and requires all-to-all communication.
The actual mapping depends on the hardware topology; the above is only a common starting point. The adapting party needs to measure the communication overhead of each parallelism dimension on its own hardware before determining the optimal configuration.
Step 3: Gradient Synchronization
After the backward pass completes, the gradient shards held by each device must be reduced. Engineering practice focuses on three points. First, gradient bucketing: merge the gradients of multiple parameters before communicating, to reduce the number of communication rounds. Second, overlapping reduction with backward computation, so that communication proceeds concurrently with computation as much as possible. Third, controlling communication precision. Low-precision communication introduces additional numerical error, and its impact on convergence must be evaluated separately.
Step 4: Precision Alignment and Acceptance
A decreasing loss does not prove the adaptation is correct. Acceptance should be divided into four categories, with records retained for each.
Loss-curve alignment. Fix the data order, random seed, and initial weights, then compare the loss over the first few thousand steps against a reference implementation. Recorded fields include step, loss, learning rate, and gradient norm. The acceptance criterion is that the early-stage curves coincide within a tolerance predefined by the team. A common practice is to compute relative error step by step and look at both the mean and the maximum. On failure, first check the data order, random seed, and learning-rate schedule, then check the precision conversion.
Gradient and parameter consistency. After completing one forward and backward pass, sample several layers, aggregate the sharded gradients, and compare them against the reference implementation by computing the relative…
