Training a Multimodal MoE Model on 16 Domestic AI Accelerators Across Two Servers

    This article describes a two-server, 16-accelerator training test for a multimodal mixture-of-experts model using FSDP2. It covers the main memory, communication, and vision-gradient challenges; the distributed training design; test configuration and results; visual branch verification; optimization techniques; and the limitations of the current validation, which uses a reduced model rather than the full 2.8-trillion-parameter target configuration.

    1. Three Challenges in Multimodal MoE Training

    A native multimodal large language model includes a language backbone, a vision tower, and cross-modal projection modules. When expert routing and joint image-text training are introduced, the training pipeline faces three major challenges.

    Memory pressure is the first challenge. At trillion-parameter scale, the combined memory required for model weights, gradients, and optimizer states is far beyond the capacity of a single accelerator. A single-device setup or simple data parallelism cannot accommodate the complete training state.

    Communication overhead is the second challenge. MoE models frequently dispatch and aggregate tokens during forward and backward propagation. The cross-modal projection layer must also synchronize features from different modalities. These operations place heavy demands on bandwidth between accelerators and across nodes.

    Gradient updates in the vision branch are the third challenge. During image-text joint training, the vision branch must participate in backpropagation and update its parameters. Otherwise, it functions only as an input channel and cannot learn effective visual representations.

    2. An FSDP2-Based Adaptation

    This adaptation uses FSDP2, or Fully Sharded Data Parallel 2, to build the multimodal training path. FSDP2 shards parameters, gradients, and optimizer states across devices, so each accelerator stores only a portion of the complete training state. This reduces per-device memory consumption.

    The training framework follows the native AutoModel workflow. Attention computation, dynamic routing, visual encoding, and cross-modal projection are organized as relatively independent modules and then connected to a unified forward, backward, and parameter-update process. Communication between accelerators and nodes is handled by the accelerator platform’s proprietary collective communication library.

    For cloud deployment, distributed training requires stable compute scheduling and sufficient data throughput. A general-purpose container platform and object storage service can provide these capabilities, allowing multi-node jobs to start and run continuously.

    3. Two-Server, 16-Accelerator Configuration and Results

    The test environment consisted of two physical servers with a total of 16 flagship AI training and inference accelerators.

    The tested model was not the complete 2.8-trillion-parameter model. The 2.8-trillion-parameter figure represents the target scale of the adaptation. The test instead used a randomly initialized reduced configuration with:

    • A 13-layer language backbone
    • 16 routed experts
    • Top-8 expert routing
    • The complete 27-layer vision tower
    • The cross-modal projection modules

    Therefore, the conclusions in this article apply only to this reduced configuration. Full-scale training has not yet been validated.

    The dataset was the MedPix-VQA image-text dataset. The global batch size was 16, and the maximum sequence length was 1,024.

    The 16 training processes completed 400 consecutive optimizer updates without numerical overflow or abnormal interruption.

    The peak device memory reported by sampling was 44.80 GiB. This value is directly related to the batch size and sequence length used in the test. The peak will change if either the batch size or sequence length changes. The original test record does not specify the statistical definition of this measurement, including whether it was collected per device, the sampling frequency, the observation window, or whether optimizer states were included. Any citation should therefore follow the original test record.

    4. Training Curves and Vision-Branch Verification

    The average training loss from steps 21 to 70 was 8.9365. The average over the final 50 steps decreased to 2.1802. Validation loss fell from 6.5297 at step 100 to 4.6873 at step 400.

    The overall downward trend indicates that the training pipeline was able to converge under this configuration. However, no comparison was made with other configurations or baselines. These results therefore demonstrate training stability but do not establish an advantage in convergence speed.

    For the vision-branch verification, the technical team inspected the computation graph. The image embedding layer, the first and final layers, and the cross-modal projection modules all produced non-zero gradients, accompanied by actual parameter updates. This indicates that the visual encoder participated in backpropagation during the test.

    The original materials do not provide the threshold used to determine whether a gradient was non-zero, nor do they describe the exact inspection method, such as hooks or traversal of computation-graph nodes. These details would need to be added for reproducibility.

    5. Further Optimizations

    After the basic training path was operational, the team implemented several lower-level optimizations for future large-scale training.

    1. Combining FSDP2 with expert parallelism
      Expert parallelism was added on top of data parallelism to reduce MoE memory consumption and improve load balance.

    2. Overlapping parameter prefetching and gradient communication
      Parameters required by upcoming operations are prefetched asynchronously, while gradient communication runs in parallel with computation to hide communication latency.

    3. Hybrid attention operators
      Custom operators were developed for hybrid attention mechanisms such as KDA and Gated DSA. The original materials do not provide the expanded names or definitions of these mechanisms, nor do they state whether the custom operators underwent numerical equivalence testing.

    4. Chunked loss computation
      Long sequences and multimodal inputs can increase peak memory usage. Computing the loss in chunks helps smooth memory fluctuations during training. This feature was enabled during the 400-step test.

    6. Conclusions and Limitations

    The adaptation supports three conclusions:

    1. Under the reduced configuration, the FSDP2 training path ran for 400 steps across two servers and 16 accelerators without numerical overflow or interruption.
    2. The vision branch produced non-zero gradients and completed parameter updates under this configuration.
    3. The measured peak memory usage of 44.80 GiB can serve as a reference for this specific batch size and sequence length.

    The test also has two important limitations:

    1. The tested model was not the complete 2.8-trillion-parameter model. Full-scale training has not been validated.
    2. No baseline comparison or comparison among different sharding strategies was provided. The memory measurement methodology and some operator details also remain undisclosed.

    Future work should include full-scale validation, controlled comparison experiments, and a reproducible launch configuration.