# Mistral AI 发布开源稀疏混合专家模型 Mixtral 8x7B

- 来源：Mistral AI：News（网页）
- 发布时间：2023-12-11 00:00
- AIHOT 分数：62
- AIHOT 链接：https://aihot.virxact.com/items/cmppdcr7f0e4oslv4okxoul1d
- 原文链接：https://mistral.ai/news/mixtral-of-experts

## AI 摘要

Mistral AI 发布开源模型 Mixtral 8x7B，采用 Apache 2.0 许可证。这是一个稀疏混合专家（SMoE）模型，总参数 46.7B，但每个 token 仅激活 12.9B 参数。其推理速度比 Llama 2 70B 快 6 倍，并在多数基准测试中匹配或超越 GPT-3.5。模型支持 32k token 上下文窗口，掌握英语、法语、意大利语、德语和西班牙语，并具备强大的代码生成能力。同步发布经监督微调和直接偏好优化（DPO）的指令版本 Mixtral 8x7B Instruct，其在 MT-Bench 上得分 8.3。

## 正文

Mistral AI continues its mission to deliver the best open models to the developer community. Moving forward in AI requires taking new technological turns beyond reusing well-known architectures and training paradigms. Most importantly, it requires making the community benefit from original models to foster new inventions and usages.

Today, the team is proud to release Mixtral 8x7B, a high-quality sparse mixture of experts model (SMoE) with open weights. Licensed under Apache 2.0. Mixtral outperforms Llama 2 70B on most benchmarks with 6x faster inference. It is the strongest open-weight model with a permissive license and the best model overall regarding cost/performance trade-offs. In particular, it matches or outperforms GPT3.5 on most standard benchmarks.

Mixtral has the following capabilities.

It gracefully handles a context of 32k tokens.

It gracefully handles a context of 32k tokens.

It handles English, French, Italian, German and Spanish.

It handles English, French, Italian, German and Spanish.

It shows strong performance in code generation.

It shows strong performance in code generation.

It can be finetuned into an instruction-following model that achieves a score of 8.3 on MT-Bench.

It can be finetuned into an instruction-following model that achieves a score of 8.3 on MT-Bench.

Mixtral is a sparse mixture-of-experts network. It is a decoder-only model where the feedforward block picks from a set of 8 distinct groups of parameters. At every layer, for every token, a router network chooses two of these groups (the “experts”) to process the token and combine their output additively.

This technique increases the number of parameters of a model while controlling cost and latency, as the model only uses a fraction of the total set of parameters per token. Concretely, Mixtral has 46.7B total parameters but only uses 12.9B parameters per token. It, therefore, processes input and generates output at the same speed and for the same cost as a 12.9B model.

Mixtral is pre-trained on data extracted from the open Web – we train experts and routers simultaneously.

We compare Mixtral to the Llama 2 family and the GPT3.5 base model. Mixtral matches or outperforms Llama 2 70B, as well as GPT3.5, on most benchmarks.

On the following figure, we measure the quality versus inference budget tradeoff. Mistral 7B and Mixtral 8x7B belong to a family of highly efficient models compared to Llama 2 models.

The following table give detailed results on the figure above.

Hallucination and biases. To identify possible flaws to be corrected by fine-tuning / preference modelling, we measure the base model performance on BBQ/BOLD.

Compared to Llama 2, Mixtral presents less bias on the BBQ benchmark. Overall, Mixtral displays more positive sentiments than Llama 2 on BOLD, with similar variances within each dimension.

Language. Mixtral 8x7B masters French, German, Spanish, Italian, and English.

We release Mixtral 8x7B Instruct alongside Mixtral 8x7B. This model has been optimised through supervised fine-tuning and direct preference optimisation (DPO) for careful instruction following. On MT-Bench, it reaches a score of 8.30, making it the best open-source model, with a performance comparable to GPT3.5.

Note: Mixtral can be gracefully prompted to ban some outputs from constructing applications that require a strong level of moderation, as exemplified here . A proper preference tuning can also serve this purpose. Bear in mind that without such a prompt, the model will just follow whatever instructions are given.

To enable the community to run Mixtral with a fully open-source stack, we have submitted changes to the vLLM project, which integrates Megablocks CUDA kernels for efficient inference.

Skypilot allows the deployment of vLLM endpoints on any instance in the cloud.

We're currently using Mixtral 8x7B behind our endpoint mistral-small, which is available in beta . Register to get early access to all generative and embedding endpoints.

We thank CoreWeave and Scaleway teams for technical support as we trained our models.

0%
