Mixtral of Experts

Albert Q. Jiang, Alexandre Sablayrolles, Antoine Roux, Arthur Mensch, Blanche Savary, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Emma Bou Hanna, Florian Bressand, et al.

2024 · arXiv

Mixtral of Experts

Problem

Framing

Dense decoder LMs trade quality for inference cost: matching 70B-class performance usually requires activating 70B-class parameters on every token. Mixtral closes this gap with top-2 sparse MoE feedforward blocks, giving each token access to 47B parameters while activating only 13B, and still reaching 70.6% MMLU plus 58.4% GSM8K.

Currently Used Methods

Foundational

Proposed Method

Architecture

Mixtral keeps the Mistral decoder stack and replaces every FFN with an 8-expert MoE layer. The model uses 32 layers, d=4096d=4096, hidden size 1433614336, 32 attention heads, 8 KV heads, and context length 3276832768. Each token is routed to 2 experts, so compute stays near a 13B dense model while total parameters rise to 47B.

Mixture-of-experts layer: a router sends each token to two of eight feedforward experts, then sums the weighted expert outputs.

Loss / Objective

The MoE block replaces the dense FFN with sparse gated expert aggregation:

y=i=0n1Softmax(Top2(xWg))iSwiGLUi(x)\mathbf{y} = \sum_{i=0}^{n-1} \operatorname{Softmax}(\operatorname{Top2}(\mathbf{x} W_g))_i \cdot \operatorname{SwiGLU}_i(\mathbf{x})

Sampling Rule / Algorithm

Autoregressive decoding uses the standard next-token factorization over the sparse decoder:

pθ(x1:T)=t=1Tpθ(xtx<t)p_\theta(\mathbf{x}_{1:T}) = \prod_{t=1}^{T} p_\theta(x_t \mid \mathbf{x}_{<t})

Training Procedure

Evaluation

Datasets

Metrics

Headline results

Table 1: Comparison of Mixtral with Llama 2 70B and GPT-3.5

BenchmarkLlama 2 70BGPT-3.5Mixtral 8x7B
MMLU (MCQ in 57 subjects)69.9%70.0%70.6%
HellaSwag (10-shot)87.1%85.5%86.7%
ARC Challenge (25-shot)85.1%85.2%85.8%
WinoGrande (5-shot)83.2%81.6%81.2%
MBPP (pass@1)49.8%52.2%60.7%
GSM-8K (5-shot)53.6%57.1%58.4%
MT Bench (for Instruct Models)6.868.328.30

Evaluation page showing Table 3 against Llama 2 70B and GPT-3.5, plus multilingual Table 4 and long-context discussion.

Ablations

Method Strengths and Weaknesses

Strengths

Weaknesses

Suggestions from the authors

Links

Prior Papers

Further Papers