Technical Practices and Path Analysis for Adapting Ultra-Large Parameter Model Training on Domestic AI Hardware
This article explores the adaptation of ultra-large open-source models for training on domestic AI accelerators. It systematically outlines the core phases of large-scale distributed training adaptation, covering multimodal training framework construction, parameter sharding, gradient synchronization, and the establishment of the training pipeline. Additionally, it summarizes common challenges and best practices to help readers understand the complete technical path for leveraging domestic computing power in large model training.
Recently, a model team open-sourced a flagship large model with 2.8 trillion parameters. Simultaneously, a domestic AI chip manufacturer announced the successful training adaptation of this model using its flagship training-inference integrated accelerator card and proprietary software stack. They built a native FSDP2 multimodal training path, establishing a complete training pipeline from model loading and sharding to gradient synchronization. This development has drawn significant industry attention to the capability of domestic computing power to support ultra-large model training. Rather than focusing on specific products, this article addresses the underlying general technical question: How can we adapt an ultra-large parameter model for training in a heterogeneous computing environment? What are the core phases, technical challenges, and engineering practices involved?
1. Why Ultra-Large Parameter Model Training is a Tough Challenge
What do 2.8 trillion parameters mean? Using mainstream mixed-precision training schemes, the memory required just for model weights, optimizer states, and gradients far exceeds the capacity of a single card or even a single machine with multiple cards. A widely used industry rule of thumb is that during the training phase, each parameter requires approximately 16 to 20 bytes of memory overhead (covering weights, gradients, and first and second-order moments). Based on this, 2.8 trillion parameters require tens of terabytes of memory capacity, dictating that training must rely on a combination of multi-dimensional parallel strategies, including data parallelism, tensor parallelism, pipeline parallelism, and optimizer state sharding.
Furthermore, introducing a multimodal training path increases complexity. Multimodal models typically involve joint training of a vision encoder and a language model. The significant differences in data throughput characteristics and computational density across different modalities place higher demands on data loading pipelines, operator coverage, and scheduling strategies.
2. Three Core Phases of Training Adaptation
2.1 Model Loading: From Weight Structure to Memory Layout
The first step in training adaptation is model loading. For ultra-large parameter models, this phase must address two issues:
- Weight Format Compatibility: Open-source models are usually stored in specific sharded formats. The adapting party needs to parse the weight naming, data types, and sharding methods, mapping them to the tensor representations of their own framework.
- On-demand Loading and Pre-sharding: Full weights cannot reside in memory all at once. Solutions typically involve lazy loading, memory mapping, or pre-splitting schemes linked with sharding strategies, ensuring each computing device only loads and holds the shard it is responsible for.
The conceptual pseudo-code logic is as follows:
# Conceptual illustration: model loading based on sharding strategysharding_spec = build_sharding_plan(model_config, world_size)for name, param in model.named_parameters():shards = shard_tensor(param, sharding_spec[name])distribute_to_devices(shards) # Only distribute the corresponding shards
2.2 Sharding and Scheduling: The Key Role of FSDP-like Solutions
The core idea of FSDP (Fully Sharded Data Parallel) and its evolved versions is to shard model parameters, gradients, and optimizer states across all devices. During forward and backward computations, the required parameters are temporarily aggregated (All-Gather) on demand and released immediately after computation, thereby minimizing memory usage. Compared to earlier versions, the new generation of solutions has been enhanced in the following areas:
- Finer-grained sharding units, supporting mixed splitting by layer and by module;
- More flexible communication and computation overlap strategies to reduce aggregation wait times;
- Native collaborative support for technologies like mixed precision and gradient checkpointing.
Implementing such solutions on domestic accelerator cards requires the software stack to provide complete support for collective communication primitives, operator fusion, and memory management, which is the core focus of the adaptation work.
2.3 Gradient Synchronization: Communication Efficiency Determines Training Throughput
After backpropagation, each device holds its local gradient shard and must synchronize via collective communication like Reduce-Scatter. In clusters of a thousand cards or more, communication overhead often becomes the bottleneck. Common optimization methods include:
- Communication and Computation Overlap: Executing gradient synchronization in parallel with backward computation for subsequent layers;
- Gradient Accumulation: Accumulating gradients over multiple steps for small batches before synchronization to amortize communication costs;
- Topology-aware Communication Scheduling: Selecting communication paths and algorithms based on network topology (intra-node NVLink/PCIe, inter-node RDMA, etc.).
3. Typical Challenges and Solutions in Adaptation Engineering
- Operator Coverage and Precision Alignment: New hardware platforms must ensure all operators involved in the model are available and that numerical precision matches the reference implementation. Issues are typically located through layer-by-layer precision comparison and error analysis.
- Stability and Fault Tolerance: Long-term training at the trillion-parameter level must consider checkpointing, automatic fault recovery, and training state snapshot mechanisms.
- Software-Hardware Co-optimization: Compiler optimization, memory fragmentation management, and communication bandwidth utilization require continuous tuning to approach theoretical throughput.
4. Industry Significance and Outlook
The completion of training adaptation for ultra-large open-source models on domestic computing platforms validates the feasibility of the technical closed-loop: “proprietary hardware + proprietary software stack + open-source large model”. For enterprises, this means more diversified computing power choices for large model training and enhanced supply chain resilience. In the future, with the continuous improvement of the software ecosystem, the maturation of parallel strategies, and the expansion of operator library coverage, domestic computing power will evolve from “usable” to “user-friendly” in the large model training domain, providing solid support for the autonomy and controllability of AI infrastructure.
For developers, understanding the complete pipeline—model loading, sharding scheduling, and gradient synchronization—is a core competency for mastering large-scale distributed training, regardless of the hardware platform.
