Mixture of Experts (MoE) - More Parameters, Same Compute

· Source: DataMListic · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Emerging Technologies & Innovation · Depth: Intermediate, quick

Summary

Mixture of Experts (MoE) is an architectural approach exemplified by models like Mixtral, which possesses 47 billion parameters but utilizes only about 13 billion for each word generation, leaving 34 billion inactive per token. This design replaces a single, large feed-forward network with a committee of smaller, specialized networks, each handling specific input types. A "router" component, a small matrix WG followed by a softmax, determines which experts process an input vector X. In practice, only the top one or two most relevant experts are selected, enabling "conditional computation" where only the chosen experts are executed. This mechanism allows the total parameter count to be vast for capacity, while per-token compute remains low because only a fraction of experts are activated, specializing in different input types like common words, code, or scientific terms.

Key takeaway

For AI Architects designing large language models, understanding Mixture of Experts is crucial for managing inference costs. If you aim to scale model capacity significantly without proportionally increasing per-token compute, you should consider MoE architectures. This approach allows you to deploy models with vast parameter counts, like Mixtral's 47 billion, while keeping operational expenses manageable by only activating a fraction of experts per token.

Key insights

Mixture of Experts scales model capacity by having many specialized networks, but keeps per-token compute low by activating only a few.

Principles

Method

A router multiplies input vector X by matrix WG, applies softmax, and selects top K experts. Outputs are combined via Y = sum(G(X_i) * E_i(X)), where G(X_i) is the gate weight and E_i(X) is the expert's computation.

In practice

Topics

Best for: AI Scientist, Machine Learning Engineer, AI Architect

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by DataMListic.