Mixtral of Experts
- Publication
- Publication venue not yet verified
- First submitted to arXiv
- arXiv:2401.04088
Cite this paper · BibTeX
The citation identifies the linked source version. It cites the original paper and its authors.
@misc{transformersmixtral2024,
title = {{Mixtral of Experts}},
author = {Albert Q. Jiang and Alexandre Sablayrolles and Antoine Roux and Arthur Mensch and Blanche Savary and Chris Bamford and Devendra Singh Chaplot and Diego de las Casas and Emma Bou Hanna and Florian Bressand and Gianna Lengyel and Guillaume Bour and Guillaume Lample and Lélio Renard Lavaud and Lucile Saulnier and Marie-Anne Lachaux and Pierre Stock and Sandeep Subramanian and Sophia Yang and Szymon Antoniak and Teven Le Scao and Théophile Gervet and Thibaut Lavril and Thomas Wang and Timothée Lacroix and William El Sayed},
year = {2024},
eprint = {2401.04088},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2401.04088}
}
In late 2023, Mistral released the weights for Mixtral 8×7B under the Apache 2.0 license, which permits commercial use and modification. Its most eye-catching launch announcement said it beat Llama 2 70B on most tests while running six times faster. Those numbers make it tempting to put the model into a service immediately. But if you are paying the GPU bill, you will probably ask first what, exactly, it saves.
The industry responded quickly. AWS added it to SageMaker JumpStart in December 2023, then to Bedrock the following March. IBM added it to watsonx. These announcements show that platforms were willing to support the model. They tell us neither how many companies actually put it into production nor how fast it runs on a particular machine.
Set the marketing numbers aside for a moment. Mixtral's idea is to keep eight selectable feed-forward networks ready, but have each token use only two of them at each layer. A token is a small piece of text after tokenization; the paper calls these feed-forward networks “experts.” Nobody assigned the experts to mathematics, programming, or literature in advance. Let us follow one token through the model, then return to the paper's figures to see what they actually say about “six times faster.”
Defining the problem
First, picture a token and a model layer
A model does not calculate over an entire piece of text as one indivisible object. It splits text into tokens and turns each token into a vector, a sequence of numbers. A token need not equal one character or one word. To make the route easy to follow, suppose for now that the calendar note “Tomorrow afternoon: meeting” becomes three tokens: “tomorrow / afternoon / meeting”. This is not a claim about how Mixtral's actual tokenizer splits the note.
Consider the token “meeting”. As it enters a layer, attention can use information from earlier tokens, so its numeric representation carries the context of “tomorrow” and “afternoon.” That representation then goes to a feed-forward network, or FFN, for another transformation. For now, remember this path:
numeric representation of a token → attention reads earlier context → FFN processes that token → next layer
The path locates Mixtral's change. A full Transformer block also has normalization and residual connections. The FFN is not looking up a word in a dictionary or directly choosing the next word; it turns one vector into another. Only after later layers does the model produce a prediction for the next token.
A conventional dense model has one FFN in each layer. Whatever token it processes, that layer uses the same FFN weights. One straightforward way to give this part more parameters is to enlarge the FFN. The cost is that every token must run the enlarged computation.
Could we prepare several FFNs but let the current token use only some of them? That is the question a Sparse Mixture of Experts, or SMoE, addresses. Here “sparse” means only some experts are active each time. This sparsity applies to expert activation; the input sequence and other Transformer operations remain, and the complete weights require storage.
The Switch Transformer we read earlier selects one expert per token; Mixtral selects two at each layer. The paper does not compare the two under otherwise identical training conditions, so we cannot attribute a particular gain to choosing two rather than one.
The problem is now concrete. How does one token select two experts and return their results to the Transformer? Even if we calculate with only two, the weights for all eight must live somewhere. And will saving computation actually make a deployed service faster?
Solving the problem
Where do the eight experts go?
Mixtral is still a decoder-only Transformer that generates text step by step, using what has already appeared to predict the next token. Table 1 lists 32 layers, a model dimension of 4096, and dense attention over a context of up to 32,768 tokens. For now, hold on to the fact that there are 32 successive layers and that each token passes a vector of 4096 numbers between them. The 4096 is the number of values in the vector, not 4096 characters or 4096 experts.
At every layer, attention still handles the relation between a token and its preceding context. Mixtral replaces the FFN position after attention, swapping the single FFN for eight FFNs with separate weights. These are the paper's experts. Each does not have a complete attention mechanism of its own; they are not eight independent chatbots.
Look at Figure 1 of the original paper and follow only the solid black lines first. On the left, the router receives an input and chooses two paths, sending the same vector to two experts; on the right, the circle adds their outputs. The pale experts are still part of the model, but they do not perform FFN computation for this token. The dotted lines are not two additional experts. They show the mixture weights the router gives the selected paths. This figure depicts one MoE layer, not eight complete models taking turns answering, and it leaves out the Transformer attention around it.
Follow “meeting” through one layer
Return to “meeting”. Suppose it has already attended to the earlier context and now reaches the FFN position of a layer with vector . In the real Mixtral, has 4096 values. We do not need to write them out; the point is that the router and the experts receive the same .
The router first calculates a score for each of the eight experts. Following the paper's , we can treat as a 4096-element vector and the routing weights as a matrix. Multiplication produces eight scores. It does not label the sentence with a human category such as “work” or “math.” Suppose expert scores highest at 1.2 and comes second at 0.9, with the other six below 0.9. These numbers are a teaching example, not measurements from the paper for “meeting”.
First take the top two, and . The other six need not perform their FFN calculations this time. An easily missed second step converts the two scores into mixture weights. The paper's TopK sets the six unselected scores to negative infinity; only then does softmax give those experts zero weight and make the selected weights sum to 1. The higher-scoring expert gets a larger share, but not the entire result.
For scores of 1.2 and 0.9, the weights are about 0.574 and 0.426, or 57.4% and 42.6%. Here is the calculation:
Here is the base of the exponential function. Each numerator belongs to one expert; the denominator adds both, so the two results sum to 1. The 57.4% is not “the probability that the answer is correct” or “how much this sentence belongs to 's subject.” It only determines how to combine the two expert outputs.
What does an expert do with its input?
Each selected expert turns into a new vector. Mixtral's experts are SwiGLU feed-forward networks; Table 1 gives an internal hidden dimension of 14,336. For an initial picture, the FFN temporarily expands the 4096-dimensional representation, applies a gated transformation, and contracts it back to 4096 dimensions so it can rejoin the Transformer's main path. The two experts have the same computational form but different weights, so the same can produce different outputs.
There is another “gate” that can cause confusion. The router chooses which two complete FFNs work; gating inside SwiGLU controls how one FFN transforms its numbers. One chooses between experts; the other operates within an expert.
Finally, the model adds the two outputs using the weights above:
If 4096 dimensions still feel abstract, look at only two positions for a moment. Suppose yields there and yields . Their combination is . This too is a teaching example, not Mixtral's actual output. Each expert produces a whole vector, and the model adds corresponding positions with weights. The experts are not writing separate answers and voting on them.
After obtaining , the token continues through the block and subsequent layers. Its representation has changed by the next layer, so that layer's router scores it again; another token in the same sentence may select different experts. In other words, “meeting” is not tied to and from the first layer to the last. “Two experts per token per layer” means a fresh routing decision at each layer.
During training, the router's and experts' weights are learned. During inference, when the model actually answers a question, it selects two according to the token's current representation. People did not label “the meeting expert,” and one routing decision cannot tell us what it specializes in.
Why does 8×7B mean only 47B parameters?
The name invites us to multiply eight complete 7B models and arrive at 56B. That counts the shared parts repeatedly. Attention and other Mixtral components are shared by all tokens; the main addition is the multiple sets of FFN weights at each layer. The paper reports about 47B total parameters and about 13B active parameters per token. B means billion: we are counting learned numbers, not file bytes.
Keep “total” and “active” separate. Imagine a workbench stocked with eight toolkits, of which you use only two for the current job. The unused tools do not participate in that step, but you still need to store them somewhere. Mixtral does not compute with every expert for every token, yet a service must hold or distribute the complete roughly 47B weights. “13B active” describes per-token computation; memory must accommodate the complete weights.
Nor can you turn 13B straight into latency. The model still runs attention, calculates routing, moves tokens, and computes with both selected experts. If experts live on different GPUs, tokens must travel to the corresponding devices and results must return. If many tokens crowd into one expert, they may have to wait. Sections 2.1 and 3 therefore separate computation per token, memory for all weights, and hardware utilization. Fewer active parameters offer an opportunity to save computation, not a measured guarantee of a fivefold speedup.
Discussion
Scores improved—but what are those scores?
Now that we understand the architecture, we can ask whether keeping eight expert networks improves results. The authors reran Mixtral, Mistral 7B, and Llama 2 70B through their evaluation pipeline. Start with four tasks. These are numbers from the original paper's Table 2; we have not rerun them here.
| Task | What it asks | Mistral 7B | Mixtral 8×7B | Llama 2 70B |
|---|---|---|---|---|
| MMLU | Multiple-choice questions across subjects | 62.5% | 70.6% | 69.9% |
| HumanEval | Generate code and test whether it passes | 26.2% | 40.2% | 29.3% |
| MATH | Solve mathematics problems | 12.7% | 28.4% | 13.8% |
| HellaSwag | Choose a plausible continuation of a situation | 81.0% | 84.4% | 85.4% |
Excerpt from the original paper's Table 2. MMLU uses 5-shot; HumanEval, 0-shot; MATH, 4-shot with maj@4; HellaSwag appears in the table's 0-shot category.
If “shot” is new to you, it is the number of worked examples shown before the question. 0-shot gives none, and 5-shot gives five. MATH's maj@4 takes the majority answer from four attempts. These settings affect the scores. Although every row uses percentages, do not compare different rows to claim the model is better at math than code. Compare models within a row.
On MMLU, Mixtral's 70.6% is slightly above Llama 2 70B's 69.9%, a difference of 0.7 percentage points. The HumanEval and MATH gaps are larger: 40.2% versus 29.3%, and 28.4% versus 13.8%. On HellaSwag, Llama 2 70B instead leads 85.4% to 84.4%. Across these four rows, Mixtral is competitive on several tasks, but it does not win every kind of question.
Figure 3 of the paper turns six task groups into six small plots. Find the legend at bottom right first, where orange squares mark the Mistral family and red circles the Llama family. Then read the horizontal axis, which shows the number of parameters active per token. The vertical axis shows task scores. Orange Mixtral sits around 13B, red Llama 2 70B at 70B. The authors use “how many parameters are computed in one step” as an efficiency proxy, not the total parameters stored by the model.
Compare the heights of two points within one plot. In Math and Code, 13B-active Mixtral scores above 70B-active Llama 2; in Reading Comprehension, the order reverses. The six plots use different vertical ranges, so their slopes cannot be compared directly. Nor does a line connecting models in one family show what would happen if only parameter count changed. Figure 3 supports a comparison of scores and active parameters for these models on these tasks. Tokens per second and GPU memory require separate measurements.
To estimate the storage for weights alone, 47B parameters at two bytes each in bf16 come to roughly 94 GB, before generation caches and other runtime space. Section 3 explicitly says the Figure 3 efficiency analysis excludes memory costs and hardware utilization; routing and loading expert weights add overhead. The launch claim of “six times faster” does not follow from Figure 3 alone.
Is the score improvement, then, solely due to replacing an FFN with a two-of-eight expert choice? This comparison cannot isolate that effect. Training data, model scale, and other settings were not held fixed except for routing. Even with the same evaluation pipeline, this is a comparison between models, not a controlled ablation of one change. The paper also provides instruction-tuned Mixtral Instruct; its chat evaluations cannot stand in for an architecture ablation of the base model.
Did the eight experts really choose subjects?
Try a different question. If the router always sent mathematics problems to one expert and philosophy essays to another, could we say they divided the work by subject? The authors asked a similar question. In Figure 7, the three rows represent layers 0, 15, and 31. Expert IDs 0 through 7 run along the horizontal axis; the vertical axis is the fraction of tokens from a domain assigned to an expert. The gray dashed line marks the uniform rate of per expert. Eight colors beside each expert represent eight text domains. Either first- or second-choice selection counts in the plot.
Now hold one expert ID fixed and compare the colored bars. The distributions for ArXiv papers, PubMed abstracts, and philosophy documents look similar. There is no clear “one domain always goes to one expert.” At layer 31, the mathematics data differs somewhat—for example, yellow bars for experts 0 and 2 are higher. The authors caution that this dataset is relatively synthetic and has limited natural-language variety. The figure counts how often an expert is selected, not that expert's accuracy on math questions.
The authors also checked whether adjacent tokens take similar routes. Table 5 has two groups of columns. The left asks whether the next token has the same first-choice expert; the right asks whether its two selected experts have at least one in common with the current token's pair. Do not merge the percentages. For ArXiv text, the left-hand value at layer 0 is 14.0%, near the random baseline of ; it rises to 27.9% at layer 15 and is 22.7% at layer 31. The right-hand value at layer 15 is 62.3%, against a random baseline of about 46%. Adjacent tokens at deeper layers do route together more often. That still does not give each expert a fixed subject. The colored-token examples in Figure 8 suggest local patterns of syntax and text form as well.
These observations also bear on deployment. If many nearby tokens go to the same expert, the GPU holding it could get more work. Repeated use of an expert might also help caching. These are engineering possibilities inferred from the routing distribution; Table 5 alone cannot tell us the speed on a particular machine.
What does a 32K context mean?
The paper says the model supports a context of 32,768 tokens. It can therefore process a long sequence in one input. Fitting it into the context and doing every long-document task well remain different claims. The left half of Figure 4 shows a synthetic passkey test, which hides a specified piece of information at different positions in a long text and then asks the model to retrieve it. Accuracy is 100% at the tested lengths and positions. The right half measures perplexity on a subset of Proof-Pile text. As the model can read more preceding context, its next-token perplexity falls; lower perplexity means it assigns higher confidence to its next-token predictions on that material. Neither half directly tests whether it can synthesize an entire long report.
The result is clear, but it only tests retrieval of a specified item. To decide whether a model can summarize a report or track several contradictory passages, we need tests for those jobs. Separate “the length it can accept,” “whether it can find a passage,” and “whether it understands the whole document” so one impressive number does not answer three different questions.
Conclusion
Return to the “six times faster” launch poster. Mixtral really does keep eight expert networks at every layer's FFN position, select two from the current token representation, and so activate about 13B of its roughly 47B total parameters each time. Table 2 and Figure 3 show competitive scores with fewer active parameters on several evaluations of the time. That helps explain the rapid arrival on cloud model platforms. Scores and active-parameter counts, however, do not calculate latency or a service bill.
By October 2026, the picture is fuller. On the positive side, the open weights can still be self-hosted; AWS Bedrock lists Mixtral Instruct as Active, and MLPerf Inference continues to use it as a systems benchmark workload. Later DeepSeek-V3 and Qwen3 include MoE models, showing continued interest in sparse activation. MoE research predates Mixtral; these later models should not all be credited to this paper.
The other side is the model's own life cycle. Mistral lists Mixtral 8×7B as retired in March 2025 and recommends Mistral Small 4 for new integrations. Open weights and third-party services may persist, but a leading benchmark in 2023 is not today's model-selection verdict. Deployment still requires the full set of weights and must contend with routing, transfers between devices, and uneven loads; Figure 3 measures none of those. Long context also calls for task-specific checks: in the later RULER evaluation, base Mixtral does well on a simple retrieval task at 32K but scores only 41.3% on an information-aggregation task at the same length. That is a synthetic benchmark, enough to prompt testing on your own documents, not a success rate for all long-document work.
If you want to put Mixtral into a product today, test answer quality, memory, latency, and throughput on your own tasks, languages, and hardware alongside newer models. The paper teaches us how to activate parameters selectively. The most appealing speed slogan from its launch still needs to be checked against a real service workload.