Manuscript Offprint

arXiv:2610.22428

Embeddings Are Overpriced? A Frozen 16 MB Vocabulary for Small and Ternary Language Models

Sai Kiran Bathula

Abstract

In a small language model the vocabulary is the single largest part. In Gemma 3 270M the embedding table holds 168M of 268M parameters, and because quantisation methods leave the embedding in 16-bit, it is also most of the file once the rest of the model is compressed. We ask what that table actually buys. We replace it with one frozen table of 512-bit codes, 16 MB, with no trainable parameters, derived once from a pretrained embedding by principal-component projection and sign binarisation, and we train the same Gemma-shaped body from scratch on the same 2.05B tokens with and without it. The learned table buys 0.20 nats of validation loss for 2.6 times the trainable parameters, but on LAMBADA, HellaSwag and PIQA the frozen-table model is better or tied; only ARC-Easy favours the learned table. With a ternary BitNet b1.58 body the whole model is a 46 MB file, still ties the float model on LAMBADA and PIQA, and on a laptop CPU generates 615 to 740 tokens per second in 62 MB of memory, five to six times the speed of the float model's 8-bit GGUF in llama.cpp at a seventh of the memory. The frozen table wins by 1.7 to 2.3 nats on rare words, accepts 10,000 new words after training with a 3% cost where the learned table collapses by 43%, and all of it is released with the weights, the data and every evaluation answer.

Code, weights of every arm (including intermediate checkpoints), training data, logs and per-question evaluation results: huggingface.co/QLNI/embeddings-are-overpriced. Preprint DOI: doi.org/10.5281/zenodo.23382634. Released for non-commercial research.

1 Why the vocabulary

Three things happened to small language models in the last few years. BitNet showed that a transformer can be trained with weights in {−1,0,+1}\{-1, 0, +1\} and keep most of its quality [1, 2]. Models under a billion parameters became good enough to be useful: Gemma 3 270M, SmolLM, Qwen's smallest sizes. And people started running these models on phones and laptop CPUs, where every megabyte and every byte read per token costs time.

The vocabulary did not get the same attention. Every one of these models carries a learned embedding table: one trained vector per token, usually tied to the output head. For a large model the table is a rounding error. For a small model it is the model. Gemma 3 270M has 268M parameters; 168M of them, 63%, are the table (Table 1). The feed-forward layers, where the model does most of its computing, are 71M.

Quantisation makes this worse, not better. BitNet keeps its embedding and head in 16-bit. GPTQ and AWQ leave embed_tokens and lm_head untouched. llama.cpp stores the output head at 6 to 8 bits. So after the body is compressed, the table is what is left. A Gemma 3 270M with a ternary body and a 16-bit vocabulary would be about 20 MB of body and 335 MB of vocabulary. Microsoft's own BitNet b1.58 2B4T report gives its memory as “0.4 GB (non-embedding)”, leaving the table out of the headline number [3]. Everyone accepted this. The table is treated as a fixed cost of having a vocabulary.

We did not want to accept it, because we had a reason to think the table is overpriced. A token embedding has two jobs: tell the body which token came in, and score the body's output against every token. Neither job obviously needs 640 learned floats per token. Our earlier released models did without a learned table. SHADOW-250M [25] is a 250M-parameter model trained on 30B tokens whose 131,072 tokens each carry a fixed 512-bit code and nothing else; with an attention and FFN body under 2 bits per weight it ships as a 60 MB file, vocabulary included, and generates about 400 tokens per second on a laptop CPU in 80 MB of RAM, at a held-out perplexity of 23.3 and PIQA 60, HellaSwag 34, ARC-Easy 41 (normalised accuracy). SHADOW-50M [26] is a 44M-parameter ternary model over a frozen 73,880-token table, 19.8 MB in total, about 2,000 tokens per second, with exact arithmetic circuits and a memory on disk; it scores below a normal model of its size on the usual tests and says so. Both worked, but neither was a controlled experiment: they changed many things at once, and neither was ever trained with a learned table for comparison. This paper is the controlled version. Same body, same data, same steps, same seed. Only the vocabulary changes.

Table 1: Where Gemma 3 270M's parameters are. From the public configuration: 18 layers, width 640, FFN 2,048, 4 query and 1 KV head of size 256, vocabulary 262,144.

partparametersshare
embedding table (tied to the head)167.8M62.6%
feed-forward layers70.8M26.4%
attention29.5M11.0%
norms0.06M0.0%
total268.1M

References (20)