TL;DR
X-GRAM is a novel framework that scales large language model (LLM) capacity through memory lookup tables rather than compute (FLOPs). By combining frequency-aware hybrid hashing with lightweight convolutional feature extraction, it overcomes the traditional pitfalls of long-tail under-training and parameter redundancy, boosting downstream accuracy by up to 4.4 points over vanilla backbones.
What Problem Does This Paper Address?
To make LLMs smarter, we typically scale them up by adding more layers or widening their hidden dimensions. However, this directly increases the computational cost (FLOPs) per token during inference. An alternative path is memory-augmented scaling: using large, token-indexed lookup tables to store static knowledge without increasing dense computation.
Unfortunately, current lookup-based methods hit a wall due to two core inefficiencies:
- Zipfian Under-training: Language follows a heavy-tailed distribution. A few words are used constantly, while the vast majority (the long tail) are rarely seen. In a uniform lookup table, rows for rare tokens receive almost no updates and remain frozen near initialization.
- Slot Collapse: When architectures use multiple parallel lookup tables ("slots") to add capacity, these slots are trained on highly overlapping token occurrences. Without a mechanism to differentiate them, they learn highly correlated features, leading to subspace collapse and redundant parameters.
Methods
X-GRAM addresses these challenges by factoring lookup-based augmentation into a three-stage data-aware pipeline:
- Frequency-Aware Hash Mapping (Stage 1): The authors estimate token frequencies from a corpus. High-frequency tokens are placed in a dedicated "VIP" region with uncompressed parameters. Long-tail tokens are compressed into shared buckets using balanced logical partitioning and multi-path local hashing, flattening the training inequality across rows.
- X-gram Extraction with Gated ShortConv (Stage 2): Instead of directly injecting static, context-independent retrieved vectors, X-GRAM refines them using a lightweight, depthwise, gated multi-scale short convolution (
ShortConv). Different retrieval views use different kernel sizes (e.g., capturing 2-gram to 4-gram local contexts), which breaks symmetry and prevents slot collapse. - Contextual Injection (Stage 3): The refined signals are injected directly into the attention value stream and/or inter-layer residuals. Injecting into the value stream is exceptionally efficient under Grouped-Query Attention (GQA) because the key/value width is much smaller than the full hidden dimension ($d_{kv} \ll d$).
Datasets
- Training: The models were pretrained on
OLMO-MIX-1124, a high-quality blend of web text from the DCLM corpus and diverse domain-specific data from Dolma. - Evaluation: Downstream performance was measured using
lm-evaluation-harnessacross a suite of 11 diverse benchmarks, including reasoning tasks (SciQ, PIQA, HellaSwag, ARC), understanding tasks (BoolQ, CommonsenseQA), and general knowledge (MMLU).
Key Insights and Ideas
- Uniform Scaling is an Allocation Failure: Uniformly expanding lookup tables primarily adds "cold," under-trained parameters. Hashing the long tail into shared buckets actually improves parameter utilization because updates to rare tokens are pooled together.
- Symmetry Breaking is Mandatory: Simply adding more parallel embedding tables does not increase effective capacity because they replicate existing features. Non-linear, view-specific temporal extractors (like ShortConv) are required to force parallel slots to specialize into distinct representations.
- Value Pathways are Compute Levers: Injecting external memory into the attention value pathway allows the model's existing attention weights to contextually match and filter the injected semantics dynamically, without altering the fragile query-key similarity scores.
Key Results
The authors evaluated X-GRAM against strong retrieval baselines (Retoken, MoRT, Engram) at 0.73B and 1.15B parameter scales:
- Superior Parameter Efficiency: At the 0.73B scale,
X-GRAM-50%(which compresses the table size by half) achieved an average downstream accuracy of 48.5%, outperforming Retoken (45.0%) and MoRT (45.8%) while using a significantly smaller memory footprint. - Reliable Scaling: As the memory budget scales up (from 1× to 4× capacity), traditional baselines plateau due to redundancy. X-GRAM, however, continues to improve, reaching 50.8% accuracy at the 1.15B scale.
- Data Efficiency: X-GRAM exhibits high training stability and reaches baseline-quality performance using only 57.25% of the training data, demonstrating that it extracts highly dense, reusable information patterns.
Limitations and Future Work
While the paper demonstrates that X-GRAM is highly offloading-friendly because retrieval depends purely on static maps and token IDs, the actual system-level communication overhead of prefetching parameters from host memory/SSD to the GPU during real-time decoding remains an engineering challenge.
Additionally, the evaluations were restricted to 0.73B and 1.15B scales. Future work will need to verify if these memory-centric scaling laws hold up as the backbone models scale to tens or hundreds of billions of parameters.
Summary updated