Low-Cost Training for Ultra-Large Mixture-of-Experts Models: Practices and Lessons

    This article examines a 671-billion-parameter open-source Mixture-of-Experts (MoE) language model that activates 37 billion parameters per token and was pretrained on 14.8 trillion tokens for about 2.788 million GPU-hours. It explains the sparse-activation architecture, breaks down training-cost optimizations across data, precision, parallelism, and framework kernels, and summarizes benchmark performance, generation efficiency, and deployment implications for enterprises.

    1. Background: Large Models Enter an Era of Efficient Training

    In recent years, the parameter scale of large language models (LLMs) has continued to rise, but training costs and inference overhead have grown sharply as well. How to train models with top-tier capabilities under a limited compute budget has become a core challenge for the industry. In December 2024, a research organization released and open-sourced an ultra-large Mixture-of-Experts (MoE) language model that offers a highly instructive answer: 671 billion total parameters, only 37 billion parameters activated per token, pretraining on 14.8 trillion tokens, and a total training cost of about 2.788 million GPU-hours (including 2.664 million GPU-hours for pretraining), using 2,048 accelerators and corresponding to roughly US$5.576 million in R&D investment. This case demonstrates that deep coordination between architectural innovation and engineering optimization can substantially improve the economics of large-model training.

    2. Mixture-of-Experts Architecture: The Core Value of Sparse Activation

    The essence of the MoE architecture is “large capacity, small activation.” In a traditional dense model, every input token passes through all parameters, and compute grows linearly with parameter scale. An MoE model instead splits the feed-forward network into a large number of “expert” subnetworks and uses a routing mechanism to dynamically select a small number of experts for each token.

    In this model, for example, the total parameter count is 671 billion, but only about 37 billion parameters are activated per token, an activation ratio of roughly 5.5%. This means:

    1. Inference cost is similar to that of a dense model with tens of billions of parameters, while knowledge capacity is comparable to much larger models.
    2. Forward and backward compute during training is significantly lower than that of a dense approach with the same total parameter count.
    3. Experts can develop implicit functional specialization, with different experts tending to handle different semantic patterns.

    MoE also introduces new challenges, including routing load balancing, inter-expert communication overhead, and training stability. Common industry practices include auxiliary load-balancing losses, fine-grained expert partitioning, and shared experts to capture general knowledge. These design choices jointly determine the upper bound of an MoE model’s final quality.

    3. Breaking Down and Optimizing Training Costs

    A training cost of US$5.576 million is extremely low for a model at this capability level. It is the result of coordinated optimization at multiple levels:

    1. Data level: 14.8 trillion tokens of high-quality pretraining corpus. Scaling data must be accompanied by strict deduplication, cleaning, and quality filtering; otherwise, marginal returns decline quickly. Curriculum-style adjustments to the data mix are also a common technique.

    2. Precision level: Low-precision training is key to reducing cost. Mixed-precision approaches are now widely used: low-precision formats in compute-intensive operations such as matrix multiplication, and high-precision accumulation in sensitive steps, balancing throughput and convergence stability.

    3. Parallelism strategy level: A cluster of 2,048 accelerators requires carefully designed combinations of data parallelism, pipeline parallelism, expert parallelism, and tensor parallelism to minimize bubbles and cross-node communication. In MoE models, All-to-All communication in expert parallelism is often a bottleneck and must be mitigated through communication-compute overlap.

    4. Framework and kernel level: Customized compute kernels, memory recomputation strategies, gradient accumulation scheduling, and other engineering details determine the upper limit of hardware utilization.

    An illustrative cost-estimation code snippet is shown below:

    1. # Estimate total training compute (FLOPs)
    2. total_tokens = 14.8e12
    3. activated_params = 37e9
    4. # Dense-equivalent compute approximation: 6 * N * D
    5. flops = 6 * activated_params * total_tokens
    6. print(f"Total pretraining compute is approximately {flops:.2e} FLOPs")

    4. Performance and Generation Efficiency

    On multiple public benchmarks, the model performs at a level close to leading proprietary models, with particularly strong results on mathematical reasoning and Chinese-language tasks. This is closely related to the capacity advantages of the MoE architecture and to data and training strategies targeted at reasoning tasks.

    In terms of generation speed, it is about 3x faster than its predecessor. Inference acceleration typically comes from several directions: sparse activation reduces per-token compute; structures such as multi-head latent attention compress KV-cache usage; and speculative decoding ideas such as multi-token prediction increase output per step. For developers, deployment can also combine general inference optimizations such as quantization, continuous batching, and prefix caching to further reduce latency and cost.

    5. Implications for Enterprise Deployment

    This open-source case offers several lessons for the industry:

    1. The combination of open weights and a detailed technical report significantly lowers the barrier for enterprises and developers to reproduce and build on the work, promoting technical transparency.
    2. More controllable training costs make continued pretraining or fine-tuning on open-source bases a more realistic option for vertical domains.
    3. In production environments, teams can use general cloud infrastructure—such as container platforms, object storage, logging, and monitoring and alerting—to build elastic inference services that scale on demand in response to traffic fluctuations. For example, teams can deploy such open-source models on container and compute-scheduling services from a cloud provider such as Baidu AI Cloud, together with general monitoring and alerting, to maintain service stability.

    6. Conclusion

    The open-source practice of an ultra-large MoE model shows that combining architectural innovation, data engineering, and system optimization can achieve first-tier model capabilities while controlling costs. For developers, understanding the underlying principles of sparse activation, parallel training, and inference acceleration is far more important than chasing a single model—these methodologies will continue to apply to the next evolution of large-model technology.