Glossary · Tokens in, tokens out
Tied embeddings
Also: tie_word_embeddingsweight tyingshared embeddings
Read it at the depth you need: one sentence · a paragraph · the math · in the models here
1In one sentence
Using the same [V, d] matrix as both the input embedding and the output head, which saves V × d parameters.
2In a paragraph
The embedding maps tokens to vectors and the output head maps vectors back to tokens, and both are [V, d]. Tying them uses one matrix for both jobs. Large models seldom bother (the saving is a rounding error for them), but for small models with big vocabularies it can be a fifth of the model or more. The config says so with tie_word_embeddings: true; Gemma ties by default without saying.
3The math, shapes and parameters
saving = V × d parameters = V × d × 2 bytes in BF16
The head still costs 2·V·d FLOPs per token: tying saves memory, not compute. A few checkpoints tie in the config and still store a copy of lm_head.weight (Qwen3 0.6B and 1.7B); the loader ignores it.
4In the 96 models on this site
28 of the 96 models here tie their embeddings, and what it saves:
| Model | Parameters | Saved (V × d) | Share it would add |
|---|---|---|---|
| SmolLM2 135M | 135M | 28.3M | 21.0% |
| Gemma 3 270M | 268M | 168M | 62.6% |
| SmolLM2 360M | 362M | 47.2M | 13.0% |
| Qwen2.5 0.5B | 494M | 136M | 27.6% |
| Qwen3 0.6B | 596M | 156M | 26.1% |
| Qwen3.5 0.8B | 752M | 254M | 33.8% |
| Gemma 3 1B | 1B | 302M | 30.2% |
| Llama 3.2 1B | 1.24B | 263M | 21.3% |
| Qwen2.5 1.5B | 1.54B | 233M | 15.1% |
| SmolLM2 1.7B | 1.71B | 101M | 5.9% |
| Qwen3 1.7B | 1.72B | 311M | 18.1% |
| Qwen3.5 2B | 1.88B | 509M | 27.0% |
| Granite 3.3 2B | 2.53B | 101M | 4.0% |
| Gemma 2 2B | 2.61B | 590M | 22.6% |
| SmolLM3 3B | 3.08B | 263M | 8.5% |
| Qwen2.5 3B | 3.09B | 311M | 10.1% |
| Llama 3.2 3B | 3.21B | 394M | 12.3% |
| Phi-4 Mini | 3.84B | 615M | 16.0% |
| Gemma 3 4B | 3.88B | 671M | 17.3% |
| Qwen3 4B | 4.02B | 389M | 9.7% |
| Qwen3.5 4B | 4.21B | 636M | 15.1% |
| Granite 3.3 8B | 8.17B | 201M | 2.5% |
| Gemma 2 9B | 9.24B | 918M | 9.9% |
| Gemma 3 12B | 11.8B | 1.01B | 8.6% |
| Gemma 4 26B-A4B | 25.2B | 738M | 2.9% |
| Gemma 3 27B | 27B | 1.41B | 5.2% |
| Gemma 2 27B | 27.2B | 1.18B | 4.3% |
| Gemma 4 31B | 30.7B | 1.41B | 4.6% |
Introduced in Press and Wolf, “Using the Output Embedding to Improve Language Models” (2017).
Related
Embedding and output head · Vocabulary and tokenizer · every term