[论文解读] Mixtral of Experts
Mixtral 8x7B 是一个稀疏专家混合语言模型,每层使用 8 个专家,每个标记选择 2 个,实现 47B 稀疏参数和 13B 活跃参数,在多数基准上优于 Llama 2 70B 与 GPT-3.5,并且存在一个指令调优版本,超过若干聊天模型。
We introduce Mixtral 8x7B, a Sparse Mixture of Experts (SMoE) language model. Mixtral has the same architecture as Mistral 7B, with the difference that each layer is composed of 8 feedforward blocks (i.e. experts). For every token, at each layer, a router network selects two experts to process the current state and combine their outputs. Even though each token only sees two experts, the selected experts can be different at each timestep. As a result, each token has access to 47B parameters, but only uses 13B active parameters during inference. Mixtral was trained with a context size of 32k tokens and it outperforms or matches Llama 2 70B and GPT-3.5 across all evaluated benchmarks. In particular, Mixtral vastly outperforms Llama 2 70B on mathematics, code generation, and multilingual benchmarks. We also provide a model fine-tuned to follow instructions, Mixtral 8x7B - Instruct, that surpasses GPT-3.5 Turbo, Claude-2.1, Gemini Pro, and Llama 2 70B - chat model on human benchmarks. Both the base and instruct models are released under the Apache 2.0 license.
研究动机与目标
- 推动开发开放、性能出色的开放权重 SMoE 语言模型。
- 提出 Mixtral 8x7B 作为一个开放的、多语言、长上下文解码器端的 SMoE,具备高效推理。
- 展示每个标记计算保持在较小规模(K=2,活跃参数 = 13B),而总参数量仍然较大(47B)。
- 展示 Mixtral 在数学、代码、多语言任务以及指令遵循场景中达到最新的或具竞争力的结果。
提出的方法
- 描述 Mixtral 8x7B 架构:32 层,MoE 层有 8 位专家,每个标记通过路由器选择两个专家。
- 解释门控:Softmax(TopK(x · W_g)),K=2 以按标记选择专家。
- 用 MoE 块替代 FFN 块;将 SwiGLU 作为专家函数。
- 上下文长度扩展到 32768 标记;开源权重在 Apache 2.0 下发布。
- 提供多语言数据和上下文窗口的训练细节,以及一个指令调优版本 Mixtral 8x7B – Instruct。
- 概述部署注意事项:Megablocks 内核、vLLM 集成,以及 EP 负载均衡考量。

实验结果
研究问题
- RQ1Mixtral 8x7B 是否能够在标准基准上达到或超过更大密集模型(如 Llama 2 70B)的性能?
- RQ2在使用固定的每标记活跃参数预算时,稀疏混合专家的效率和可扩展性优势是什么?
- RQ3指令调优(Mixtral Instruct)是否相对于开放权重同类模型带来更优的人工评估表现?
- RQ4Mixtral 在长上下文任务和多语言基准上的表现如何?
- RQ5与同类开源模型相比,Mixtral 的偏见与安全特性如何?
主要发现
- Mixtral 8x7B 在大多数基准上胜过或匹配 Llama 2 70B,尤其是在数学与代码生成方面。
- 每标记活跃参数为 13B,总稀疏参数量为 47B。
- Mixtral–Instruct 在人类基准上超越 GPT-3.5 Turbo、Claude-2.1、Gemini Pro 及 Llama 2 70B–chat。
- 在法语、德语、西班牙语和意大利语方面显著高于 Llama 2 70B 的多语言增益。
- 长上下文测试在不同上下文长度下显示 100% 的密钥检索通过率;随着上下文增大,困惑度有所改善。
- Mixtral 在 BBQ/BOLD 基准中相对于 Llama 2 70B 的偏见较低且情感更正向。

更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。