Why Embedding Tables Consume 60% of Small Model Parameters—and How to Shrink Them
Small language models under a billion parameters are increasingly deployed on phones, tablets, and laptops, yet their single largest component often isn't the part that actually computes. In many on-device models, the static embedding table alone accounts for more than 60% of all parameters. This article explains why the "weight paradox" arises, why mainstream quantization methods tend to skip the vocabulary, how "freezing" and re-processing the embedding table can shrink its footprint, and offers practical engineering steps—factorized embeddings, codebook quantization, and size attribution—for building models that are both small and usable.
1. The Overlooked “Weight Paradox”
Over the past few years, language models with fewer than a billion parameters have matured rapidly. They are compact, have low inference latency, and are increasingly deployed on edge devices such as phones, tablets, and thin-and-light laptops.
Yet when you look at these models through the lens of compute cost per byte, a counterintuitive picture emerges: the smaller the computable part of a model, the more disproportionately large the non-computable part becomes.
Take an on-device model of roughly 270 million parameters. If you break the network apart internally, the parts that actually handle attention and feed-forward transformations often account for only 70–80 million parameters. Meanwhile, a single embedding table that maps discrete tokens to vectors can reach 160 million parameters—over 60% of the entire model. In other words, the “heaviest” part of the model is precisely the part that does not perform inference.
This is the weight paradox facing on-device small models: we work hard to make the model smarter and better at computation, yet what ultimately slows loading and eats up storage is a static lookup table that takes no part in the computation.
2. Where the Parameters Go: The Size of a Table
To understand this problem, start with what the embedding table actually is. A language model cannot process text directly; it must first convert each token (which can be a character, a word, or a subword unit) into a dense vector. The embedding table is essentially a two-dimensional matrix whose rows equal the vocabulary size and whose columns equal the hidden dimension:
Embedding matrix shape = [vocab size × hidden dimension]Total parameters = vocab size × hidden dimension
Take a common configuration of a 30,000-token vocabulary and a 1,000-dimensional hidden vector: this single table has 100 million parameters. In many models, the output layer (the projection matrix that maps hidden vectors back to a probability distribution over the vocabulary) shares the same weights as the embedding table, which further amplifies the table’s importance.
For large models with tens of billions or even hundreds of billions of parameters, this table is only a rounding error; but for small models with just a few hundred million parameters, it is essentially the main body of the model. Herein lies the problem: compression techniques tend to target the “main body,” while often missing the true “weight holder.”
3. Why Quantization Skips the Vocabulary
Extremely low-bit quantization—such as ternary networks that push weights down to just three values (-1, 0, +1)—is remarkably effective at compressing the Transformer body, driving the computable part down to nearly 1.58 bits with fairly limited quality loss. The catch is that these methods almost always preserve the embedding table and output layer at high precision (usually 16 bits) and leave them untouched.
Mainstream post-training quantization methods (such as various calibration-data-based low-bit schemes) similarly tend to freeze or skip the embedding layer, because token vectors are exceptionally sensitive to precision: once quantization error grows too large, the semantic boundaries between similar tokens get flattened, directly dragging down downstream task performance.
Local inference engines follow the same pattern: when loading a model, they typically quantize only the output layer down to 6–8 bits while keeping the embedding table at high precision. The result is an awkward situation—when the model’s “body” has been slimmed to a 1.58-bit figure, the 16-bit vocabulary table becomes the largest part of the file.
A rough estimate makes this concrete: a ternary body might be only about 20 MB, while a 16-bit embedding table can balloon to more than 300 MB. In extreme cases, the vocabulary table takes up the absolute majority of the compressed model file. More subtly, when some teams release extreme-quantization models, their memory footprint numbers often carry a note such as “excluding the embedding layer”—quietly removing the most space-hungry module from the accounting.
4. The Technical Logic of “Freezing It”
Since aggressively quantizing the vocabulary to low bits costs quality, is there another path? This is where the idea of “freezing it” earns its value—not by forcing the vocabulary into ternary form, but by changing how the vocabulary is handled.
Here, “freezing” primarily means separating the embedding table from the path of undergoing extreme quantization alongside the body, and using more suitable means to control its size. Common general-purpose approaches include:
- Low-rank decomposition (factorized embeddings): Split the large matrix into two smaller matrices multiplied together, approximating the original table with two “thin legs”—vocab size × r and r × hidden dimension—where r is far smaller than the hidden dimension, drastically cutting the parameter count.
- Codebook/clustering quantization: Use clustering or product quantization to map token vectors onto a finite codebook, storing only the indices and reconstructing them at inference time, balancing compression rate with semantic fidelity.
- Weight freezing and incremental adaptation: Freeze the main body of the embedding table first, then use a small number of incremental parameters for adaptation during training, avoiding a lossy overhaul of the entire table.
It is worth emphasizing that these all fall within the industry-common domains of model compression and representation learning and are not unique to any single vendor. Their shared goal is consistent: to let the most space-hungry vocabulary also enjoy the “slimming dividend,” instead of remaining an unavoidable heavyweight.
5. Actionable Engineering Advice
If you are fitting language models onto edge devices, the following practices are worth considering:
- Quantize the body first, then handle the vocabulary separately. Split Transformer-body compression and vocabulary compression into two independent pipelines, each choosing the bit width and algorithm that fit it best.
- Try factorized embeddings first. For small models with a high hidden dimension and a large vocabulary, low-rank decomposition is often the most cost-effective first step.
- Watch out for shared-layer quantization sensitivity. When the embedding table shares weights with the output layer, any change to the vocabulary simultaneously affects the output, so evaluate it carefully.
- Build a size-attribution table. Before launch, measure the actual proportion each module (embedding, body, output, normalization) occupies in the final file, so you don’t misallocate optimization effort to parts with a small footprint.
- Run quantization sweeps across the precision–size tradeoff. Use a small batch of validation data to compare the quality curves of different compression schemes, then pick the smallest configuration that meets your business threshold.
In cloud–edge collaboration scenarios, a more mature approach places model assets in persistent services such as object storage, and pairs them with container platforms and monitoring/alerting systems for version management and canary releases, so that every round of slimming can be observed and traced. This is also where the value lies for cloud providers such as Baidu AI Cloud that continue to invest in on-device inference and model engineering—turning scattered compression techniques into reusable engineering capabilities.
6. Conclusion
Slimming down a small model is never simply a matter of “pushing the bit count as low as possible.” When the parameter count drops to the hundreds-of-millions range, that static embedding vocabulary quickly shifts from a supporting role to the lead. By understanding where its size comes from, recognizing the blind spots of quantization, and then applying general-purpose techniques such as factorization, codebooks, or freezing to target the problem, you can make on-device models truly “small and usable.” For developers, rather than putting blind faith in a single extreme-quantization number, it is better to build a systematic optimization process centered on size attribution.
