A study investigates how to reduce the memory required by n-gram embeddings in language models while retaining most of their performance benefit. The researchers store the embedding tables at lower precision: four-bit tables use about 75% less memory while preserving more than 99% of the validation-loss improvement attributed to adding the tables.
N-gram tables hold learned representations of short token sequences, such as pairs or triples of consecutive tokens, which a model retrieves during processing. They can consume substantial memory. The source gives DeepSeek-V4.1-Flash as an example, reporting that its Engram n-gram memory contains 196 billion parameters.
The study covers models trained from scratch in the nanochat, Llama, and GPT-2 families. For the existing large models DeepSeek-V4.1-Flash and Qwen3.8-Flash-Next, low-precision tables reduce table memory by 47–55%; perplexity rises by less than 1.2%, and downstream task performance is largely preserved. Using fewer than four bits caused a larger performance drop, though a short fine-tuning phase recovered a significant part of it. The researchers also report that using the saved memory to enlarge the tables can outperform the original full-precision tables while still requiring less memory.
These findings concern the model families and performance measures examined; the source does not establish that the results generalize to all models. The original paper details the quantization methods and bit allocations it evaluates: arXiv: Low-Bit N-Gram Embeddings for Language Models