mixtral_tiny
A decoder-only language model whose feedforward blocks are 8 experts, with a router picking two per token.
Language · 308 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Language
- Parameters
- 484.7K
- Operations
- 308
- Framework
- PyTorch
- Recurrent
- No
- Published
- 2024
- Paper
- Mixtral of Experts
- Cited by
- 4,828 (as of 19 November 2026)
- Authors
- Albert Qiaochu Jiang, Alexandre Sablayrolles, Antoine Roux and others
- Source
- transformers 5.18.0
- License
- Apache-2.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m5917
- Graph hash
- cd3b1a7cd8196c1b3616b1622aca9c3ff0253e004c99d1210e3f0d8d45b1daee
- Skeleton hash
- 23a807a7b77bd7e7eb67ea95562065069b134f09f161c96b53db396f1f163710
- Architecture hash
- 4e4ab67831a4796fdc2fa6927880d795feebb06bedaacadc794ab50d4a2fa2a0
- Diagram SHA-256
- 2d3384054ddcafaea77376c54b429cf545f0faa903de54c83d8481e25cdf60a7
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
How this diagram was made
transformers.MixtralForCausalLM()
What it is
Mixtral is a decoder-only language model in which the feedforward block of each layer is a set of 8 expert blocks, and only two of them process any given token. In every other respect it has the same architecture as Mistral 7B. The aim is to increase the number of parameters while controlling cost and latency, since the model uses only a fraction of its parameters for each token.
The routing is simple. A linear layer scores the experts for a token, a softmax is taken over the top-K scores, and the layer's output is the weighted sum of the outputs of the two selected experts. Each token is therefore routed to two SwiGLU sub-blocks with different weights. The paper compares this to GShard, noting that Mixtral replaces all feedforward sub-blocks with mixture-of-experts layers while GShard replaces every other block.
For the released Mixtral 8x7B, the paper reports that each token has access to 47B parameters but uses only 13B active parameters during inference, and that the model outperforms or matches Llama 2 70B and GPT-3.5 across the benchmarks it evaluated. When the authors looked at which experts the router chose, they did not observe obvious patterns based on topic. They did find that consecutive tokens are often assigned the same experts.
Key idea. The paper introduces a language model with the Mistral 7B architecture in which a router network sends each token to two of 8 feedforward experts at every layer.
- Mixtral
- Mixtral 8x7B
- Mistral/Mixtral
- Mixtral of Experts
- sparse mixture of experts
- SMoE
- mixture-of-experts language model
- text generation
- expert routing
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{jiang2024mixtralexperts,
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},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2401.04088},
}