The 32,000-token vocabulary described below belongs to the first generation of Mistral models (Mistral 7B, Mixtral). It is no longer in use.
The entire current line-up (Mistral Large 3, Mistral Small 4, Mistral Medium 3.5, Ministral 3) is built on Tekken, whose vocabulary holds 131,072 tokens, four times as many. This is no longer a novelty confined to Mistral NeMo: it has been the house standard since 2024.
Keep reading the 32K section anyway: it explains why that choice made sense at the time, and what changed when it was dropped.
Tokenization: How Mistral Turns Text into Numbers
LLMs don't read text like we do. They don't see letters, words, or sentences. They see numbers. The word "Hello" means nothing to a Mistral model: it's the number 1532 (for example) that has meaning. A space is another number. Each "chunk" of text is converted into a numerical identifier called a "token."
The tokenizer is the translator between the human world (text) and the model world (numbers). And the quality of this translator has a direct and measurable impact on performance, cost, and the model's capacity.
If the tokenizer is good, 100 pages of text compress into 10,000 tokens. If it's bad, the same 100 pages become 50,000 tokens. More tokens means less available context, slower inference, and a higher bill.
A Token Is Not a Word
This is a common misconception. A token is not a word. It's a text fragment that the tokenizer has learned to split in a statistically optimal way.
- "Hello" = 1 token (common word, well known)
- "Unconstitutionally" = 4-5 tokens (rare word, broken into sub-parts)
- "The" = 1 token
- A space = sometimes included in the preceding token, sometimes a separate token
The splitting is statistical, not linguistic. The tokenizer doesn't know what a "word" is in the grammatical sense. It knows which character sequences frequently appear together in its training corpus.
Mistral charges per token, and the number of tokens produced for the same text varies by language: a language well represented in the tokenizer's vocabulary is cut into few tokens, a poorly represented one into many. So the choice of tokenizer directly shapes your bill, and not by a few percent: Mistral puts the compression gap between its two generations of tokenizers at threefold for Arabic. For a firm handling multilingual documents, that is not a rounding error.
Byte-Level BPE: The Technical Foundation
Mistral's tokenizers are based on Byte-Pair Encoding (BPE) at the byte level, a proven technique massively used in modern LLMs.
How BPE Builds Its Vocabulary
BPE works iteratively, a bit like compressing text:
- Initialization. The base vocabulary contains the 256 possible bytes (all basic characters, in byte-level representation).
- Iteration. At each step, the algorithm finds the most frequent pair of adjacent tokens in the training corpus and merges them into a new token. For example, if "t" and "h" appear very often next to each other, they merge into "th."
- Stopping. The process continues until reaching the target vocabulary size (32,000 for the first Mistral models).
It's like building progressively larger Lego bricks from elementary bricks, prioritizing the most useful combinations.
Why "Byte-Level"?
The advantage of byte-level BPE: it can encode ANY text, in any language, with any Unicode character. There's never an "unknown" token (the infamous [UNK] that haunted older tokenizers). In the worst case, a rare character is simply decomposed into its individual bytes. It's less efficient, but it always works.
The Tokenizer of the First Models: Mistral 7B and Mixtral
The first Mistral models used a SentencePiece-based tokenizer with 32,000 tokens.
| Parameter | Value |
|---|---|
| Vocabulary size | 32,000 |
| Method | Byte-level BPE (SentencePiece) |
| Special tokens | <s> (BOS), </s> (EOS), [INST], [/INST] |
| Unicode support | Complete (via byte-level fallback) |
Instruction tokens. For Instruct versions (fine-tuned to follow instructions), special tokens [INST] and [/INST] delimit user messages. This is what allows the model to distinguish "here's the user's instruction" from "here's my response."
Vocabulary size is a trade-off. A smaller vocabulary needs more tokens per text but shrinks the embedding matrix (fewer parameters). A larger vocabulary is more token-efficient but makes the model heavier. 32,000 offered a good balance for English and the Latin languages, the primary targets of the first Mistral models.
That trade-off was settled the other way as early as 2024: the current line-up sits at 131,072. A sign that the cost of a large vocabulary has become negligible next to the compression gain, especially for a European vendor that has to serve dozens of languages.
Tekken: The Tokenizer Behind the Entire Current Line-Up
Introduced with Mistral NeMo 12B in July 2024, Tekken is a complete tokenizer redesign built for a specific goal: drastically improving support for non-English languages. Today it powers all of Mistral's recent models.
What Changes?
A change of technology. Earlier versions were built on SentencePiece. Tekken is built on tiktoken, the tokenization library popularized by OpenAI. This is a change of engine, not just of settings.
Expanded vocabulary: 131,072 tokens. Mistral's own code (the mistral-common library) gives the exact figure: 131,072, of which roughly a thousand are reserved control tokens. That leaves far more "room" for sub-words specific to non-English languages. Where the old tokenizer would decompose an Arabic or Chinese word into many bytes, Tekken can represent it in one or two tokens.
Multilingual training corpus. The Mistral NeMo announcement states that Tekken was trained on more than a hundred languages. This is a deliberate decision: Mistral, a European company, wants its models to handle French, German, or Spanish just as well as English.
The Concrete Impact, with the Official Numbers
Mistral published precise compression gains, measured against its previous tokenizer:
| Content | Tekken compression gain |
|---|---|
| Source code, Chinese, Italian, French, German, Spanish, Russian | about 30% |
| Korean | 2x |
| Arabic | 3x |
Against the Llama 3 tokenizer, Mistral states that Tekken compresses text better for roughly 85% of all languages.
The consequences are tangible:
- More context: for the same context window, you fit more useful text in, especially outside English
- Reduced cost: fewer tokens per request, so a lighter bill, since Mistral charges per token
- Better comprehension: when a word is represented as one token rather than five bytes, the model captures its meaning better
Special Tokens and Prompt Formats
Mistral models use special tokens to structure exchanges.
Instruct Format (v1)
The original format uses [INST] and [/INST] tags:
<s>[INST] User instruction [/INST] Model response</s>
Format with System Prompt
More recent versions of the tokenizer have dedicated control tokens for the system message:
<s>[SYSTEM_PROMPT] General instructions [/SYSTEM_PROMPT][INST] User instruction [/INST] Response</s>
You will often see the <<SYS>> syntax circulating for Mistral's system message. It is not Mistral's: it is Meta's Llama 2 format. Mistral's control tokens, as they appear in the official mistral-common library, are [SYSTEM_PROMPT] and [/SYSTEM_PROMPT]. Using the wrong syntax raises no error: the model simply reads those characters as ordinary text, and your instructions lose their status as instructions. A silent failure, and therefore an expensive one.
Format for Function Calling
Models supporting function calling add special tokens to delimit tool definitions ([AVAILABLE_TOOLS]), function calls ([TOOL_CALLS]), and returned results ([TOOL_RESULTS]). This is what allows the model to "know" when it should call a tool and how to interpret the response.
Format for Reasoning
Models with adjustable reasoning effort, such as Mistral Medium 3.5 and Mistral Small 4, additionally have [THINK] and [/THINK] tokens that wrap the model's internal deliberation, the part not meant for the user. Here too, these are not ordinary character strings: they are reserved identifiers in the vocabulary.
The Successive Tokenizer Versions
Mistral numbers its tokenizers. The official mistral-common code lists seven of them, and the table below follows its own comments:
| Version | Vocabulary size | What it brings |
|---|---|---|
| v1 | 32,000 | the very first one, [INST] is ordinary text |
| v2 | 32,768 | [INST] and [/INST] become genuine control tokens |
| v3 | 32,768 (SentencePiece) or 131,072 (Tekken) | better function calling |
| v7 | 32,768 or 131,072 | improved system message and function calling |
| v11 | 131,072 (Tekken) | improved function calling |
| v13 | 131,072 (Tekken) | no more call identifier, better prompt caching |
| v15 | 131,072 (Tekken) | model settings |
Two practical lessons. First, from v11 onward there is only Tekken: the SentencePiece branch stops there. Second, these versions are not cosmetic, moving from v11 to v13, for instance, changes how tool calls are written into the sequence, and therefore how your prompts must be built.
The tokenization guide published on Mistral's documentation site stops at versions v1, v2 and v3. Versions v7 through v15 are described nowhere on it: for now they exist only in the mistral-common source code. And Mistral publishes no official table saying which model uses which tokenizer version. If you need that information for a deployment, the only reliable method is to read the tokenizer file shipped with the model weights, or to go through the mistral-common library, which does the work for you.
Each Mistral model is inseparable from its tokenizer. You cannot use the Mistral 7B tokenizer with Mistral NeMo, or vice versa, they do not even have the same number of tokens (32,000 against 131,072), so the identifiers do not point to the same text fragments. During deployment, using the wrong tokenizer produces incoherent results: the model "reads" a different text than what you think you're sending it. Always verify compatibility.
Impact on Fine-Tuning
The tokenizer has direct implications when you fine-tune a model.
The vocabulary is frozen. You can't modify the vocabulary during standard fine-tuning. If your domain uses highly specialized jargon (medical, legal, chemical terms), those terms will be decomposed into sub-tokens. It's less efficient but functional: the model learns to associate the sub-token sequence with the concept.
Adding special tokens. It's possible to add special tokens (section markers, custom role identifiers) by extending the vocabulary and resizing the embedding matrix. This is useful for custom data formats.
Consistent tokenization. Fine-tuning data must be tokenized with the same tokenizer as the pre-trained model, following the prompt formats (Instruct, Chat). A format mismatch is a classic error that silently degrades performance.
Tokenizer Comparison
| Tokenizer | Technical base | Models | Vocabulary |
|---|---|---|---|
| Mistral v1 to v3 (SentencePiece) | SentencePiece | Mistral 7B, Mixtral | 32,000 then 32,768 |
| Tekken | tiktoken | Mistral NeMo, Pixtral, then the entire current line-up | 131,072 |
| Llama tokenizer | SentencePiece | Meta Llama 2 | 32,000 |
Tokenization is often overlooked in LLM discussions, but it's a determining factor in performance and cost. Mistral's move to Tekken reflects growing attention to linguistic inclusivity: treating French, Arabic, or Japanese with as much consideration as English. For a European user, that is not an engineering detail, it is a line on the invoice.