Overview
Mistral 7B was the first model released by Paris-based Mistral AI, in September 2023, under the permissive Apache 2.0 license. It has about 7.3 billion parameters and, according to the paper Mistral published in October 2023, it outperformed Meta’s Llama 2 13B on every benchmark the authors tested and beat the original Llama 34B on reasoning, mathematics and code generation. That result, from a model half the size of its main rival, made it one of the most widely fine-tuned open models of 2023 and 2024, and established Mistral as a serious open-weight lab.
How it works
Mistral 7B is a dense decoder-only transformer with 32 layers. Two attention choices explain most of its efficiency. Grouped-query attention (GQA) lets several query heads share one key-value head (32 query heads, 8 key-value heads), which shrinks the memory needed for the cache and speeds up generation. Sliding-window attention (SWA) lets each layer attend only to the previous 4,096 tokens; because layers stack, information can still travel further back than the window, and a rolling cache keeps memory use fixed for long inputs. The paper describes both techniques in detail.
The instruction-tuned version, Mistral 7B Instruct, was fine-tuned on public instruction datasets and, in Mistral’s tests, beat Llama 2 13B Chat. Version 0.2 extended the context to 32,768 tokens, and version 0.3, released in May 2024, added function calling and a larger 32,768-token vocabulary.
Strengths
- Permissive license. Apache 2.0 allows commercial use, modification and redistribution without the usage restrictions of some other open licenses.
- Small and fast. The default 4-bit build in the Ollama library is about 4.4 GB, so it runs on most modern laptops and even on CPUs.
- Huge ecosystem. Thousands of community fine-tunes, merges and quantizations were built on it, and tools such as Ollama, llama.cpp, LM Studio and vLLM all support it.
- Good teaching model. Its architecture is simple and well documented, which makes it a common choice for courses and fine-tuning tutorials.
Limitations
Mistral 7B is now an older model. Newer small models, such as Qwen2.5, Llama 3.1 8B and Gemma, score clearly higher on reasoning, coding and multilingual tasks, and offer longer context windows. The base model has no built-in moderation, so applications need their own safety layer. Its knowledge stops at its 2023 training cut-off.
Typical uses
Lightweight local assistants, fine-tuning experiments, classroom demonstrations of transformer architecture, and low-cost text tasks such as classification, extraction and summarization where a frontier model would be overkill. For a step-by-step setup, see our guide to running a local LLM with Ollama.
Alternatives
Mistral’s own Mixtral 8x7B uses a mixture-of-experts design built from eight Mistral-sized experts for higher quality at moderate cost, and the Mistral Small series offers a newer, larger option from the same lab.
Things to consider
- Download sizes refer to the default 4-bit quantized versions in the Ollama library; full-precision weights are larger (see quantization).
- Benchmarks in the paper were run by Mistral and reflect 2023 evaluation settings.
Specifications are taken from the Mistral 7B paper on arXiv, the model card on Hugging Face, the Ollama library and the provider’s announcement. Benchmark results depend on evaluation settings; see how AI benchmarks work.