Your team debates 32K vs 128K vs 256K vocab. What is the core tradeoff they should frame?
Bigger vocab compresses text into shorter sequences (cheaper attention) but fattens the embedding matrix, lm_head, and softmax. The 2026 sweet spot for general LLMs is 100K to 200K.
Picture a dictionary you carry around to read every book. A tiny dictionary fits in your pocket but you have to look up every other word, so reading is slow. A huge dictionary lets you read fast because almost every word is one lookup, but the book itself is now twice as heavy in your backpack. Vocabulary size in a language model is the same choice. A small vocabulary breaks text into many small tokens, making the model work through more positions, and the attention math gets expensive. A big vocabulary compresses text into fewer tokens, so the model processes it in fewer steps. But the model also carries one slot per vocabulary entry in two large matrices, so a huge vocabulary makes the model bigger and the final prediction step slower.
Detailed answer & concept explanation~5 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: state the core tradeoff (compression versus parameter cost), walk the three downside components (embedding, lm_head/softmax, under-training), anchor with 2026 production numbers and model examples, and explain why the trend has moved toward larger vocabularies.
Real products, models, and research that use this idea.
- tiktoken cl100k_base ships a 100K vocabulary for GPT-4 era models; o200k_base ships 200K for GPT-4o, o1, o3, GPT-5, and GPT-5.5.
- Llama 3 and Llama 4 use a 128K BPE vocabulary, quadrupled from Llama 2's 32K SentencePiece.
- Gemma 2 uses a 256K SentencePiece Unigram vocabulary, deliberately large for multilingual headroom.
- Mistral 7B and Mistral Large early variants use a 32K SentencePiece BPE vocabulary; later Mistral Large models moved to a larger vocab to match the industry trend.
What an interviewer would ask next. Try answering before peeking at the approach.
QDoubling the vocabulary roughly halves sequence length. Why does that not perfectly cancel out the doubled embedding cost?
QHow do production teams decide if their vocabulary is the right size?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Thinking bigger vocabulary is strictly better. The embedding matrix and lm_head both scale linearly with vocab_size, doubling the vocabulary roughly doubles those parameters and adds real cost to every forward pass.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.