Multi-Head Mixture-of-Experts

Xun Wu, Shaohan Huang, Wenhui Wang, Furu Wei
4/23/2024
cs.CLcs.AIcs.LG

No official code found. Best implementation: kyegomez/MHMoE (31 stars, MIT, last commit 2026-04-13). 1 more below.

Abstract

Sparse Mixtures of Experts (SMoE) scales model capacity without significant increases in training and inference costs, but exhibits the following two issues: (1) Low expert activation, where only a small subset of experts are activated for optimization. (2) Lacking fine-grained analytical capabilities for multiple semantic concepts within individual tokens. We propose Multi-Head Mixture-of-Experts (MH-MoE), which employs a multi-head mechanism to split each token into multiple sub-tokens. These sub-tokens are then assigned to and processed by a diverse set of experts in parallel, and seamlessly reintegrated into the original token form. The multi-head mechanism enables the model to collectively attend to information from various representation spaces within different experts, while significantly enhances expert activation, thus deepens context understanding and alleviate overfitting. Moreover, our MH-MoE is straightforward to implement and decouples from other SMoE optimization methods, making it easy to integrate with other SMoE models for enhanced performance. Extensive experimental results across three tasks: English-focused language modeling, Multi-lingual language modeling and Masked multi-modality modeling tasks, demonstrate the effectiveness of MH-MoE.

View on arXivView PDF

Code Implementations(2)

yushuiwx/MH-MoECommunity100%
201C++, CudaOct 26, 20241 years ago
kyegomez/MHMoECommunity70%
MIT

Community Implementation of the paper: "Multi-Head Mixture-of-Experts" In PyTorch

315Shell, PythonApr 26, 20246 months agoMIT
aiartificial-intelligenceattentionchickenmachine-learning+3 more

Similar Papers

Cite this paper

@article{wu2024multihead,
  title  = {Multi-Head Mixture-of-Experts},
  author = {Xun Wu and Shaohan Huang and Wenhui Wang and Furu Wei},
  year   = {2024},
  eprint = {2404.15045},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2404.15045},
  url    = {http://arxiv.org/abs/2404.15045v1},
  journal = {NEURIPS 2024 2024}
}

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/2404.15045.svg)](https://codeofpaper.com/paper/2404.15045)

Discussion