ReMoE: Fully Differentiable Mixture-of-Experts with ReLU Routing

Ziteng Wang, Jun Zhu, Jianfei Chen
12/19/2024
cs.LG

Official code: thu-ml/ReMoE (122 stars, last commit 2024-12-20).

Abstract

Sparsely activated Mixture-of-Experts (MoE) models are widely adopted to scale up model capacity without increasing the computation budget. However, vanilla TopK routers are trained in a discontinuous, non-differentiable way, limiting their performance and scalability. To address this issue, we propose ReMoE, a fully differentiable MoE architecture that offers a simple yet effective drop-in replacement for the conventional TopK+Softmax routing, utilizing ReLU as the router instead. We further propose methods to regulate the router's sparsity while balancing the load among experts. ReMoE's continuous nature enables efficient dynamic allocation of computation across tokens and layers, while also exhibiting domain specialization. Our experiments demonstrate that ReMoE consistently outperforms vanilla TopK-routed MoE across various model sizes, expert counts, and levels of granularity. Furthermore, ReMoE exhibits superior scalability with respect to the number of experts, surpassing traditional MoE architectures. The implementation based on Megatron-LM is available at https://github.com/thu-ml/ReMoE.

View on arXivView PDF

Code Implementations(1)

thu-ml/ReMoEOfficial100%

[ICLR2025] Codebase for "ReMoE: Fully Differentiable Mixture-of-Experts with ReLU Routing", built on Megatron-LM.

12211C, C++Dec 10, 20241 years agoNOASSERTION

Similar Papers

Cite this paper

@article{wang2024remoe,
  title  = {ReMoE: Fully Differentiable Mixture-of-Experts with ReLU Routing},
  author = {Ziteng Wang and Jun Zhu and Jianfei Chen},
  year   = {2024},
  eprint = {2412.14711},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.14711v2},
  journal = {ICLR 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/2412.14711.svg)](https://codeofpaper.com/paper/2412.14711)

Discussion