XMoE: Sparse Models with Fine-grained and Adaptive Expert Selection

Yuanhang Yang, Shiyi Qi, Wenchao Gu, Chaozheng Wang, Cuiyun Gao +1 more
2/27/2024
cs.LGcs.CL

Official code: ysngki/XMoE (15 stars, last commit 2024-10-19).

Abstract

Sparse models, including sparse Mixture-of-Experts (MoE) models, have emerged as an effective approach for scaling Transformer models. However, they often suffer from computational inefficiency since a significant number of parameters are unnecessarily involved in computations via multiplying values by zero or low activation values. To address this issue, we present \tool, a novel MoE designed to enhance both the efficacy and efficiency of sparse MoE models. \tool leverages small experts and a threshold-based router to enable tokens to selectively engage only essential parameters. Our extensive experiments on language modeling and machine translation tasks demonstrate that \tool can enhance model performance while decreasing the computation load at MoE layers by over 50\% without sacrificing performance. Furthermore, we present the versatility of \tool by applying it to dense models, enabling sparse computation during inference. We provide a comprehensive analysis and make our code available at https://github.com/ysngki/XMoE.

View on arXivView PDF

Code Implementations(1)

ysngki/XMoEOfficial100%
152C, C++May 24, 20242 years ago

Similar Papers

Cite this paper

@article{yang2024xmoe,
  title  = {XMoE: Sparse Models with Fine-grained and Adaptive Expert Selection},
  author = {Yuanhang Yang and Shiyi Qi and Wenchao Gu and Chaozheng Wang and Cuiyun Gao and Zenglin Xu},
  year   = {2024},
  eprint = {2403.18926},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.18926v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2403.18926.svg)](https://codeofpaper.com/paper/2403.18926)

Discussion