Why Vocabulary Embeddings Dominate Small LLM Parameters: Embedding Slimming Techniques
Small edge language models often spend most of their parameters on token embeddings rather than on the Transformer computation that performs reasoning. This article explains why this parameter imbalance occurs, why mainstream quantization pipelines commonly skip the embedding layer, and which techniques—vocabulary pruning, low-rank decomposition, differentiated bit allocation, output-layer decoupling, and training-time co-design—can reduce embedding size. It also outlines a practical evaluation sequence for teams deploying small models on edge devices.
A Counterintuitive Fact: the Heaviest Part of a Small Model Is Not Its “Brain”
In recent years, language models with hundreds of millions of parameters have increasingly been deployed on phones, laptops, and edge devices. Looking inside such a model reveals an easily overlooked proportion problem: the Transformer body responsible for computation and inference—including attention layers and feed-forward network layers—may account for only a small portion of total parameters. The embedding table that maps tokens to vectors, by contrast, can occupy the majority of the overall parameter budget.
For a typical small model with 200–300 million parameters, the size of the embedding table can be estimated with a simple formula:
embedding table parameters ≈ vocabulary size × hidden dimension
If the vocabulary contains 250,000 tokens and the hidden dimension is 640, the embedding table has about 160 million parameters. For a model with roughly 270 million total parameters, the vocabulary alone accounts for more than 60%. In other words, most of the model’s “weight” is not used for thinking but for recognizing tokens.
Why This Inversion Happens
Vocabularies are designed for multilingual and code scenarios. Modern tokenizers usually cover hundreds of languages, a large number of symbols, and code fragments, with vocabularies often ranging from hundreds of thousands to several hundred thousand entries. A larger vocabulary improves tokenization efficiency—the same text is split into fewer tokens, reducing inference steps—but the cost is rapid expansion of the embedding table.
Embedding parameters cannot be reused across layers. Transformer weight matrices are stacked layer by layer, so deeper models have more parameters. The embedding table, however, exists only once and does not scale with depth. When a model is reduced in depth and width for edge deployment, the computational parameters shrink substantially, while the embedding table remains unchanged. Its share of total parameters therefore rises naturally.
Weight sharing between the output layer and the embedding table makes the problem worse. Many models share weights between the embedding matrix and the final output projection. This saves a separate set of parameters, but it also means the table serves both input encoding and output prediction, making it harder to prune freely.
The Blind Spot in Quantization
Model quantization is a mainstream approach for compressing weights from 16-bit floating point to lower-bit representations, and it is highly effective for the Transformer body. The industry has already seen extreme compression schemes that ternarize weights—using only -1, 0, and +1—pushing the computational part toward roughly one bit per parameter with controlled quality loss.
Yet almost all mainstream quantization pipelines share a common habit: they skip the embedding layer. The reason is not hard to understand. The embedding layer is sensitive to numerical precision, and aggressive low-bit quantization can amplify errors in retrieval matching, which directly shows up as degraded output quality. This creates an awkward situation: the model’s “body” has been made extremely lean, but the vocabulary still sits in the file as 16-bit floating point.
A rough calculation illustrates the problem. Suppose the main body of a small model occupies only about 20 MB after ternarization, while a 168-million-parameter vocabulary stored at 16-bit requires about 335 MB. In the entire model file, the computational part that actually does the work becomes the smaller fraction. Some vendors even report memory usage for edge small models with the note “excluding the embedding layer,” removing this large component from the measurement. This default acceptance is itself worth questioning: is the vocabulary really worth that price?
Several Technical Routes for Slimming the Vocabulary
Several approaches are worth considering for the problem of an oversized embedding table:
Vocabulary pruning. Analyze the token distribution of the deployment corpus and remove tokens that never or rarely appear, while retaining a tokenizer fallback mechanism such as byte-level encoding. For deployment in a pure Chinese or pure English scenario, for example, pruning a multilingual vocabulary with hundreds of thousands of entries down to tens of thousands can reduce embedding table size by an order of magnitude. The tradeoff is finer tokenization granularity and more generation steps for the same text, so size and speed must be balanced.
Low-rank decomposition of the embedding layer. Decompose the original “vocabulary size × hidden dimension” matrix into the product of two smaller matrices: first look up a small-dimensional table, then multiply by an up-projection matrix. If the decomposition rank is small enough, parameter count can drop from hundreds of millions to tens of millions. This is a structural modification that can be applied after training or during training.
Differentiated bit allocation. Apply a gentler but still effective quantization strategy to the embedding table than to the main body—for example, 8-bit instead of 4-bit, or higher precision for high-frequency tokens and lower precision for long-tail tokens. Compared with skipping the embedding layer entirely, sensitivity-based bit allocation can recover a substantial portion of the size savings.
Revisiting output-layer decoupling. Change the output projection from shared weights with the embedding table to an independent smaller matrix, so that the two can be compressed separately. This avoids the situation where one constraint limits everything else.
Training-time co-design. The most thorough approach is to plan for a small vocabulary from the start of pretraining. Existing research suggests that on carefully curated and cleaned corpora, a compact vocabulary with tens of thousands of entries combined with byte-level fallback can achieve competitive quality while controlling embedding table size at the source.
Practical Recommendations
For teams that need to deploy small models on edge devices, evaluate the following steps in order:
- Measure first. Calculate the actual share of the embedding table in the model file and clarify the priority for slimming.
- Prune next. Perform token frequency analysis on the target-scenario corpus and assess the impact of vocabulary pruning on generation steps.
- Quantize afterward. Apply sensitivity-aware bit allocation to the remaining embedding parameters instead of simply skipping them.
- Validate last. Run quality regression tests on real tasks, paying particular attention to generation performance for long-tail tokens and special symbols.
Conclusion
Every megabyte of a small model has a real cost. Now that compression techniques have pushed the computational body close to its limit, the embedding table—the “stubborn excess weight” that cannot easily be shed—becomes the next battlefield that must be addressed. The vocabulary is not untouchable; it needs to be handled systematically. From vocabulary design and structural decomposition to quantization strategy, each step has clear engineering benefits that can be measured.
