How much do language models memorize?
John X. Morris, Chawin Sitawarin, Chuan Guo, Narine Kokhlikyan, G. Edward Suh, Alexander M. Rush et al. · 2026 · 115 citationsRead the paper
We propose a new method for estimating how much a model knows about a datapoint and use it to measure the capacity of modern language models. Prior studies of language model memorization have struggled to disentangle memorization from generalization. We formally separate memorization into two components: unintended memorization, the information a model contains about a specific dataset, and generalization, the information a model contains about the true data-generation process. When we completely eliminate generalization, we can compute the total memorization, which provides an estimate of model capacity: our measurements estimate that GPT-style models have a capacity of approximately 3.6 bits per parameter. We train language models on datasets of increasing size and observe that models memorize until their capacity fills, at which point "grokking" begins, and unintended memorization decreases as models begin to generalize. We train hundreds of transformer language models ranging from $500K$ to $1.5B$ parameters and produce a series of scaling laws relating model capacity and data size to membership inference.
What the full text shows
Shown in the lab- GPT-style transformer models have an empirical storage capacity of approximately 3.6 bits per parameter. — 3.6 bits-per-parameter (Models trained in half precision on uniform random data)
- Double descent occurs when the dataset size exceeds the model's capacity in bits. (Synthetic bitstrings and real text datasets)
- Unintended memorization decreases as models begin to generalize once their capacity is filled (grokking). (Datasets of increasing size)
- Membership inference performance follows a scaling law based on model capacity and dataset size. (Transformer models from 500K to 1.5B parameters)
- Setup
- Hundreds of GPT-style transformer models ranging from 500K to 1.5B parameters.
- How
- The researchers used a compression-based method leveraging model likelihoods to separate 'unintended memorization' from 'generalization'. They trained hundreds of transformer models on both uniform random bitstrings and real text to measure information retention in bits.
- Limitations
- Capacity estimates vary slightly based on model architecture and precision.
Summarized by Gemma 4 from the open-access full text · 27 Nov 2026. Read it