跳到正文
arXiv cs.CL· Stephen Chung, Wenyu Du·· 13 小时前AI 评分38

低比特 N-Gram 嵌入为语言模型节省最高 75% 表内存

Low-Bit N-Gram Embeddings for Language Models

AI 导读

研究提出将 n-gram 嵌入表以低精度存储,在 nanochat、Llama 和 GPT-2 系列从零训练的模型上,4-bit 表节省约 75% 表内存,同时保留超过 99% 的验证损失改善。

正文 · 原文

View PDF HTML (experimental)

Abstract: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.
Comments: 24 pages, 10 figures, 10 tables
Subjects: Computation and Language (cs.CL); Artificial Intelligence (cs.AI)
MSC classes: 68T50, 68T07
ACM classes: I.2.7; I.2.6
Cite as: arXiv:2610.31646 [cs.CL]
  (or arXiv:2610.31646v1 [cs.CL] for this version)
  https://doi.org/10.48550/arXiv.2610.31646

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Stephen Chung [view email]
[v1] Thu, 22 Oct 2026 17:56:13 UTC (246 KB)

来源:arXiv cs.CL · arxiv.org