HyperRouter: Towards Efficient Training and Inference of Sparse Mixture of Experts

Giang Do, Khiem Le, Quang Pham, TrungTin Nguyen, Thanh-Nam Doan +5 more
12/12/2023
cs.LGcs.AI

Official code: giangdip2410/HyperRouter (33 stars, Apache-2.0, last commit 2023-11-29).

Abstract

By routing input tokens to only a few split experts, Sparse Mixture-of-Experts has enabled efficient training of large language models. Recent findings suggest that fixing the routers can achieve competitive performance by alleviating the collapsing problem, where all experts eventually learn similar representations. However, this strategy has two key limitations: (i) the policy derived from random routers might be sub-optimal, and (ii) it requires extensive resources during training and evaluation, leading to limited efficiency gains. This work introduces \HyperRout, which dynamically generates the router's parameters through a fixed hypernetwork and trainable embeddings to achieve a balance between training the routers and freezing them to learn an improved routing policy. Extensive experiments across a wide range of tasks demonstrate the superior performance and efficiency gains of \HyperRouter compared to existing routing methods. Our implementation is publicly available at {\url{https://github.com/giangdip2410/HyperRouter}}.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Code for this paper "HyperRouter: Towards Efficient Training and Inference of Sparse Mixture of Experts via HyperNetwork"

333Shell, PythonOct 9, 20232 years agoApache-2.0

Similar Papers

Cite this paper

@article{do2023hyperrouter,
  title  = {HyperRouter: Towards Efficient Training and Inference of Sparse Mixture of Experts},
  author = {Giang Do and Khiem Le and Quang Pham and TrungTin Nguyen and Thanh-Nam Doan and Bint T. Nguyen and Chenghao Liu and Savitha Ramasamy and Xiaoli Li and Steven Hoi},
  year   = {2023},
  eprint = {2312.07035},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.07035v1}
}

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

Discussion