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

DevFeed: [N-Gram Memories at Two Bits: Quantizing Lookup Tables in Large Language Models](<https://devfeed.tech/articles/n-gram-memories-at-two-bits-quantizing-lookup-tables-in-large-language-models-94778.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2610.21810>)

Author: Donghoon Han, Minseop Jung, Dong Woo Kwak, SeungJae Lee, Junhoo Lee

Published: 2026-10-22T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [LLM Techniques](<https://devfeed.tech/topics/llm-techniques.md>), [LLM optimization](<https://devfeed.tech/topics/llm-optimization.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>)

Tags: [analysis](<https://devfeed.tech/tags/analysis.md>), [bits](<https://devfeed.tech/tags/bits.md>), [cs-cl](<https://devfeed.tech/tags/cs-cl.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [gaussian](<https://devfeed.tech/tags/gaussian.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [language-models](<https://devfeed.tech/tags/language-models.md>), [large-language-models](<https://devfeed.tech/tags/large-language-models.md>), [lookup](<https://devfeed.tech/tags/lookup.md>), [memory](<https://devfeed.tech/tags/memory.md>), [program](<https://devfeed.tech/tags/program.md>), [records](<https://devfeed.tech/tags/records.md>), [relationships](<https://devfeed.tech/tags/relationships.md>), [restoration](<https://devfeed.tech/tags/restoration.md>), [statistics](<https://devfeed.tech/tags/statistics.md>), [storage](<https://devfeed.tech/tags/storage.md>), [table](<https://devfeed.tech/tags/table.md>), [tables](<https://devfeed.tech/tags/tables.md>)

## AI overview

Conditional Program (CP) compresses lookup tables by storing a short code and local scale for each row, then reconstructing only requested rows with a shared program. Its Gaussian-trellis implementation adds norm restoration and independently decodable row records. Across three trained n-gram memory families, the authors report that its two-bit code reduces output KL by 41-63% versus two-bit round-to-nearest and beats the fitted codebooks and low-rank residual variants they tested at matched storage budgets. For DeepSeek, they report reducing table storage from 203GB to 51GB, allowing larger workloads when the table remains on GPU. These are reported experimental results; the supplied material does not give further setup or limitations.

## Source excerpt

arXiv:2610.21810v3 Announce Type: replace 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.