PoC of MoE Multimodal Training Pipeline on Domestic GPUs
A domestic GPU vendor recently completed a proof of concept (PoC) for a Mixture of Experts (MoE) multimodal large language model training pipeline. Running on a 16-GPU, dual-node setup, the experiment validated the distributed training loop and basic convergence without numerical overflow. This article breaks down the primary challenges of MoE multimodal training, the specific PoC configurations, Fully Sharded Data Parallel (FSDP) implementation details, and an objective evaluation of the released convergence and memory metrics.
Recently, a domestic GPU vendor’s laboratory published the validation results of a Mixture of Experts (MoE) multimodal large language model training pipeline. The experiment ran 400 consecutive training steps on a dual-node, 16-GPU configuration without numerical overflow or abnormal interruptions. It is crucial to clarify the scope of this work upfront: it was a trimmed proof of concept (PoC) aimed at verifying whether the training pipeline could run end-to-end, rather than completing a full pre-training of a trillion-parameter model.
1. Two Main Challenges in MoE Multimodal Training
The original model is nominally around 2.8 trillion parameters and uses a native multimodal architecture that combines dynamic sparse attention with an expert routing mechanism. This architecture places two main pressures on the underlying hardware.
The first is communication. MoE replaces the feed-forward layer with multiple expert networks. During forward propagation, a routing gate assigns each token to different experts for computation. When experts are distributed across different GPUs, All-to-All communication occurs. As the number of nodes increases, this communication can easily become a bottleneck for training throughput.
The second is memory. A multimodal model contains both a visual tower and a language backbone, and dynamic routing causes significant fluctuations in memory usage at each step. Static memory allocation strategies are prone to fragmentation under these conditions, leading to Out of Memory (OOM) errors.
2. Configuration of This Validation
The validation team did not pursue peak single-GPU compute power; instead, they first checked if the distributed training pipeline could run successfully. The configuration was as follows:
- The language backbone was truncated to 13 layers.
- 16 routing experts were configured, with each token activating Top-8 experts.
- The complete 27-layer visual tower and cross-modal projection module were retained to ensure the multimodal fusion part was unaffected by trimming.
Training data came from an open-source image-text VQA dataset, and the model was trained from random initialization. Therefore, this experiment verified the basic convergence capability of the pipeline. Public materials did not provide the total parameter count after trimming, so its proportion to the 2.8 trillion parameters cannot be calculated. Readers should not directly extrapolate these results to the full-scale model.
3. Key Points of Fully Sharded Data Parallel Training
This validation employed Fully Sharded Data Parallel (FSDP). It distributes parameters, gradients, and optimizer states across GPUs within the data parallel group, recomposing parameters on demand during computation. This significantly reduces per-GPU memory usage, at the cost of additional parameter gathering and communication overhead per step.
The team also used an in-house collective communication library, optimizing the NCCL-like interface to reduce cross-node transmission latency and ensure the efficiency of MoE routing communication. The source materials did not provide specific latency or bandwidth figures, making it impossible to evaluate the improvement margin.
Below is a simplified example demonstrating the basic structure of the training loop. Note that compute_loss is a placeholder function that should be replaced with the actual loss calculation.
import torchimport torch.distributed as distfrom torch.distributed.fsdp import FullyShardedDataParallel as FSDPdef setup_distributed():# Initialize the distributed process groupdist.init_process_group(backend="nccl")torch.cuda.set_device(dist.get_rank() % torch.cuda.device_count())def train(base_model, data_loader, device, lr=1e-4):# Wrap the model before creating the optimizer to ensure the optimizer references the sharded parametersmodel = FSDP(base_model, device_id=device)optimizer = torch.optim.AdamW(model.parameters(), lr=lr)model.train()for batch in data_loader:outputs = model(batch["images"], batch["texts"])loss = compute_loss(outputs, batch["labels"])loss.backward()# FSDP-provided clipping interface, acts on sharded gradientsmodel.clip_grad_norm_(max_norm=1.0)optimizer.step()optimizer.zero_grad(set_to_none=True)
Implementation requires attention to the following points:
- Wrap the model before creating the optimizer. The optimizer must reference the FSDP-wrapped parameters.
- Use
model.clip_grad_norm_provided by FSDP for gradient clipping. Since each GPU only holds a portion of the gradients after sharding, directly callingtorch.nn.utils.clip_grad_norm_will only calculate the norm on the local shard, which is not the global norm. - The update order should be backward propagation, gradient clipping, optimizer update, and finally clearing gradients.
FSDP.summon_full_paramstemporarily materializes full parameters, making it suitable for exporting weights or inspecting parameters. It should not be placed within the forward and backward pass of training.- Mixed precision, sharding strategies, and wrapping strategies need to be selected alongside considerations for memory and communication overhead.
- When saving and restoring checkpoints, clarify the
state_dicttype used and verify that the restored loss continues the original curve.
4. Interpreting Convergence and Memory Data
The original text provides three sets of figures:
- Training loss: The mean for steps 21 to 70 was 8.9365, and the mean for the last 50 steps was 2.1802.
- Validation loss: Decreased from 6.5297 to 4.6873.
- Peak memory: 44.80 GiB.
These numbers indicate that the training loss is generally decreasing, and validation loss is dropping synchronously. Based on this, the original authors concluded that the model is not overfitting and that the visual branch is participating in parameter updates. However, a decrease in loss on a single validation set is insufficient to prove the absence of overfitting; multiple metrics and multiple rounds of evaluation are needed. Whether the visual branch is actually updating also requires checking the gradient statistics of each module for confirmation.
The measurement criteria for the data are also not public. The text does not specify whether 44.80 GiB is a single-GPU or global value, nor does it mention the batch size, sequence length, compute precision, or whether activations and optimizer states are included. Without this information, readers cannot reproduce this figure or compare it with other solutions. The conclusion of the original text mentions gradient checking, highlighting the need for further verification of these metrics.
