Scaling Trillion-Parameter Multimodal Model Training on Domestic AI Accelerators

    This article presents a technical deep dive into adapting a 2.8-trillion-parameter open-weight multimodal MoE model for training on domestic AI accelerators. It covers the architectural challenges of long-context attention, dynamic expert routing, and cross-modal joint training, along with the modular adaptation strategy, a two-node 16-card verification environment, and stability analysis across 400 training steps. The article also discusses key optimizations for larger-scale training, including FSDP2–expert parallelism co-design, communication-computation overlap, and chunked loss computation, offering practical engineering insights for teams building large-model training pipelines on domestic hardware stacks.

    Training a Trillion-Parameter Multimodal Model on Domestic AI Accelerators: A Practical Engineering Report

    As open-weight multimodal large language models push toward the trillion-parameter scale, building stable and efficient training pipelines on domestic AI hardware has become a critical challenge for the AI infrastructure community. In a recent engineering effort, a flagship domestic AI training-inference integrated accelerator card—along with its accompanying software stack—successfully adapted an open-weight natively multimodal model with approximately 2.8 trillion total parameters for training. The run completed 400 consecutive training steps across a two-node, 16-card environment, with no numerical overflow or unexpected interruption. This article unpacks the key technical approaches and engineering lessons from that practice.

    Architectural Characteristics and Training Challenges of the Target Model

    The target model is a natively multimodal mixture-of-experts (MoE) architecture with several notable features:

    • Extremely long context support: Up to 1 million tokens of context length, imposing stringent requirements on memory footprint and compute efficiency for attention.
    • Hybrid attention mechanism: A design that combines a linear attention variant with gated sparse attention, balancing long-sequence efficiency with key-information retrieval capability.
    • Dynamic expert routing: In the MoE architecture, each token activates only a subset of experts, and routing decisions change dynamically—introducing complexity in load balancing and communication scheduling.
    • Joint cross-modal training: A visual encoding tower and a language backbone are connected via cross-modal projection modules, requiring image-text data to flow through forward propagation, backward propagation, and parameter updates within a single training process.

    Together, these characteristics place severe demands on compute density, memory management, multi-card communication bandwidth, and operator coverage in the underlying software stack. In particular, the irregular computation patterns introduced by dynamic sparse retrieval and expert routing require the low-level stack to be highly extensible.

    Modular Adaptation Strategy for the Training Pipeline

    The core adaptation approach was to integrate the model’s four key components—attention computation, dynamic routing, visual encoding, and cross-modal projection—into a unified forward, backward, and parameter-update flow, ensuring semantic equivalence and numerical correctness across the domestic software stack.

    The training scheme retained the native workflow of the mainstream training framework. With FSDP2 (the second-generation fully sharded data parallel interface), model parameters, gradients, and optimizer states were sharded across GPUs, substantially relieving per-card memory pressure. Cross-card and cross-node communication, including gradient reduction, parameter broadcast, and token dispatch/collection under expert parallelism, was handled by the bundled collective communication library.

    It is worth emphasizing that adaptation is not a matter of straightforward operator replacement. Each module must be re-validated for behavior in the sharded environment while preserving numerical consistency. For instance, the gated sparse component in the hybrid attention mechanism involves dynamic retrieval and must be co-designed with the sharded parameter layout. Expert routing, in turn, requires the communication library to support efficient All-to-All exchange.

    Two-Node 16-Card Verification Environment and Configuration

    Functional verification was carried out on a topology of two servers with 16 AI accelerator cards in total. Since the verification target was functional correctness of the training pipeline rather than full-scale pretraining, a cropped configuration was used: a 13-layer language backbone, 16 routed experts with Top-8 routing, and the complete 27-layer vision tower along with the cross-modal projection modules—ensuring that the multimodality pathway was genuinely exercised.

    Training data came from a public medical visual question answering (VQA) dataset containing image-text pairs. The global batch size was 16 with a sequence length of 1024. Model weights were randomly initialized. This configuration is reasonable from an engineering standpoint: random initialization with a reduced model scale quickly exposes numerical and communication issues in the pipeline, without incurring the high cost of full-scale pretraining.

    Training Results and Stability Analysis

    Across 400 consecutive optimizer update steps, all 16 training processes ran normally. Key metrics performed as follows:

    • Training loss: Decreased from an average of 8.9365 over steps 21–70 to 2.1802 over the final 50 steps, showing a convergence trend consistent with expectations.
    • Validation loss: Dropped from 6.5297 at step 100 to 4.6873 at step 400, indicating that the model was learning meaningful features rather than overfitting noise.
    • Memory usage: The sampled peak device memory reached 44.80 GiB, comfortably within the per-card capacity, confirming that the FSDP2 sharding and scheduling strategy was effective.

    Of particular note is the verification of the visual branch. The engineering team checked gradients to confirm that the image embedding layer, the first and last layers of the vision tower, and the cross-modal projection module all produced non-zero gradients and completed parameter updates. This is a crucial point—in multimodal training, if a break exists in the cross-modal pathway, the visual branch can degrade into a “read-only input” that generates no learning signal. Such hidden faults are difficult to detect from the loss curve alone. Proactively checking gradients module by module should become a standard practice in multimodal training adaptation.

    Optimization Reserves for Larger-Scale Training

    Beyond basic pipeline adaptation, this practice also completed four key optimizations that lay the groundwork for future scaling:

    1. FSDP2 and expert parallelism co-design: Parameter sharding and expert partitioning are combined as orthogonal dimensions, allowing the model to scale elastically across more cards.
    2. Parameter prefetching and gradient communication scheduling: Compute and communication are overlapped to hide the latency of fetching sharded parameters, improving effective compute utilization.
    3. High-performance hybrid attention operator: A custom kernel designed for long-sequence scenarios reduces the computation and memory-access overhead of the attention component.
    4. Chunked loss computation: Cross-entropy computation over the large vocabulary is executed in chunks, avoiding excessive memory usage from materializing the full logits tensor. This optimization was already active during the 400-step test run.

    Engineering Takeaways and Best Practices

    Several broadly applicable lessons can be drawn from this case. First, large-model adaptation should follow a “functionality first, scale later” path, using a cropped configuration to quickly validate pipeline correctness. Second, multimodal training must explicitly verify gradient flow in every branch. Third, combining the loss descent curve, validation metrics, and peak memory usage gives a complete picture of training health. Fourth, co-optimizing communication and computation is a key lever for unlocking performance on domestic hardware.

    For teams planning to train large models on domestic accelerators, it is advisable to leverage mature platform-level infrastructure such as cloud-native container platforms, distributed storage, and monitoring/alerting systems, and to build an end-to-end engineering pipeline covering data preparation, training scheduling, and fault self-recovery. In doing so, hardware adaptation efforts can be translated into sustainable production capability.