Papers › AdaMoE: Token-Adaptive Routing with Null Experts for Mixture-of-Experts Language Models

AdaMoE: Token-Adaptive Routing with Null Experts for Mixture-of-Experts Language Models

19 Jun 2024arXiv:2406.13233archive 2025-07-28

Zihao Zeng, Yibo Miao, Hongcheng Gao, Hao Zhang, Zhijie Deng

Mixture of experts (MoE) has become the standard for constructing production-level large language models (LLMs) due to its promise to boost model capacity without causing significant overheads. Nevertheless, existing MoE methods usually enforce a constant top-k routing for all tokens, which is arguably restrictive because various tokens (e.g., "<EOS>" vs. "apple") may require various numbers of experts for feature abstraction. Lifting such a constraint can help make the most of limited resources and unleash the potential of the model for downstream tasks. In this sense, we introduce AdaMoE to realize token-adaptive routing for MoE, where different tokens are permitted to select a various number of experts. AdaMoE makes minimal modifications to the vanilla MoE with top-k routing -- it simply introduces a fixed number of null experts, which do not consume any FLOPs, to the expert set and increases the value of k. AdaMoE does not force each token to occupy a fixed number of null experts but ensures the average usage of the null experts with a load-balancing loss, leading to an adaptive number of null/true experts used by each token. AdaMoE exhibits a strong resemblance to MoEs with expert choice routing while allowing for trivial auto-regressive modeling. AdaMoE is easy to implement and can be effectively applied to pre-trained (MoE-)LLMs. Extensive studies show that AdaMoE can reduce average expert load (FLOPs) while achieving superior performance. For example, on the ARC-C dataset, applying our method to fine-tuning Mixtral-8x7B can reduce FLOPs by 14.5% while increasing accuracy by 1.69%.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2406.13233")

Code

Syntology Ran 3 of 5 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 2 ran with no contract checked.

By repository: official repository: 5 samples from 1 repository, 3 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

cengzihao/adamoe officialmentioned in paperpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

5 samples harvested; 3 ran; 0 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
2ran
2unverified

Licence: 5 of the 5 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from cengzihao/adamoe. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

detect_nan_inf cengzihao/adamoe/exp_1/src/mola_modeling_llama_hacked.py official repository ran no licence file found · pointer only · 7b4d35d5ca974ddd · report
load_balancing_loss_func cengzihao/adamoe/exp_1/src/mola_modeling_llama_hacked.py official repository ran no licence file found · pointer only · e9ff56fcac52d4ac · report
rotate_half cengzihao/adamoe/exp_1/src/mola_modeling_llama_hacked.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · b99eea6376d1e212 · report
load_balancing_loss_func_with_null_experts cengzihao/adamoe/exp_2/LLaMA_Factory/src/llamafactory/model/adaptive_moe_utils.py official repository unverified no licence file found · pointer only · f11dbd11fe06507b · report
load_config cengzihao/adamoe/exp_2/LLaMA_Factory/src/llamafactory/model/loader.py official repository unverified no licence file found · pointer only · 67a726db0e25cb25 · report

Tasks

ARCMixture-of-Experts

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

MoESET

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections