Skywork-MoE: A Deep Dive into Training Techniques for Mixture-of-Experts Language Models

Tianwen Wei, Bo Zhu, Liang Zhao, Cheng Cheng, Biye Li, Weiwei Lü, Jianhao Zhang, Xiaoyu Zhang, Liang Zeng, Xiaokun Wang, Yutuan Ma, Rui Hu, Shuicheng Yan, Han Fang, Yahui ZhouarXiv 2024 · DOI

Abstract

Training dense Large Language Models (LLMs) at the scale of hundreds of billions of parameters is prohibitively expensive. Sparse Mixture-of-Experts (MoE) architectures offer a solution by activating only a subset of parameters for each input token. This paper introduces Skywork-MoE, a 146B parameter model upcycled from a 13B dense foundation. We present two novel training techniques—gating logit normalization and adaptive auxiliary loss coefficients—that significantly improve expert specialization and load balancing. Our results demonstrate that Skywork-MoE achieves state-of-the-art efficiency, outperforming similar-sized dense models while activating only 22B parameters per token.

Introduction

As LLMs scale, the computational cost of training and inference becomes a primary bottleneck. Sparse MoE models address this by decoupling model capacity from per-token compute. However, MoE training introduces unique challenges, including optimal initialization, preventing expert collapse (where experts remain too similar), and maintaining balanced expert utilization without compromising the primary language modeling objective.

Methodology

Skywork-MoE utilizes a "top-2" routing strategy, where each token is processed by 2 out of 16 available experts. The model is initialized via "upcycling" from the Skywork-13B dense checkpoints.

Gating Logit Normalization

Standard MoE routers often produce relatively flat probability distributions, leading to ambiguous expert delegation. To combat this, we implemented gating logit normalization, which involves mean subtraction and scaling before the softmax operation. This technique "sharpens" the routing distribution, forcing the model to make more distinct choices and fostering better expert specialization.

Gate distribution comparison showing the sharpening effect of logit normalization.

Adaptive Auxiliary Loss Coefficients

Load balancing is typically managed by a fixed auxiliary loss hyperparameter ($\alpha$). However, a static penalty can interfere with learning if the experts are already balanced. Skywork-MoE introduces an adaptive approach: the model monitors the "token drop rate" at every layer and dynamically adjusts the penalty. If a layer is well-balanced, the auxiliary loss coefficient is reduced, allowing the gradient to focus more effectively on the language modeling task.

Training Insights: Upcycling vs. Scratch

A critical question in MoE research is whether to initialize from scratch or upcycle a dense model. Our experiments suggest a practical "rule of thumb": upcycling is superior when the MoE training budget is less than twice the cost of the original dense model's training.

Training loss trajectories and expert similarity evolution for various initialization strategies.

As shown in the figure above, while upcycled models (init_100b) start with lower loss, they risk higher expert similarity. Tracking the evolution of expert similarity serves as a vital proxy for model health; in successful upcycling, experts should diverge over time to provide specialized capacity.

Results and Performance

Skywork-MoE (146B total / 22B active) demonstrates significant performance gains relative to its compute class:

  • Benchmark Superiority: It outperforms DeepSeek-67B and Llama2-70B across standard benchmarks including MMLU, GSM8K, and HumanEval.
  • Competitive Efficiency: The model achieves a 38% Model FLOPs Utilization (MFU), a high mark for MoE training at this scale.
  • Chinese Language Proficiency: With a score of 82.2 on CEVAL, Skywork-MoE is among the strongest models for Chinese-centric tasks.

Conclusion

Skywork-MoE validates the efficacy of upcycling dense models into sparse architectures when combined with robust routing and balancing techniques. While the model excels in general knowledge and mathematics, future work will focus on further breaking expert symmetry during early training stages to close the remaining gap with frontier models in complex coding tasks.

Summary updated

BibTeX
@misc{wei2024skywork,
  author = {Tianwen Wei and Bo Zhu and Liang Zhao and Cheng Cheng and Biye Li and Weiwei Lü and Peng Cheng and Jianhao Zhang and Xiaoyu Zhang and Liang Zeng and Xiaokun Wang and Yutuan Ma and Rui Hu and Shuicheng Yan and Han Fang and Yahui Zhou},
  title = {{Skywork-MoE: A Deep Dive into Training Techniques for Mixture-of-Experts Language Models}},
  year = {2024},
  eprint = {2406.06563},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.06563},
}
Figure