Mixtral de Especialistas
Mixtral of Experts
January 8, 2024
Autores: Albert Q. Jiang, Alexandre Sablayrolles, Antoine Roux, Arthur Mensch, Blanche Savary, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Emma Bou Hanna, Florian Bressand, Gianna Lengyel, Guillaume Bour, Guillaume Lample, Lélio Renard Lavaud, Lucile Saulnier, Marie-Anne Lachaux, Pierre Stock, Sandeep Subramanian, Sophia Yang, Szymon Antoniak, Teven Le Scao, Théophile Gervet, Thibaut Lavril, Thomas Wang, Timothée Lacroix, William El Sayed
cs.AI
Resumo
Apresentamos o Mixtral 8x7B, um modelo de linguagem Sparse Mixture of Experts (SMoE). O Mixtral possui a mesma arquitetura do Mistral 7B, com a diferença de que cada camada é composta por 8 blocos feedforward (ou seja, especialistas). Para cada token, em cada camada, uma rede roteadora seleciona dois especialistas para processar o estado atual e combinar suas saídas. Embora cada token veja apenas dois especialistas, os especialistas selecionados podem ser diferentes a cada passo de tempo. Como resultado, cada token tem acesso a 47 bilhões de parâmetros, mas utiliza apenas 13 bilhões de parâmetros ativos durante a inferência. O Mixtral foi treinado com um contexto de 32 mil tokens e supera ou iguala o Llama 2 70B e o GPT-3.5 em todos os benchmarks avaliados. Em particular, o Mixtral supera amplamente o Llama 2 70B em benchmarks de matemática, geração de código e multilingue. Também fornecemos um modelo ajustado para seguir instruções, o Mixtral 8x7B - Instruct, que supera o GPT-3.5 Turbo, Claude-2.1, Gemini Pro e o modelo de chat Llama 2 70B em benchmarks humanos. Tanto o modelo base quanto o modelo de instruções são lançados sob a licença Apache 2.0.
English
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.