Emergent Mind

Efficient Large Scale Language Modeling with Mixtures of Experts

(2112.10684)
Published Dec 20, 2021 in cs.CL , cs.AI , and cs.LG

Abstract

Mixture of Experts layers (MoEs) enable efficient scaling of language models through conditional computation. This paper presents a detailed empirical study of how autoregressive MoE language models scale in comparison with dense models in a wide range of settings: in- and out-of-domain language modeling, zero- and few-shot priming, and full-shot fine-tuning. With the exception of fine-tuning, we find MoEs to be substantially more compute efficient. At more modest training budgets, MoEs can match the performance of dense models using $\sim$4 times less compute. This gap narrows at scale, but our largest MoE model (1.1T parameters) consistently outperforms a compute-equivalent dense model (6.7B parameters). Overall, this performance gap varies greatly across tasks and domains, suggesting that MoE and dense models generalize differently in ways that are worthy of future study. We make our code and models publicly available for research use.

Overview

  • Language models like BERT and GPT have progressed through the use of large datasets and increased parameters, raising computational and environmental concerns.

  • Mixture of Experts (MoEs) employs conditional computation for efficiency, activating a subset of parameters based on the input.

  • The study shows MoEs can perform as well or better than dense models while using less computational resources.

  • MoEs demonstrated a performance gain over dense models, but the advantage varies by the task and domain.

  • MoEs are a significant advance in efficient language modeling, yet the need for diverse strategies in model design remains.

Background on Language Models

Language models (LMs) such as BERT and GPT have been critical advancements in the field of natural language processing, achieving remarkable accuracy across various tasks. Their success has largely been attributed to the use of large-scale training datasets and an increase in the number of parameters, also known as "scaling up". However, this scaling up comes with significant computational costs and environmental concerns. Recently, attention has been turned towards more efficient model designs to address these concerns.

Mixture of Experts (MoEs): A More Efficient Approach

One promising area of research has been the development of a technique known as Mixture of Experts (MoEs), which utilize conditional computation to improve scaling efficiency. This means that for a given input, only a subset of the model's parameters are actually used for computation. The research team from Meta AI conducted a comprehensive study on how autoregressive MoE language models compare with their dense counterparts across a variety of domains and learning settings.

Experimental Insights

Through extensive empirical analysis, the researchers discovered that MoEs can, indeed, match or outperform the performance of dense models using significantly less computational resources. At modest training budgets, they found that MoE models could perform comparably to dense models requiring nearly four times more computation. Interestingly, while the performance advantage of MoEs narrows at greater scales, they continue to offer benefits, with the largest MoE model (1.1T parameters) consistently surpassing a dense model with an equivalent computational cost (6.7B parameters).

Varying Efficacy Across Tasks

The researchers observed that the performance gap between MoE and dense models varies not just with scale but also across different tasks and domains. This suggests that MoEs and dense models could potentially generalize in different yet complementary ways—highlighting an interesting avenue for future research. The study points out that while MoEs demonstrate clear efficiency advantages, the true extent of their effectiveness, particularly in domain-specific tasks, may need further exploration.

In conclusion, the findings from Meta AI suggest that MoEs represent a significant step towards more computationally efficient language modeling. While they offer clear benefits in terms of resource utilization, their varying performance across different tasks indicates that there may not be a one-size-fits-all solution for model design, and a combination of strategies might be necessary to achieve the best outcomes.

Subscribe by Email

Get summaries of trending comp sci papers delivered straight to your inbox:

Unsubscribe anytime.