Scaling Embedding Layers in Language Models

Da Yu, Edith Cohen, Badih Ghazi, Yangsibo Huang, Pritish Kamath, Ravi Kumar, Daogao Liu, Chiyuan Zhang

Abstract

SCONE (Scalable, Contextualized, Offloaded, N-gram Embedding) is a novel approach to scaling language model capacity by decoupling input representations from computational overhead. By offloading a massive table of frequent n-gram embeddings to inexpensive system memory or SSDs, SCONE allows models to leverage vast amounts of "pre-digested" knowledge. Our results show that a 1B-parameter SCONE-enhanced model outperforms a 1.9B-parameter baseline while requiring 48% fewer inference FLOPs and half the GPU memory.

Introduction: The Scaling Bottleneck

Scaling Large Language Models (LLMs) typically involves increasing parameter counts, which directly inflates computational costs (FLOPs) and high-bandwidth memory (HBM) requirements. While increasing vocabulary size might seem like a viable alternative, it is hindered by the "logit bottleneck"—where the final softmax calculation becomes prohibitively expensive—and the "tail token problem," where rare tokens receive insufficient training updates. SCONE addresses these challenges by scaling model knowledge without scaling the "thinking" cost of inference.

The SCONE Architecture

The core of SCONE is a secondary embedding layer dedicated to frequent f-grams (frequent n-grams). The process involves several key stages:

  1. Discovery: Frequent n-grams (up to length $K$) are identified in the training corpus using a Byte-Pair Encoding (BPE)-style method.
  2. Contextualization: During training, a separate, smaller "f-gram model" learns to generate contextualized embeddings for these sequences. This model shares parameters across n-grams to mitigate sparse updates.
  3. Precomputation and Offloading: After training, the f-gram model precomputes embeddings for all selected n-grams. These are stored in a large lookup table offloaded to system RAM or NVMe SSDs.
  4. Inference: During generation, the model fetches the relevant f-gram embedding and adds it to the standard token embedding before it enters the main transformer.
The SCONE inference pipeline: Contextualized n-gram embeddings are precomputed and offloaded to system memory, then integrated into the main transformer flow.

By decoupling these embeddings from the output layer, the output head remains small, keeping the "next token" prediction fast and memory-efficient.

Experimental Results

The researchers evaluated SCONE using diverse datasets, including WebText, WikiText-103, and the OLMo Mixture. The primary goal was to determine if SCONE could bridge the performance gap between models of different sizes.

Efficiency and Performance

A 1B-parameter SCONE model achieved a zero-shot average score of 57.0 across six downstream tasks (including MMLU and Hellaswag), surpassing the 1.9B-parameter baseline's score of 56.8. Crucially, the SCONE model achieved this with roughly half the GPU memory and 48% fewer inference FLOPs.

Latency and Scaling

Storing 100M f-gram embeddings in system RAM added negligible latency to the generation process. Even when using NVMe storage for 1B f-grams, generation speeds remained well within the requirements for real-time applications (under 10ms/token). Performance improved consistently as both the number of f-grams and the size of the training f-gram model increased.

Conclusion and Future Work

SCONE demonstrates that model capacity is not strictly tied to inference compute. By utilizing a hierarchy of memory—moving memory-heavy components to cheaper storage—we can serve high-performance models at a fraction of the traditional cost. Future research may explore longer n-gram keys, semantic mapping for non-exact matches, and scaling SCONE to models exceeding 70B parameters.

Summary updated

BibTeX
@inproceedings{yu2025scaling,
  author = {Da Yu and Edith Cohen and Badih Ghazi and Yangsibo Huang and Pritish Kamath and Ravi Kumar and Daogao Liu and Chiyuan Zhang},
  title = {{Scaling Embedding Layers in Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=gH4BRa4ZP3},
}
Figure