Glossary · Tokens in, tokens out
Vocabulary and tokenizer
Also: vocab_sizetokenstokenizerBPE
Read it at the depth you need: one sentence · a paragraph · the math · in the models here
1In one sentence
The fixed list of tokens a model reads and writes (V of them), set by its tokenizer. V sets the size of the embedding table and the output head.
2In a paragraph
Models do not see characters or words but tokens: pieces of text from a fixed vocabulary, found by an algorithm such as byte-pair encoding. Common words are one token, rare words several. A bigger vocabulary packs more text into each token (so more fits in the context and generation is faster) at the cost of a bigger embedding table and output head, and a softmax over more entries at every step.
3The math, shapes and parameters
The vocabulary appears in two matrices of shape [V, d]: the embedding and the output head (one matrix if they are tied). vocab_size in the config is often padded above the tokenizer's real count to a multiple of 64 or 128, for faster matmuls.
4In the 96 models on this site
Vocabularies here, one model per series:
| Series | V | Embedding (V × d) in the smallest | Share of that model |
|---|---|---|---|
| Gemma 3 | 262,144 | 168M in Gemma 3 270M | 62.6% |
| Gemma 4 | 262,144 | 738M in Gemma 4 26B-A4B | 2.9% |
| Gemma 2 | 256,000 | 590M in Gemma 2 2B | 22.6% |
| Qwen3.5 | 248,320 | 254M in Qwen3.5 0.8B | 33.8% |
| Llama 4 | 202,048 | 1.03B in Llama 4 Scout (17B-16E) | 0.96% |
| gpt-oss | 201,088 | 579M in gpt-oss-20b | 2.8% |
| Inkling | 201,024 | 823M in Inkling-Small | 0.31% |
| MiniMax | 200,064 | 615M in MiniMax M2 | 0.27% |
| Kimi | 163,840 | 1.17B in Kimi K2 | 0.11% |
| Ling | 157,184 | 1.29B in Ling-1T | 0.13% |
| Seed-OSS | 155,136 | 794M in Seed-OSS 36B | 2.2% |
| GLM-5 | 154,880 | 952M in GLM-5.2 | 0.13% |
| Qwen2.5 | 151,936 | 136M in Qwen2.5 0.5B | 27.6% |
| Qwen3 | 151,936 | 156M in Qwen3 0.6B | 26.1% |
| DeepSeek-R1 distills | 151,936 | 233M in DeepSeek-R1-Distill-Qwen-1.5B | 13.1% |
| Qwen3-Next | 151,936 | 311M in Qwen3-Next 80B-A3B | 0.39% |
| GLM-4.5 | 151,552 | 621M in GLM-4.5-Air | 0.58% |
| Falcon3 | 131,072 | 268M in Falcon3 1B | 16.1% |
| Nemotron 3 | 131,072 | 352M in Nemotron 3 Nano 30B-A3B | 1.1% |
| Llama 3 | 128,256 | 263M in Llama 3.2 1B | 21.3% |
| DeepSeek | 102,400 | 210M in DeepSeek-V2-Lite | 1.3% |
| OLMo 2 | 100,352 | 206M in OLMo 2 1B | 13.8% |
| OLMo 3 | 100,278 | 411M in OLMo 3 7B | 5.6% |
| SmolLM | 49,152 | 28.3M in SmolLM2 135M | 21.0% |
| Granite | 49,152 | 101M in Granite 3.3 2B | 4.0% |
| Mistral | 32,768 | 134M in Mistral 7B v0.3 | 1.9% |
| Phi | 32,064 | 98.5M in Phi-3 Mini | 2.6% |
| Llama 2 | 32,000 | 131M in Llama 2 7B | 1.9% |