Training Ultra-Large Models on Homegrown AI Accelerators: A Practical Adaptation Analysis

    This article examines how an open-source 2.8-trillion-parameter multimodal model was adapted for training on a flagship homegrown AI training-and-inference accelerator and a self-developed unified computing software stack. It covers hardware-software stack coordination, FSDP/ZeRO and tensor/pipeline parallelism under memory constraints, the full pipeline from checkpoint loading and sharding scheduling to gradient synchronization, the architectural value of training-inference integration, and implications for AI compute platforms. Readers gain a general methodology for trillion-parameter training adaptation rather than product-specific guidance.

    1. Background: New Compute Requirements for Ultra-Large Model Training

    In recent years, the parameter scale of open-source large models has continued to rise, with flagship models at the trillion-parameter level appearing one after another. Both training and fine-tuning such models place extremely high demands on the underlying compute system: a single card’s memory is far from sufficient to hold model parameters, optimizer states, and activations, so large-scale cluster parallelism is mandatory. At the same time, training frameworks, communication libraries, and compilers must deeply coordinate with the hardware to turn theoretical compute into effective throughput.

    Recently, one team completed training adaptation for an open-source 2.8-trillion-parameter multimodal model based on a flagship AI training-and-inference integrated compute card and a self-developed unified computing software stack. The work connected the full training chain from model loading and sharding scheduling to gradient synchronization. This practice is representative for understanding how homegrown compute can support large-model training. This article does not focus on a specific product; instead, it analyzes the core methods and engineering practices behind such adaptation work from a general technical perspective.

    2. Technical Foundation: Hardware and Software Stack Coordination

    Large-model training is not simply a matter of “having cards and running the model.” It is a vertically integrated technical system:

    1. Hardware layer: Training cards need high-bandwidth memory such as HBM-class memory, high compute density, and high-speed inter-card interconnect. For trillion-parameter models, the interconnect bandwidth within a single node and across clusters directly determines the upper bound of communication overhead for pipeline parallelism and tensor parallelism.

    2. Compute software stack layer: Similar to the role CUDA plays in its ecosystem, homegrown accelerators usually provide their own unified compute architecture and programming model, such as the MUSA-like software stack mentioned in the source material. This includes drivers, runtime, compilers, communication libraries, and operator libraries. The first step in adaptation is to ensure that mainstream training frameworks can run on this software stack through backend plugins or device mapping. Typical measures include mapping the framework’s device abstraction, streams, and communication backend to the proprietary runtime, and providing high-performance implementations for hotspot operators such as attention and matmul.

    3. Framework layer: Device extension mechanisms in frameworks such as PyTorch allow new hardware to join the ecosystem by registering a custom backend. This is the foundation that enables “training adaptation” to proceed as a software engineering effort.

    3. Challenge One: Memory and Parallelism for Trillion-Parameter Models

    For a 2.8-trillion-parameter model, storing parameters alone in FP16/BF16 requires approximately 5.6 TB of memory. Adding first-order and second-order momentum for Adam-class optimizers, which typically each take twice the parameter storage, brings total states to tens of TB. Multi-dimensional parallelism and sharding optimization are therefore essential:

    1. Data parallelism plus fully sharded data parallelism (FSDP/ZeRO-class solutions): Parameters, gradients, and optimizer states are partitioned within the data-parallel group. During forward and backward computation, parameters are all-gathered on demand and released after use, greatly reducing peak per-card memory. The “native FSDP2 training path” mentioned in the source refers to a new-generation sharded data-parallel implementation. Compared with earlier versions, it is more mature in sharding granularity, mixed-precision handling, and communication-computation overlap.

    2. Tensor parallelism and pipeline parallelism: When a single layer’s parameters still exceed multi-card capacity, tensor parallelism (splitting matrix multiplications within a layer) must be combined with pipeline parallelism (splitting the model by layers). The design of pipeline scheduling strategies, such as 1F1B and interleaved scheduling, directly affects bubble rate and cluster utilization.

    3. Special considerations in heterogeneous environments: Homegrown cards may differ from mainstream solutions in memory capacity and interconnect topology. Sharding strategies, micro-batch sizes, and recomputation ratios must be retuned based on measured profiling rather than simply copying existing configurations.

    An illustrative FSDP configuration is as follows:

    1. from torch.distributed.fsdp import FullyShardedDataParallel as FSDP
    2. model = FSDP(
    3. model,
    4. sharding_strategy=ShardingStrategy.FULL_SHARD,
    5. mixed_precision=MixedPrecision(param_dtype=torch.bfloat16),
    6. device_id=torch.cuda.current_device(), # points to the accelerator after device mapping
    7. )

    4. Challenge Two: Building the Full Training Pipeline

    The source summarizes the adaptation result as a complete chain “from model loading and sharding scheduling to gradient synchronization.” Each of these three stages has its own difficulties:

    1. Model loading: The checkpoint of a trillion-parameter model can itself reach tens of TB, involving shard format parsing, tensor-parallel split and rearrangement, and precision conversion such as FP32 to BF16. A common pitfall during loading is heavy re-sharding I/O caused by a mismatch between shard granularity and training parallelism. In engineering practice, pre-sharding or streaming loading is usually used to mitigate this.

    2. Sharding scheduling: FSDP requires parameter all-gather and release to be triggered at the correct times, which is closely tied to hardware asynchronous execution capabilities and event mechanisms. The software stack needs to support efficient stream synchronization and communication-computation overlap; otherwise, all-gather will block computation serially and throughput will drop sharply.

    3. Gradient synchronization: Gradients produced during backward computation need to be reduced and sharded within the data-parallel group through reduce-scatter. Gradient bucketing, overlap between communication and backward computation, and loss scaling under mixed precision are all key to ensuring convergence and efficiency. In addition, multimodal training introduces joint optimization of a vision encoder and a language model, creating larger differences in gradient scales and placing higher demands on training stability strategies such as gradient clipping and learning rate warmup.

    5. Architectural Significance of Training-Inference Integration

    Another keyword worth noting is “training-inference integration.” Traditionally, training cards and inference cards often belong to different product lines, which brings extra costs such as model format conversion, operator alignment, and precision calibration. Training-inference integration means that the same hardware and software stack covers both training and inference scenarios. Its value lies in the following:

    • Models produced by training can be deployed directly on the same class of hardware, avoiding precision and performance losses from cross-platform migration;
    • Enterprises can dynamically schedule training and inference workloads on the same compute pool, improving resource utilization;
    • The software stack only needs to maintain one operator ecosystem chain, reducing adaptation and O&M complexity.

    6. Implications for the Industry

    This practice reflects three main lines in the development of homegrown AI compute. First, software stack ecosystem is a more critical competitive dimension than peak compute; framework compatibility and operator completeness determine usability. Second, “native adaptation” of distributed training strategies is better than simple porting; only by retuning parallelism and communication strategies for hardware characteristics can theoretical compute be approached. Third, as open-source ultra-large models become an industry foundation, the ability to efficiently complete training and fine-tuning adaptation for such models is becoming an important measure of the maturity of a compute platform.

    7. Conclusion

    Training adaptation for trillion-parameter models is a system engineering effort involving multi-layer coordination across hardware, software stacks, frameworks, and algorithm strategies. Connecting the full chain from model loading and sharding scheduling to gradient synchronization marks a substantive step for homegrown compute systems on the hardest path of ultra-large model training. For developers and enterprises, understanding this methodology has more long-term value than focusing on a specific product. No matter how hardware evolves, three issues remain central to large-model training: parallel sharding, communication optimization, and training stability.