跳到正文
HuggingFace Daily Papers·· 1 天前

COUNT:把 n-gram 计数放到主机内存,1B 模型验证损失等效于多 57% 算力

The COUNT: Counting N-grams Unlocks Scaling on Host Memory and Training-Free Adaptation

AI 导读

论文提出 COUNT(Counting Offline Unlocks N-gram Transformers),不在训练中新增可学习参数,而是把预计算的 n-gram 计数存到主机内存,并利用语料频率对 LM 自身的 unembedding 加权,从而在不增加 GPU 显存开销的情况下扩展 n-gram 嵌入。

正文

View PDF HTML (experimental)

Abstract:The scaling relationship of compute and performance for language models (LMs) has been extensively studied; more recently, models are being designed to scale memory use, as well. In particular, adding embeddings for n-grams scales memory separately from compute use, because each pass only processes individual embedding rows, which are much smaller than the storage used for the whole embedding table. However, existing methods train embeddings from scratch, which needs expensive GPU memory for fast reading and writing. Meanwhile, the ordinary memory of the host system is cheap and underutilized by these training methods. To scale on host memory, we introduce COUNT (Counting Offline Unlocks N-gram Transformers), which builds n-gram embeddings without adding learned parameters by storing precomputed n-gram counts on host. We use the corpus frequencies to weight together the LM's own unembeddings of the next tokens most often following the current n-gram history. At a fixed compute budget, COUNT can be added as an additional input embedding for pretraining 1B-parameter LMs to improve validation loss as much as an LM with 57% more compute. If GPU memory is limited, using COUNT to let backbone parameters fill GPU memory gives better performance than splitting memory with additional learned n-gram embeddings. Beyond efficiency, COUNT allows switching in a different table of n-gram counts from a domain-specific corpus at inference time to adapt to a new task without any training.
Subjects: Computation and Language (cs.CL); Machine Learning (cs.LG)
Cite as: arXiv:2610.20456 [cs.CL]
  (or arXiv:2610.20456v1 [cs.CL] for this version)
  https://doi.org/10.48550/arXiv.2610.20456

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Ian Magnusson [view email]
[v1] Wed, 14 Oct 2026 16:38:19 UTC (5,377 KB)

来源:HuggingFace Daily Papers · arxiv.org