Good Papers

N-Gram Memories at Two Bits: Quantizing Lookup Tables in Large Language Models

Conditional Program compresses n-gram lookup tables via shared Gaussian trellis codes, cutting DeepSeek storage from 203GB to 51GB with 41, 63% lower output divergence than 2-bit rounding.

Published Oct 15, 2026▲ 6 on Hugging Face

72%
OverallHighly rated
?
OverallHighly ratedVote to see the score
Readers
–

Only vote on papers you've read. Sign in to vote.

AI panel13/20reviewers recommend it
lenient 5/5
medium 6/10
strict 2/5
AI panel?Vote to see what the 20 AI reviewers said

Abstract

Conditional memory expands language-model capacity through selective lookup, but the full embedding table must remain available for every possible input. We introduce Conditional Program (CP), a compressed representation that reconstructs only the rows an input requests. CP represents each row by a short code and a local scale, with a reconstruction program shared across the table. We instantiate this representation with a Gaussian trellis, norm restoration and independently decodable row records. CP's two-bit code lowers output KL by 41--63% relative to 2-bit round-to-nearest. Analysis across three trained n-gram memory families shows that Gaussian-like coordinate statistics coexist with learned relationships among rows; at matched storage budgets, the shared trellis outperforms the fitted codebooks and low-rank residual variants we test. For DeepSeek, it reduces table storage from 203GB to 51GB, leaving room for larger workloads when the table is kept on GPU.

Are you an author?

Good Papers badgeAuthor of this paper? Add this badge to your README or page
[![Good Papers](https://www.goodpapers.org/badge/W7222727389.svg)](https://www.goodpapers.org/paper/W7222727389)