GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
arXiv preprint

Mixtral of Experts

Mistral's open sparse model: 8 experts per layer, 2 used per token, 47B parameters stored but 13B active. It matched or beat Llama 2 70B on most benchmarks, released under Apache 2.0.

Breakdown by FDE Interviews · 12 min read · Updated

About the original · 2024
AUTHORS
Jiang, Sablayrolles, Roux, Mensch, et al.
FROM
Mistral AI
PUBLISHED
Jan 2024 · arXiv preprint
CITED BY
2,291Semantic Scholar · Nov 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 20% of this breakdown.

01

The paper in one minute

Mixtral 8x7B is Mistral 7B with one change: every feed-forward block becomes a mixture of eight experts. Each expert is a SwiGLU block of the same shape as Mistral 7B's, and a small router, a linear layer over the token's hidden state, scores all eight, keeps the top two, softmaxes those two scores and sums the two experts' outputs with those weights. Attention is untouched and shared across experts, so the name "8x7B" overstates the size: the model holds about 47 billion parameters, not 56.

The distinction the paper makes explicit is between total (sparse) parameters, which grow with the number of experts and set the memory bill, and active parameters, which grow with the number used per token and set the compute bill. Mixtral uses about 13 billion per token.

On Mistral's re-run of standard benchmarks, Mixtral beat or matched Llama 2 70B on most tasks, with large leads in code and math, and beat it on French, German, Spanish and Italian versions of ARC, HellaSwag and MMLU. It found a passkey anywhere in a 32k-token context every time. An instruct version trained with supervised fine-tuning and DPO scored 8.30 on MT-Bench and ranked above GPT-3.5 Turbo, Claude 2.1 and Gemini Pro on the LMSys arena in December 2023. Both models were released under Apache 2.0.

The routing analysis is the surprise. Experts did not specialize by subject: arXiv papers, biology abstracts and philosophy were routed almost identically. Routing followed syntax instead, and consecutive tokens often went to the same experts.

THE IDEA, VISUALLY
ONE MIXTRAL LAYER (TABLE 1, SECTION 2.1) attention: 32 query heads, 8 KV heads (shared) 41.9M params per layer router: softmax over top 2 of x · W_g E1 SwiGLU E2 SwiGLU E3 SwiGLU E4 SwiGLU E5 SwiGLU E6 SwiGLU E7 SwiGLU E8 SwiGLU each expert 176M params per layer; 2 of 8 run for each token WHERE THE PARAMETERS ARE experts 97% rest 3% 47B stored (memory) 13B active (compute) experts do not specialize by topic; routing follows syntax, and consecutive tokens often share experts SERVING VS LLAMA 2 70B, 16-BIT Mixtral Llama 2 70B weights, GiB 87 130 GFLOPs per token 26 140 KV cache, KiB/token 128 320 TABLE 2: MIXTRAL MINUS LLAMA 2 70B, POINTS MATH +14.6 HumanEval +10.9 MBPP +10.9 NQ +5.2 GSM8K +4.8 ARC-e +3.2 ARC-c +3.2 PIQA +1.0 MMLU +0.7 HellaSwag -1.0 TriviaQA -1.5 WinoGrande -3.2 captions say 'all' (Figure 2) and 'almost all' (Table 2) arXiv 2401.04088, Mistral AI, January 2024, Apache 2.0
Every feed-forward block in Mixtral is eight SwiGLU experts, and a router sends each token to two of them. The model stores about 47B parameters but uses about 13B per token, so it costs roughly a 13B model to run and a 47B model to hold, with a KV cache as small as Mistral 7B's.
Research notes: the problem, approach and results
47B / 13B

total parameters stored against active parameters used per token (Section 3)

70.6%

MMLU, against 69.9% for Llama 2 70B with about 5x fewer active parameters (Table 2)

8.30

MT-Bench score of Mixtral 8x7B Instruct, against 8.32 for GPT-3.5 Turbo (Table 3)

THE PROBLEM

Open models that matched GPT-3.5 needed about 70B dense parameters, which are expensive to run for every token. Sparse mixture-of-experts models could cut that compute, but no strong open-weight MoE model with a permissive license existed.

THE IDEA

Take the Mistral 7B decoder (32 layers, grouped-query attention, 32k context) and replace every feed-forward block with 8 SwiGLU experts and a router that picks the top 2 per token, weighting them by a softmax over the two scores. Fine-tune an instruct version with supervised fine-tuning and DPO, and release both under Apache 2.0.

THE RESULT

With 13B active parameters, Mixtral matched or beat Llama 2 70B on most of 12 benchmarks, with large gains in code (HumanEval 40.2% vs 29.3%) and math, and beat it in French, German, Spanish and Italian. Mixtral Instruct scored 8.30 on MT-Bench. Routing showed no topic specialization.

02

Why it matters to an FDE

Mixtral is the model that put mixture-of-experts into ordinary deployments, and it is a clean case study in what MoE changes for whoever runs it.

Budget memory and compute separately. Mixtral costs about as much compute per token as a 13B dense model but needs memory for 47B parameters: about 87 GiB at 16 bits, which means two 80 GB GPUs or quantization. Its KV cache is small (it keeps Mistral 7B's attention), so long contexts are cheaper than for Llama 2 70B. A customer who sizes hardware by "it is like a 13B model" will run out of memory.

The license removes a blocker. Apache 2.0 weights are usable commercially without the custom terms of other open models, which often matters more to a customer's legal team than a benchmark point.

MoE wants batches. The authors note that routing adds overhead and that MoE models suit batched workloads. At a single request at a time, the GPU loads two experts' weights per layer per token and works well below its peak; at higher concurrency, more of each expert's weights are reused per load.

Experts are not topic specialists. Don't plan to prune experts by domain or route a customer's legal documents to a "legal expert". The paper finds no such structure.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 290 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦2 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    The routing formula, parameter accounting, where it wins and loses, locality, and two misreadings

    Free account
  2. 04How it works

    The router, the expert block, the shape in Table 1, and how serving engines run it

    Premium
  3. 05The numbers that matter

    Benchmarks against Llama 2, comparison with GPT-3.5, multilingual and long-context results, routing

    Premium
  4. 06Try it yourself

    Rebuild the 47B and 13B counts, compare serving needs, audit Table 2, and simulate locality

    Premium
  5. 07Where it breaks

    Memory cost, small-batch efficiency, missing training details, evaluation choices and slips

    Premium
  6. 08Using it on a deployment

    Fitting Mixtral on GPUs, batching for MoE efficiency, and why not to prune experts

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →