Mixtral of Experts

Mixtral of Experts

蒋启天 Albert Q. Jiang · Mistral AI · 2024-01-08 · arXiv:2401.04088 ↗ · 被引 1967

打开互动全文版(逐段中英对照 + 图/公式 + 论文问答)→

摘要 · Abstract

我们介绍了 Mixtral 8x7B,一种稀疏混合专家(SMoE)语言模型。Mixtral 与 Mistral 7B 具有相同的架构,不同之处在于每一层由 8 个前馈块(即专家)组成。对于每个 token,在每一层,一个路由网络选择两个专家来处理当前状态并组合它们的输出。尽管每个 token 只看到两个专家,但所选专家在每个时间步可以不同。因此,每个 token 可以访问 47B 参数,但在推理过程中仅使用 13B 活跃参数。Mixtral 使用 32k token 的上下文大小进行训练,在所有评估的基准测试中均优于或匹配 Llama 2 70B 和 GPT-3.5。特别是,Mixtral 在数学、代码生成和多语言基准测试上大幅超越 Llama 2 70B。我们还提供了一个经过微调以遵循指令的模型 Mixtral 8x7B-Instruct,它在人类基准测试上超越了 GPT-3.5 Turbo、Claude-2.1、Gemini Pro 和 Llama 2 70B 聊天模型。基础模型和指令模型均在 Apache 2.0 许可下发布。

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.

核心贡献 · Key contributions

局限 · Limitations

论文章节 · Sections(共 12)

阅读逐段中英对照全文 →