AI GLOSSARY · AI CONCEPTS
Mixture of experts (MoE)
Definition
In sparse transformer mixtures of experts (MoE), a learned router sends each token to a few expert sub-networks. Only selected experts compute for that token, so active parameters are fewer than total parameters.
Also called: MoE, MoE model, MoE models, mixture of experts model, mixture-of-experts.
In plain language
A sparse transformer mixture-of-experts model is built like a large office with many specialists and a receptionist. The specialists are small sub-networks called experts, and the receptionist, called a router, decides which few of them handle each small piece of text. Because only some experts work on each piece, the model can hold a lot of learned knowledge while doing less computing per word than a dense model, one that uses all of its parts every time. The catch is the total weight size. In the resident-weight setup described by Hugging Face, all experts occupy memory even though only some compute per token. That does not mean they must all occupy GPU memory: llama.cpp documents CPU expert placement and a GPU cache. Budget storage for all weights, then check the runtime's RAM, GPU and cache placement.
Technical definition
In the sparse mixture-of-experts transformers discussed here, some dense feed-forward layers are replaced by sparse MoE layers. Each contains several expert networks and a learned router, or gate network, that scores the experts for each token and sends the token to a small subset. Only the selected experts compute for that token, so the parameters used per token are fewer than the total. The Switch Transformer paper (Fedus, Zoph and Shazeer, arXiv 2101.03961, January 2021) describes such sparsely activated models and simplified routing to reduce communication and computation cost. The Hugging Face overview discusses resident-weight memory costs and historical fine-tuning difficulties. Load-balancing losses discourage routing collapse onto a few experts; its separate router z-loss discussion concerns numerical training stability.
Worked examples in this catalogue
Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.
Skill by Skill Almanac · Illustrative, not executed
local-model-sizing 57/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- A calculation of whether an open-weight language model will run on a given GPU, Mac or PC, using a script that computes the memory the weights need.
- Why it exercises the concept
- The skill distinguishes total weights from active parameters and estimates memory, including partial offload. These are planning estimates; check actual expert placement and load logs in your runtime.
Guide · Illustrative, not executed
Self-Hosting an AI Agent: What You Take On
- What you see
- A guide to what you take on when an agent runs on your machine, including matching the model to your hardware and checking that it fits.
- Why it exercises the concept
- Running an open-weight MoE model makes hardware planning concrete: total weights determine storage, while runtime placement determines RAM and GPU residency.
Skill by Skill Almanac · Illustrative, not executed
llm-cost-estimator 56/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What to try
Give the skill a usage profile (requests per day, input and output tokens) and your own price table.- What you see
- A monthly cost range per model, with the effect of prompt caching and batch pricing shown as separate lines.
- Why it exercises the concept
- For token-priced hosted usage, the estimate uses token counts and the supplied price list. Entering a price table lets you compare models on that basis rather than on architecture claims.
How it shows up when you use agents
Most of the time you meet MoE as a line in a model card or a vendor's description, not as a setting. Hosted services may expose it only through a model card; pricing depends on the provider and plan. It becomes your problem when you run an open-weight model yourself, for example behind a local coding agent. Only selected experts compute per token, but active parameter counts alone do not size the full weight storage or the runtime's memory placement.
What breaks when this is misunderstood: you read that only part of the model runs per token, assume a small memory need, download the model and find it does not fit or swaps to disk. The Hugging Face blog describes a resident-weight setup with all experts in memory. Runtimes with CPU placement or caching divide that cost differently. Check full weight storage and the intended memory placement before downloading, using local-model-sizing or the guide on self-hosting. The same blog notes that MoE models have historically struggled with overfitting during fine-tuning, so plan extra testing if you intend to adapt one.
Next action: when comparing models, record both the total size and the vendor's active-per-token figure, and check the total weight footprint plus the runtime's host/device placement. See Self-hosted LLM and Transformer.
Common confusions
- Total versus active parameters. Total counts every expert; active counts only those used for a given token.
- Experts versus topics. You do not pick an expert. The router is a learned component trained together with the rest of the model (Hugging Face blog), and a token can go to more than one expert.
- One model versus many models. An MoE is a single model whose layers contain several experts, not several separate models you call in turn.
- Myth. "Fewer active parameters means a smaller download." The full model includes all expert weights, so active parameters do not determine download size. GPU residency depends on placement and caching.
Related terms
Terms that mention Mixture of experts (MoE)
4 terms mention this one
More in AI concepts
Sources
- Mixture of Experts Explained, Hugging Face (accessed 2026-11-23)
- Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity, arXiv (Fedus, Zoph and Shazeer) (accessed 2026-11-23)
- llama.cpp server: common parameters for MoE CPU placement and GPU caching, ggml-org/llama.cpp (accessed 2026-11-25)
Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-25. Wikipedia is never the only source.
Review record
Last verified
Drafted by claude-sonnet-5-5; OpenAI Codex bounded factual repairs; sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-25. Last verified .
Change log (5)
- : Independent automated factual/example review completed. Cached US query estimate aligned to receipt; no traffic promise. Final technical gate recorded separately; publication disabled.
- : First version.
- : Verifier pass: Used memory wording per blog, dropped speed claim and 'usually feed-forward'.
- : Bounded source repairs: Scoped sparse transformer routing, resident versus active weights and hosted pricing; separated load balancing from router z-loss. Pending independent re-review.
- : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.