Mixture of A Million Experts

Xu Owen He
7/4/2024
cs.LGcs.AI

No official code found. Best implementation: lucidrains/PEER-pytorch (137 stars, MIT, last commit 2025-11-01). 1 more below.

Abstract

The feedforward (FFW) layers in standard transformer architectures incur a linear increase in computational costs and activation memory as the hidden layer width grows. Sparse mixture-of-experts (MoE) architectures have emerged as a viable approach to address this issue by decoupling model size from computational cost. The recent discovery of the fine-grained MoE scaling law shows that higher granularity leads to better performance. However, existing MoE models are limited to a small number of experts due to computational and optimization challenges. This paper introduces PEER (parameter efficient expert retrieval), a novel layer design that utilizes the product key technique for sparse retrieval from a vast pool of tiny experts (over a million). Experiments on language modeling tasks demonstrate that PEER layers outperform dense FFWs and coarse-grained MoEs in terms of performance-compute trade-off. By enabling efficient utilization of a massive number of experts, PEER unlocks the potential for further scaling of transformer models while maintaining computational efficiency.

View on arXivView PDF

Code Implementations(2)

MIT

Pytorch implementation of the PEER block from the paper, Mixture of A Million Experts, by Xu Owen He at Deepmind

1376PythonJul 9, 202411 months agoMIT
artificial-intelligencedeep-learningmixture-of-expertsproduct-key
huyphan168/PEERCommunity61%

Mixture of A Million Experts

563PythonJul 16, 20242 years ago

Similar Papers

Cite this paper

@article{he2024mixture,
  title  = {Mixture of A Million Experts},
  author = {Xu Owen He},
  year   = {2024},
  eprint = {2407.04153},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.04153v1}
}

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

Discussion