TensorX
返回文献探索

Paper · arXiv 2406.18219

A Closer Look into Mixture-of-Experts in Large Language Models

Ka Man Lo, Zeyu Huang, Zihan Qiu, Zili Wang, Jie Fu

17 upvotesJune 26, 2024arXiv 预印本
AI 摘要

A study on the inner workings of MoE-based large language models reveals insights into expert behavior and router selection, offering practical suggestions for practitioners.

mixture-of-expertsMoEparameter activationcomputational efficiencyparametric featuresbehavioral featuresneuronsexpertsrouteroutput normsexpert diversityrouter designexpert allocation

Abstract

Mixture-of-experts (MoE) is gaining increasing attention due to its unique properties and remarkable performance, especially for language tasks. By sparsely activating a subset of parameters for each token, MoE architecture could increase the model size without sacrificing computational efficiency, achieving a better trade-off between performance and training costs. However, the underlying mechanism of MoE still lacks further exploration, and its modularization degree remains questionable. In this paper, we make an initial attempt to understand the inner workings of MoE-based large language models. Concretely, we comprehensively study the parametric and behavioral features of three recent MoE-based models and reveal some intriguing observations, including (1) Neurons act like fine-grained experts. (2) The router of MoE usually selects experts with larger output norms. (3) The expert diversity increases as the layer increases, while the last layer is an outlier. Based on the observations, we also provide suggestions for a broad spectrum of MoE practitioners, such as router design and expert allocation. We hope this work could shed light on future research on the MoE framework and other modular architectures. Code is available at https://github.com/kamanphoebe/Look-into-MoEs.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号
A Closer Look into Mixture-of-Experts in Large Language Models | TensorX