System-Level Adaptation of Domestic GPUs for Ultra-Large Open-Source Model Training: Engineering Insights

    This article examines the system-level adaptation of domestic GPU accelerators for training ultra-large open-source models with trillions of parameters. It breaks down the core challenges of memory pressure, distributed communication, and framework-level integration, and explains the key technical steps required to build a native sharded training pipeline. It also covers the special considerations for multimodal training and the role of unified software stacks. Practical engineering guidance is included for developers who plan to fine-tune or train large models on non-mainstream accelerators.

    The Intersection of Ultra-Large Open-Source Models and Domestic AI Accelerators

    A major open-source model team recently released a flagship model with 2.8 trillion parameters. At this scale, the model far exceeds the capacity of a single GPU or even a single multi-GPU node, making a large-scale distributed training system mandatory for both pretraining and fine-tuning. Around the same time, a domestic GPU vendor announced that it had successfully adapted this open-source model to its flagship AI training/inference accelerator using its proprietary software stack, achieving a complete training pipeline from model loading and shard scheduling to gradient synchronization.

    This development highlights a core question facing the large-model industry: as open-source models grow in scale and ecosystem diversity, the diversity of compute supply and the adaptability of training frameworks are becoming decisive factors in how quickly these models can be deployed in practice.

    Why Ultra-Large Model Training Requires System-Level Adaptation

    Memory Pressure from Parameter Scale

    For a model with 2.8 trillion parameters, even with mixed-precision training (where weights are stored in half precision), the model weights alone require several terabytes of GPU memory — far beyond the tens of gigabytes available on a single accelerator. On top of that, the training process involves:

    • Optimizer states: With Adam-family optimizers, first- and second-order momentum introduce storage overhead several times larger than the parameter count;
    • Gradient buffers: Backpropagation produces gradients that require the same storage scale as the weights;
    • Activations: These grow linearly or even super-linearly with batch size and sequence length.

    The industry-standard solution is fully sharded data parallelism (FSDP-class techniques). The core idea is to partition model parameters, gradients, and optimizer states across multiple devices, temporarily gathering them on demand during forward and backward passes — trading communication for memory savings.

    The Essence of Adaptation: End-to-End Software-Hardware Integration

    Adapting a large open-source model to a non-mainstream compute platform is far more involved than simply making it runnable. It requires complete coverage of the following:

    1. Operator coverage and numerical equivalence verification: Every layer type in the model (e.g., attention mechanisms, MoE routing, normalization layers) needs support from the underlying operator library, and the numerical behavior must match the reference implementation;
    2. Distributed communication library adaptation: Collective communication operations (AllReduce, AllGather, ReduceScatter, etc.) must be implemented efficiently on the new hardware interconnect topology;
    3. Framework-level modifications: The device abstraction layer, memory management, and automatic differentiation mechanisms of the training framework need to interface with the new hardware’s runtime;
    4. Compilation and operator fusion: Graph compilation and operator fusion are used to close the gap between peak hardware performance and actual utilization.

    Key Technical Components of Training Adaptation

    Building a Native Sharded Training Pipeline

    One notable technical point in this adaptation is the construction of a “native” multi-modal training path. By “native,” we mean that the training pipeline was implemented directly on the target hardware’s software stack, rather than being ported from a legacy compatibility layer. For sharded parallelism (e.g., an FSDP2-class approach), the typical workflow looks like this:

    1. # Simplified pseudocode: core logic of fully sharded data parallelism
    2. for layer in model.layers:
    3. # 1. AllGather on the current layer to reconstruct full parameters
    4. full_weight = all_gather(layer.sharded_weight)
    5. # 2. Perform computation for this layer
    6. output = layer.forward(input, full_weight)
    7. # 3. Release gathered weights after computation; keep only the shard
    8. release(full_weight)
    9. input = output

    Three critical components must be addressed for this pipeline to work:

    • Model loading: Efficiently loading and sharding checkpoints at the billion or even trillion parameter scale typically requires a pipelined read path across multiple storage tiers (object storage, distributed file systems, local NVMe cache);
    • Shard scheduling: Determining shard granularity and placement strategy based on device topology, network bandwidth, and layer structure characteristics, with the goal of load balancing and minimizing cross-node communication;
    • Gradient synchronization: After backpropagation, gradients held on each device are reduced and aggregated via ReduceScatter, followed by synchronized optimizer state updates.

    Special Challenges in Multi-Modal Training

    For models that handle multi-modal inputs (e.g., image and text), the training pipeline must also handle the alignment of heterogeneous data flows. Vision encoders and language models differ significantly in parameter scale and compute characteristics, requiring differentiated sharding strategies. Multi-modal sample packing and sequence concatenation introduce additional complexity in data preprocessing and memory management. This requires the training framework to be flexible at both the data pipeline level and the computation graph level.

    The Role of the Software Stack

    Another pillar of this adaptation work is the unified software stack. The common industry practice is to provide a programming interface and runtime that is compatible with mainstream training ecosystems, so that higher-level framework code can be migrated to new hardware with minimal changes. Such a software stack typically includes:

    • A high-performance operator library (covering matrix operations, attention, normalization, and other core primitives);
    • A communication library (supporting multi-level topologies from intra-node high-speed interconnects to inter-node networks);
    • Compiler and tuning tools (automatic operator fusion, memory reuse, mixed-precision strategy management);
    • An adaptation layer for mainstream training frameworks (device abstraction, distributed strategy plugins).

    For enterprise users, this means open-source models can be trained or fine-tuned on diverse compute platforms, reducing dependence on any single accelerator ecosystem. It also makes it easier to assemble a complete training pipeline using general-purpose infrastructure such as cloud object storage, container platforms, and monitoring/alerting systems.

    Practical Takeaways for Developers

    1. Plan memory strategy before anything else: Before fine-tuning a large model, estimate the total memory footprint of parameters, gradients, optimizer states, and activations, then choose the appropriate sharding strategy and CPU offloading scheme;
    2. Never skip numerical consistency verification: After migrating to a new compute platform, first compare loss curves and gradient norms on a small-scale model to confirm numerical behavior consistency before scaling up;
    3. Pay close attention to communication efficiency: In distributed training, communication is often the bottleneck. Adjust shard granularity based on hardware topology, and enable gradient accumulation and communication-computation overlap;
    4. Treat checkpoint engineering as a first-class concern: Saving and restoring trillion-parameter models is a complex engineering problem in its own right. Adopt asynchronous saving, sharded storage, and resumable training mechanisms;
    5. Leverage cloud platform capabilities: Use object storage for large checkpoints, container platforms for elastic scaling of training clusters, and logging/monitoring services to ensure the stability of long-running training jobs.

    Conclusion

    The convergence of ultra-large open-source models with diverse compute platforms is pushing large-model technology from a small number of players into a much broader range of industrial scenarios. When a domestic GPU platform completes training adaptation for a trillion-parameter model, it signals that the software-hardware co-design ecosystem is maturing. For developers, understanding the general principles behind sharded parallelism, multi-modal training pipelines, and unified software stacks will hold more long-term value than following any specific product or vendor — these engineering capabilities will remain relevant as large-model technology continues to evolve.