Mixture of Experts (MoE)
Models that route each input to a few experts: Switch Transformer and more.
BASE LayersBASE Layers is an MoE layer that assigns tokens to experts by maximizing the total affinity under the constraint that every expert receives exactly the same number of tokens (solving a linear assignment problem). Because the load is always balanced, it trains without an auxiliary loss or a capacity factor and performs as well as or better than other MoE methods.
Expert Choice RoutingExpert Choice routing is an MoE method in which, instead of tokens choosing experts, each expert selects the same number of tokens with the highest affinity from the batch. The load is always balanced without an auxiliary loss, the number of experts used varies per token, and pretraining converged more than twice as fast as with GShard's top-2 gating.
GShardGShard is a system that replaces every other feedforward layer of a Transformer with an MoE layer that selects up to 2 experts per token, and automatically partitions training across thousands of devices with just a few annotations. It trained a 600-billion-parameter translation model on 2048 TPU cores in 4 days, far outperforming per-language models on translation for 100 languages.
Mixture of Experts (Original)The original mixture of experts is a method in which a gating network decides probabilistically, for each input, which expert (small network) to entrust it to, and the experts compete so that they divide the training data among themselves. In the 1991 paper, it learned vowel discrimination in about half the epochs of an ordinary network.
Sparsely-Gated MoESparsely-Gated MoE is a layer that uses only a few of many experts (small networks) for each input, chosen by noisy top-k selection, which makes it possible to greatly increase the number of parameters with almost no increase in computation.
Switch TransformerSwitch Transformer is a model that replaces the feedforward layers of a Transformer with MoE layers that select only one expert per token. It can greatly increase the number of parameters without changing the computation, pretrained up to 7× faster than T5-Base with the same compute, and was used to train a model with 1.6 trillion parameters.
