HackerPapers

arXiv:2505.24832cs.CL

How much do language models memorize?

John X. Morris, Chawin Sitawarin, Chuan Guo, Narine Kokhlikyan, G. Edward Suh, Alexander M. Rush, Kamalika Chaudhuri, Saeed Mahloujifar

Abstract

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.

arXiv comments
Journal reference
DOI
Subjects
cs.CLComputation and Language

On Hacker News

Linked by 7 identifiable commenters in 8 comments across 8 threads, from Jun 2025 to Sep 2026. Found in 1 HN submission from Jun 2025 to Jun 2025. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments8 threads

  1. LLMs are real, AI is fake 1 comment
    • >Notably, the neural network component behaves like a compressed index of the training data. The "Compression" part is indeed about the model finding order in the training data. But this is not about applying some predefined compression algorithm on it, but by actually learning…

      cpldcpuView on HNParent context

    • > Why is it okay for a model to serve up paraphrased books but verbatim copies from the Pirate Bay are illegal? Because they are not actually memorizing those books (besides few isolated pathological cases due to imperfect training data deduplication), and whatever they spit out…

      kouteiheikaView on HNParent context

    • You definitely want to use 4bit quants at minimum. https://arxiv.org/abs/2505.24832 LLMs usually have about 3.6 bits of data per parameter. You're losing a lot of information if quantized to 2 bits. 4 bit quants are the sweet spot where there's not much quality loss.

      jychangView on HNParent context

    • No, assuming that just because it was in the training data it must be memorized is hare brained. LLMs have limited capacity to memorize, under ~4 bits per parameter[1][2], and are trained on terabytes of data. It's physically impossible for them to memorize everything they're…

      kouteiheikaView on HNParent context

    • This is why GenAI exists. GenAI took the good people, the money, the resources and the scope. Zuck tolerates entertains ideas until he doesn’t. It’s clear blue sky research is going to be pushed even further into the background I agree with most this, I just think we have…

      unconstrastiveView on HNParent context

    • Here's my recommendation: What you're attempting to do, integrating an agent in your business, is difficult. It is however relatively easy to fake. Just setup a quick RAG tool, plug it into your LLM, and you're done. From the outside, the only difference between a quick-n-dirty…

      Xmd5aView on HNParent context

    • There’s a related paper that Meta published a couple of days ago that is worth looking at: > How much do language models memorize? — https://arxiv.org/abs/2505.24832 — https://news.ycombinator.com/item?id=44171363 It shows that models are limited in how much they can memorise…

      JimDabellView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.