
摘要
我们介绍了一种名为Mixtral 8x7B的稀疏专家混合(Sparse Mixture of Experts, SMoE)语言模型。Mixtral采用了与Mistral 7B相同的架构,不同之处在于每一层由8个前馈块(即专家)组成。对于每个标记,在每一层上,路由网络会选择两个专家来处理当前状态并合并其输出。尽管每个标记仅能看到两个专家,但所选专家在每个时间步可以不同。因此,每个标记可以访问470亿参数,但在推理过程中仅使用130亿活跃参数。Mixtral在训练时使用了32,000个标记的上下文大小,并且在所有评估基准上均超过了或匹配了Llama 2 700亿和GPT-3.5的表现。特别是在数学、代码生成和多语言基准测试中,Mixtral大幅超越了Llama 2 700亿。此外,我们还提供了一个经过微调以遵循指令的模型——Mixtral 8x7B - Instruct,在人类基准测试中超越了GPT-3.5 Turbo、Claude-2.1、Gemini Pro以及Llama 2 700亿 - 聊天模型。基础模型和指令模型均在Apache 2.0许可下发布。
代码仓库
consequentai/fneval
GitHub 中提及
pwc-1/Paper-9/tree/main/2/mixtral
mindspore
jingyaogong/minimind
pytorch
GitHub 中提及
ymcui/chinese-mixtral
pytorch
GitHub 中提及
kamanphoebe/look-into-moes
pytorch
GitHub 中提及
hit-scir/chinese-mixtral-8x7b
pytorch
GitHub 中提及
基准测试
| 基准 | 方法 | 指标 |
|---|---|---|
| code-generation-on-mbpp | Mixtral 8x7B (3-shot) | Accuracy: 60.7 |
| common-sense-reasoning-on-arc-easy | Mistral 7B (0-shot) | Accuracy: 80.5 |
| common-sense-reasoning-on-arc-easy | Mixtral 8x7B (0-shot) | Accuracy: 83.1 |
| common-sense-reasoning-on-winogrande | Mistral 7B (0-shot) | Accuracy: 74.2 |
| common-sense-reasoning-on-winogrande | Mixtral 8x7B (0-shot) | Accuracy: 77.2 |
| math-word-problem-solving-on-math | Mixtral 8x7B (maj@4) | Accuracy: 28.4 |
| math-word-problem-solving-on-math | Mistral 7B (maj@4) | Accuracy: 12.7 Parameters (Billions): 7 |
| multi-task-language-understanding-on-mmlu | Mixtral 8x7B (5-shot) | Average (%): 70.6 |
| multi-task-language-understanding-on-mmlu | Mistral 7B (5-shot) | Average (%): 62.5 |
| question-answering-on-piqa | Mistral 7B (0-shot) | Accuracy: 82.2 |
| question-answering-on-piqa | Mixtral 8x7B (0-shot) | Accuracy: 83.6 |