HackerPapers

arXiv:2101.03961cs.LG

Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity

William Fedus, Barret Zoph, Noam Shazeer

Abstract

In deep learning, models typically reuse the same parameters for all inputs. Mixture of Experts (MoE) defies this and instead selects different parameters for each incoming example. The result is a sparsely-activated model -- with outrageous numbers of parameters -- but a constant computational cost. However, despite several notable successes of MoE, widespread adoption has been hindered by complexity, communication costs and training instability -- we address these with the Switch Transformer. We simplify the MoE routing algorithm and design intuitive improved models with reduced communication and computational costs. Our proposed training techniques help wrangle the instabilities and we show large sparse models may be trained, for the first time, with lower precision (bfloat16) formats. We design models based off T5-Base and T5-Large to obtain up to 7x increases in pre-training speed with the same computational resources. These improvements extend into multilingual settings where we measure gains over the mT5-Base version across all 101 languages. Finally, we advance the current scale of language models by pre-training up to trillion parameter models on the "Colossal Clean Crawled Corpus" and achieve a 4x speedup over the T5-XXL model.

arXiv comments
JMLR
Journal reference
DOI
Subjects
cs.LGMachine Learning cs.AIArtificial Intelligence

On Hacker News

Linked by 10 identifiable commenters in 10 comments across 10 threads, from Jan 2021 to May 2026. Found in 5 HN submissions from Jan 2021 to Jan 2021. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments10 threads

    • Here is a paper from few years ago where they talk about 7x speed increase, which equates to savings. https://arxiv.org/abs/2101.03961

      agunapalView on HNParent context

    • The title should be changed to reflect that the checkpoints were released 1.5 years ago [1], and the paper was published almost 3 years ago [2]. IMO "releases" means that it was released recently, but that's not the case. [1]…

      TiberiumView on HNParent context

    • Neither does GPT-4 or other sparse mixtures of experts, such as e.g. switch transformers [1]. [1] https://arxiv.org/abs/2101.03961

      DavidSJView on HNParent context

    • Several people hinted/remarked (starting w/ George Hotz, then others more closely linked to OpenAI) that it's a Mixture of Experts* approach comprised of 8 220B parameter models. * https://arxiv.org/pdf/2101.03961.pdf

      brandall10View on HNParent context

    • If it's similar to the switch transformer architecture [1], which I suspect it is, then the models are all trained on the same corpus and the routing model learns automatically which experts to route to. It's orthogonal to beam search - the benefit of the architecture is that it…

      radqView on HNParent context

  1. GPT-4 1 comment
    • My educated guess is that they use a MoE-style model similar to the Switch transformer[0], and combine a similar encoding as that of Kosmos-1[1] (with an “image” latch token, and a ViT-style transformer to process images). As a result, the parameter count is likely bigger, but…

      espadrineView on HNParent context

    • The size of the database, the training set, the details of the architecture, as well as results on benchmark tasks should all be considered in the comparison. I'm also a fan of Behavioral Testing [1]. Parameter count is not very accurate measure of model performance. Mixture of…

      jayalammarView on HNParent context

    • First, congratulations to you and the other authors - this is a very informative and accessible paper with impressive results. > On both datasets, we find that synthesis performance scales log-linearly with model size This "scaling law" observation is starting to become a major…

      criticaltinkerView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.