Small Model Compression's Blind Spot: Should You Freeze the Vocabulary Table That Takes Up 60% of the Model?
As on-device models shrink, their vocabulary (embedding) tables have quietly become the largest single component—often over 60% of total parameters—yet mainstream quantization techniques tend to skip them. This article breaks down why embedding tables resist compression, lays out four practical routes for shrinking them (low-bit quantization, vocabulary pruning with parameter sharing, freezing and reparameterization, and structured compression), and offers engineering guidance for accounting for every megabyte during deployment. It helps developers understand why a "20MB body + 335MB vocabulary" model still strains memory, and why treating the vocabulary as a first-class citizen is the real next step for small-model edge deployment.
1. The model is small enough—but the vocabulary has become the biggest chunk
Over the past two years, progress in on-device small models can be summed up in a “three-hit combo”: extreme quantization proved that neural network weights can be compressed to just three values—-1, 0, and +1—with almost no loss in quality; sub-billion-parameter models became genuinely good enough for everyday question answering, text summarization, and instruction following; and at the same time, these models were packed into phones, laptops, and all kinds of edge devices.
As deployment moves from the cloud data center down to the device, the way we account for cost changes too. In the cloud, the marginal cost of a single inference is amortized across massive request volume. On the device, every megabyte of model size and every weight read against memory bandwidth directly determines time-to-first-token, memory footprint, and battery life. So “how big is the model, really” stops being a vague adjective and becomes an arithmetic problem that has to be solved down to the byte.
The first counterintuitive conclusion of that arithmetic shows up in the vocabulary. Take an on-device small model of roughly 270 million parameters. If you break down its internal structure, you’ll find that the feed-forward layers—the part actually doing the compute and inference—account for only about 71 million parameters. Meanwhile, the embedding table that maps every token to a vector eats up about 168 million parameters all on its own, more than 60% of the entire model.
In other words, we habitually call this a “270-million-parameter small model,” but its real “compute body” is just over 70 million. The remaining two-thirds is a huge table that barely participates in matrix operations and mostly does lookup mapping.
2. Why mainstream quantization techniques skip the vocabulary
The severity of the problem is amplified precisely by the current state of quantization. Intuitively, if you just push the model down to 4-bit or even 1-bit, the size problem should be solved. But in practice, compression techniques tend to “go easy” on the embedding table:
- Extreme ternarization compresses linear layer weights to an information entropy close to 1 bit, yet usually leaves the embedding table untouched at 16-bit floating point.
- Mainstream post-training quantization methods (the widely used class of layer-by-layer, error-calibrated weight quantization algorithms in the industry) perform well on attention and feed-forward layers, but often skip the embedding layer or handle it very conservatively.
- Common on-device inference frameworks compress the output layer to at most 6–8 bits, and leave even less room to compress the embedding layer.
These choices aren’t technical oversights; they have practical reasons. Each row vector in the embedding layer corresponds to a token, and its quantization error doesn’t get averaged out by the large amount of subsequent computation the way linear layer errors do. Any quantization distortion in a high-frequency token’s vector is inherited directly across thousands of lookups and then amplified token by token during generation. So engineers tend to prefer “use a bit more space rather than let the vocabulary go wrong.”
But the consequences are obvious. Once the model’s “body” is compressed to be slim enough, the vocabulary becomes the largest part of the file. Take that same 270-million-parameter model again: give it a ternarized body and the body accounts for only about 20MB, while a vocabulary table still kept at 16-bit precision balloons to about 335MB—more than ten times the body. The “small change” once hidden in a corner has become the big-ticket item you can’t shake off.
This attitude of just accepting it has even affected how numbers get reported. Some ternarized models, when publishing their memory footprint, explicitly note “excluding the embedding layer”—effectively carving this big chunk out of the figure. But for developers who actually have to run the model, every bit of that removed part takes up real memory.
3. Four practical routes for vocabulary compression
Once the bottleneck is clear, the direction for solutions becomes clear too. The routes the industry is exploring roughly fall into four categories.
1. Low-bit quantization of the embedding layer. The most direct idea is to extend quantization to the embedding table. The difficulty is the error-inheritance problem mentioned earlier, so it usually needs to be paired with techniques like group-wise quantization, per-row calibration of scale factors, and keeping higher precision for high-frequency tokens to strike a balance between size and quality. In practice, you can consider a layered quantization strategy like this:
# Illustrative: layered quantization config, aggressive on the body, conservative on the vocabularyquant_config = {"attention": {"bits": 2, "group_size": 64}, # attention layers, aggressive compression"feed_forward":{"bits": 2, "group_size": 64}, # feed-forward layers, aggressive compression"embedding": {"bits": 8, "group_size": 128}, # embedding table, keep higher precision"lm_head": {"bits": 8, "group_size": 128}, # output layer, aligned with the embedding table}
The key is to keep the quantization of the embedding table and the output layer consistent—because the two often share weights, and quantizing either one affects the other.
2. Vocabulary pruning and parameter sharing. A general-purpose vocabulary is usually designed for tens of thousands of tokens, but many downstream scenarios don’t need that many. Pruning the vocabulary for a specific domain or language—keeping only the high-frequency tokens—can shrink the embedding table linearly. At the same time, making the input embedding layer and the output projection layer share weights (tied embedding), so the same table isn’t stored twice, is a low-cost, high-return routine move.
3. Freezing and reparameterization. This is exactly what “freeze it” means in the original framing. One approach is to turn the embedding table from “learnable floating-point weights” into a “fixed, low-bit lookup codebook”: use clustering or product quantization to compress thousands of token vectors into a compact set of codewords. At inference time, you only do a table lookup plus an index operation, completely separating this table from the floating-point compute graph and managing it as a read-only compressed asset. This both shrinks the footprint significantly and avoids quantization error accumulating repeatedly during training.
4. Structured compression and sparsification. Low-rank decomposition of token vectors, shared basis vectors, or structured sparsity on the embedding matrix are further directions for compression. They usually need more training involvement, and their gains depend more heavily on the specific data distribution.
4. Engineering practice: accounting for every megabyte
To actually put the above techniques into production, a few lessons are worth adding to your deployment checklist:
- Count the whole bill, not just the body. When evaluating a model’s real size and memory footprint, always include the embedding and output layers, not just the aggressively compressed body. For a “20MB body + 335MB vocabulary” model, the real memory pressure comes from the latter.
- Keep quantization consistent across the whole pipeline. The quantization schemes for the embedding layer, output layer, and linear layers need unified planning—especially for the two layers that share weights. Mixing different precisions can introduce hard-to-diagnose quality regressions.
- Separate asset loading from runtime memory. For “large but rarely changing” parts like the vocabulary table, consider distributing them via object storage and loading or caching them on the device on demand in read-only mode, moving them out of resident memory to ease peak memory pressure on the device.
- Build a closed loop of size and quality metrics. Every compression pass should run both a size measurement and an end-to-end task evaluation, using monitoring and alerting to continuously track precision regressions—so you don’t “save on size but lose on quality.”
5. Conclusion
The competition among small models has long since shifted from “are the parameters big enough” to “is every bit of resource being used wisely.” When two-thirds of a model’s parameters sit in a vocabulary table that quantization techniques have long skipped, continuing to push extreme compression on the body yields diminishing marginal returns. The real next step is to face this vocabulary table head-on and deal with it.
Whether you choose low-bit quantization, vocabulary pruning, weight sharing, or freezing the embedding layer into a read-only compressed codebook, the core logic is the same: stop assuming the vocabulary can live at 16-bit forever, and stop dodging the problem with “excluding the embedding layer” figures. Treat the vocabulary as a first-class citizen, and only then can small models truly clear the size-and-memory hurdle on the edge.
