论文多源确认

论文提出低比特存储 n-gram 嵌入表,可节省约 75% 表内存

Low-Bit N-Gram Embeddings for Language Models

精选理由

DeepSeek 的 n-gram 表动辄上千亿参数,这篇论文用 4 比特量化砍掉四分之三内存,性能几乎不掉,做本地部署的可以看看。

arXiv 论文研究了语言模型中 n-gram 嵌入表(如 DeepSeek-V4.1-Flash 的 Engram,占用 1960 亿参数)的量化压缩。在 nanochat、Llama 和 GPT-2 系列从零训练的模型上,4 比特表节省约 75% 表内存,同时保留 99% 以上的验证损失改善。在 DeepSeek-V4.1-Flash 和 Qwen3.8-Flash-Next 上,低比特表节省 47-55% 表内存,困惑度增加不到 1.2%。节省的内存重新投入更大的表,还能在更少内存下超越原始全精度表的性能。

原文 · arXiv cs.AI

Low-Bit N-Gram Embeddings for Language Models

Many recent open-weight language models use n-gram embedding tables to improve performance. These tables store learned representations of short token sequences, such as pairs or triples of consecutive tokens, which the model retrieves during processing. However, they can require substantial memory: DeepSeek-V4.1-Flash, for example, allocates 196 billion parameters to its Engram n-gram memory. We therefore investigate whether this memory cost can be reduced while preserving the performance improvement that the tables provide. We propose storing n-gram embeddings at low precision and systematically investigate different quantization methods and bit allocations across tables. Across nanochat-, Llama-, and GPT-2-family models trained from scratch, four-bit tables save approximately 75% of table memory while preserving more than 99% of the validation-loss improvement from adding the tables. Using fewer bits leads to a larger drop in performance, although we find that a short fine-tuning phase recovers a significant part of this loss. In addition, reinvesting the saved memory in larger tables can improve performance beyond that of the original full-precision tables while still using less memory. These table memory savings also extend to large existing models: on DeepSeek-V4.1-Flash and Qwen3.8-Flash-Next, low-bit tables save 47-55% of table memory, with perplexity increases of less than 1.2% and largely preserved downstream task performance. These findings establish low-bit precision as a practical way to reduce the memory requirements of n-gram embeddings and use the saved capacity to improve model performance.