In one line: On one model (Qwen3.5-0.8B), a closed-form capacity for a rank-r LoRA on one matrix (about 1.40 bits per parameter at low rank, 0.48 at full rank) matches the post's own v_proj runs within 0.3% from rank 64 up; adapting more layers stores more per parameter (1.65 to 2.85 bits at the 16k steps trained, 3.29 extrapolated); and on 15 real datasets the rank read off its synthetic-data curve was within 5% of the measured rank for 5 and above it for 13 (median error 12%), where "fit" means memorised to 95% after extrapolating training to infinity.
How far to trust it: Believe the single-matrix theory: a clean second-order derivation, and the authors' own data land on it. Treat the multi-layer numbers and the real-dataset match as one model's, single runs, extrapolated: the infinite-training capacities and the 95% shares come from three-parameter curves fitted to three or four training budgets, the rank prediction errs high (safely) by a median 12% rather than within the 5% the text claims, and fitting a dataset here means memorising it, not learning its task. The evidence, judged.
The idea in one sentence: measure a dataset and an adapter in the same unit, bits (the dataset's code length under the base model, and how far an adapter of rank r can push that code length down), and the LoRA rank a dataset needs can be read off a capacity curve instead of found by a sweep; the post derives that curve for one matrix, measures it for many, and checks it on 15 real datasets, all on Qwen3.5-0.8B.
You need: what LoRA trains and what its rank is (PEFT); that a model's loss in bits is the length of the code it would give the text, and how arithmetic coding turns probabilities into that code (Information theory, sections 2 and 7); singular values and the best rank-r approximation (Linear algebra, section 10).
New terms: code length of a dataset (its total negative log-likelihood in bits, −Σ log2 pθ(token | earlier tokens), under the frozen base model θ); bits stored (how much an adapter lowered the training set's code length); capacity C(r) (the bits a rank-r adapter stores when trained to convergence on data it cannot fully hold); bits per parameter (capacity divided by the adapter's trainable numbers, r(m + n) for one m × n matrix); reverse arithmetic coding (decoding random bits into text with the model's probabilities, so the text's code length is known exactly); infinite-training capacity (the post's extrapolation of a training curve to unlimited steps).
Engram trains adapters per user, so it wants the smallest LoRA that holds a given dataset. Smaller adapters load faster, serve faster and store cheaply; the open question is when a dataset is big enough to need a bigger one. Practice sets the rank by recipe or by sweep: LoRA "underperforms full-finetuning on larger datasets", but nobody can say in advance where that starts (in the article). The post's answer is to measure both sides in bits (in the article). The PEFT page has the qualitative version of this argument from Thinking Machines (LoRA is fine until the data exceeds its capacity, LoRA against full fine-tuning); this post tries to make it a number.
Everything is measured on one model, Qwen3.5-0.8B (AdamW with cosine decay, LoRA's α fixed at 256 for every rank) (in the article).
A language model is a compressor, so a dataset's size under a model is its total negative log-likelihood in bits, and an adapter's storage is how far training lowered it. The source-coding view is owned by the Information theory page; what the post adds is using it as a ruler. Its Figure 1 shows a rank-6 LoRA on layer 23's MLP that, at step 3,981, has stored 6.67 KB of a 6.75 KB dataset (98.8%): the loss curve read as bits (in the article).
To measure an adapter's capacity, the post needs datasets of exactly known size, and makes them by running arithmetic coding backwards. Arithmetic coding turns text into one number in [0, 1) using the model's probabilities; decoding N random bits with the same probabilities gives text whose code length under the model is N bits, a sample from the model itself (in the article). The post's widget decodes 64 random bits with SmolLM2-135M into 23 tokens of a children's story whose code length is 70.3 bits: slightly more than 64, because tokens are indivisible. In it "queen" costs eleven bits and "little" two (in the article). How arithmetic coding works is animated on the Information theory page, section 7.
Why sampled data matters for the theory: text drawn from the model has no pattern the model does not already know, so everything an adapter learns from it is memorised noise. That makes capacity on such data a worst case for capacity per parameter, as Appendix A says (in the article), and it is also why the real-data predictions later come out high.
src/recompute.py) agrees with this closed form within 0.3% from rank 4 up and 0.42% at rank 1.For a rank-r adapter on one m × n matrix, the post derives C(r) ≈ E[Σi≤r σi(Z)²] / (2 ln 2) bits, where Z is an m × n matrix of independent standard normals. The argument, in four moves: near the base weights the log-likelihood of the training data is a downward bowl, fixed by its gradient and curvature; with data sampled from the model, the curvature is the Fisher information and the gradient is pure noise with that same covariance; whitening the gradient by the Fisher turns it into the Gaussian matrix Z; and the best rank-r step towards Z is its truncated SVD (Eckart-Young, owned by the Linear algebra page), which gains half the sum of the top r squared singular values in nats (in the article).
Two limits make it concrete for Qwen3.5-0.8B's value projection (512 × 1024, checked against the model's config: 2 key-value heads of 256 on a 1,024-wide stream). At low rank each direction catches a top singular value, about (√m + √n)², so capacity grows by 2,153 bits per rank, which is 1.40 bits per LoRA parameter. At full rank the sum is all of ‖Z‖², mn on average, so C = mn/(2 ln 2) = 378,194 bits, the classical Wilks result for fitting mn free parameters to noise, and only 0.48 bits per parameter because LoRA at rank 512 trains 786,432 numbers for a 524,288-entry matrix (in the article). For up_proj (1024 × 3584) the low-rank figure is 1.32.
Predict, then drag: going from rank 128 to rank 256 doubles the adapter's parameters. How much more does it store?
The measurement agrees. The post trained a LoRA at seven ranks on that matrix, on a synthetic dataset far bigger than any of them can hold, and read capacity from the final loss. Recomputed from Figure 3's data, the measured bits are within 0.3% of the authors' theory curve from rank 64 to 512, 2.1% above it at rank 16 and 7.5% above at rank 4 (the figure). The low-rank excess is the only visible gap; the post's text and its legend still quote the theory's 1.39 to 1.40 bits per parameter there, while the measured rank-4 run stored 1.46.
Second order. For a perturbation δ of the matrix's entries, log pθ+δ(x) ≈ log pθ(x) + δ⊤g + ½ δ⊤Hδ, with g the gradient (the score) and H ≈ −F, the Fisher, when the data come from the model. The gain to maximise over rank-r updates is Q(δ) = δ⊤g − ½ δ⊤Fδ.
The assumption. The Fisher of an m × n matrix is an mn × mn matrix; the closed form needs it to factor as a Kronecker product F1 ⊗ F2 (the K-FAC approximation). The post says plainly that this "is not generally true of the Fisher" and rests on the empirical match (in the article). With it, substituting Δ̃ = F11/2ΔF21/2 gives Q = −½‖Z − Δ̃‖²F + ½‖Z‖²F with Z = F1−1/2GF2−1/2.
Eckart-Young. The best rank-r Δ̃ is Z's truncated SVD, so the gain is ½ Σi≤r σi(Z)² nats. The whitened gradient has mean zero and identity covariance, approximately Gaussian by a central limit argument, hence the formula in bits.
Closed form. For large matrices the squared singular values over n follow the Marchenko-Pastur law with ratio γ = m/n. Substituting λ = 1 + γ + 2√γ cos φ gives the curve in closed form: r(φ) = m[(1 + γ)φ − 2√γ sin φ − 2(1 − γ) arctan((1 − √γ)/(1 + √γ) · tan(φ/2))]/(2πγ) and C = mn/(2 ln 2) · (φ − sin φ cos φ)/π; solve the first for φ (it increases with φ) and read the second. The page's widget does exactly this by bisection. The post says the approximation is within 0.4% of the exact expectation at 512 × 1024 (in the article); our Monte Carlo agrees (0.42% at rank 1, 0.3% or less above).
Per parameter. Dividing the low-rank line by r(m + n) gives (1/ln 2)(½ + √(mn)/(m + n)): 1.4014 for 512 × 1024 and 1.3211 for 1024 × 3584, the post's 1.40 and 1.32 (in the article).
Adapting several matrices at once stores more than the sum of their single-matrix capacities, and the gap grows with depth. At rank 4, one v_proj stores 1.46 bits per parameter; LoRA on layer 23's MLP (gate, up and down) 1.76; on the top 2, 4, 8 and 16 MLPs 2.39, 2.56, 2.73 and 3.22; on all 24, 3.29, against a single-matrix theory of 1.30 (in the article). The theory has no account of this: the post calls it "complementary interactions" and leaves it open (in the article). With LoRA on all 186 linear modules at rank 4 (2.71M parameters) the figure's data gives 3.38.
Those numbers are extrapolations to infinite training. Deep adapters keep learning slowly for a long time, so the post fits bits(T) = bits∞ · Tc/(Tc + τc) to each run and reports bits∞ (in the article). In Figure 4 each fit has three parameters and four observed budgets (2k, 4k, 8k and 16k steps). At the 16k steps actually trained the same rows read 1.65, 2.10, 2.40, 2.55, 2.82 and 2.85: the extrapolation adds 7% to 15%, most for the deepest. Super-additivity survives without it (one MLP to 24 MLPs is 1.72 times per parameter observed, 1.87 extrapolated), but "3.3" is a fitted number, not a measured one.
Our refit reproduces the extrapolation, independently. The same curve, least-squares fitted to the four observed end points of each row (src/recompute.py), gives 1.76, 2.44, 2.55, 2.74, 3.22 and 3.31 against the post's 1.76, 2.39, 2.56, 2.73, 3.22 and 3.29. One residual degree of freedom per fit is little to test the curve's shape with; the post gives no error bars.
Per parameter, deep adapters also gain with rank, the opposite of one matrix. On the top four MLPs (Figure 5), capacity is 14.6 KB at rank 1, 32.4 at 2, 71.3 at 4 and 163.9 at 8: 2.11, 2.35, 2.58 and 2.96 bits per parameter, rising, where the single-matrix curve falls with rank. Every rank stores a small dataset whole and saturates on a large one (rank 8 holds 164 KB of a 556 KB set) (in the article). Training budget matters as much as rank at small step counts: a rank-1 adapter on the same four layers holds 5.55 KB of a 111 KB set after 50 steps and 12.9 KB after 1,600 (in the article).
Measured on fresh samples from the base model, every bit an adapter learns costs about one bit, or more, of what it already predicted. The rank-512 v_proj run of Figure 7 learned 45.8 KB and forgot 45.8 KB (in the article). For one matrix this is the theory's own prediction: on new samples the gradient averages zero, so the step that gains ½Σσ² on the training set loses ½Σσ² on fresh data (in the article).
Away from one matrix the exchange rate is above 1, not 1. The figure's data fits a slope of forgetting against learning per family: 0.97 for v_proj (95% interval 0.94 to 1.00, 49 runs), 1.11 for layer 23's MLP, 1.20 for the top 1 to 24 MLPs and 1.41 for the top four MLPs. The text's "the same or more" covers this; its example of learning 10 KB and forgetting 12 KB is the middle of that range (in the article).
What "forgetting" means here is narrow. It is the rise in code length of new text the base model itself would write, measured after training on other such text: the cost of memorising noise. Whether learning a real domain (new facts, a new style) trades bits one for one with what the model knew is the question a Hacker News commenter asked and the post does not test (Responses); forgetting during real continued pretraining is measured on the Data mixing page.
A real dataset's size is its code length under the same base model, measured after stretching Qwen's context to 2M tokens with YaRN (owned by Positional encodings) and summing over 2M-token windows when it is longer (in the article). Windows ignore what one window could tell the next, so the size is a slight overestimate. Sizes run from 1.14 to 3.41 bits a token: MATH-500 1.14, GSM8K 1.41, a developer-documentation site 1.40, Django's source 1.74, Engram's internal emails 2.47, Tulu 3 2.89, multilingual MMLU 3.33, No Robots 3.41 (Figure 9; each dataset's tokens and bits are in the table below; the first 100 MB of English Wikipedia, enwik8, is 27M tokens and 76.2M bits, 2.82 a token).
The test: read the rank off the synthetic curve, then train LoRAs on the dataset itself. The post trains at ranks around the prediction and reports the measured rank as the smallest that stores 95% of the dataset (in the article), for LoRA on layer 23's MLP (8 datasets) and on every linear module (7). It calls the match "extremely accurate" and the error within 5% (in the article).
Recomputed from Figure 8's own data, the prediction is within 5% for 5 of the 15 points and too high for 13: GSM8K 95.8 against 95.5, swebench-django 232 against 227, but Harvey's larger workspace 413 against 282 (47% high), Engram's research notes 3.31 against 2.38 on all linear modules (39% high), and Engram's 22k-token emails 3.45 against 4.26 (19% low, the one clear under-prediction). The median error is 12%. On the post's log-scale figure, spanning ranks 2 to 413, every point looks close to the line, which is what its caption reads; in rank terms the predictions err high, which is the safe direction for provisioning and fits the post's own caveat that data sampled from the model gives worst-case estimates (real text shares structure the adapter can store cheaply; sampled text is pure noise to it).
Two things the 95% rests on. First, the shares stored are extrapolated to infinite training, like Figure 4's: the longest budget was 4k steps for 11 datasets, 8k for three and 16k for multilingual MMLU, and at that step the runs shown had stored 70.7% to 98.9% of their dataset. The shares that decide the measured rank are the fitted values: LoRA on every linear module of Qwen at rank 2 had stored 71.9% of swebench-django after 4k steps, and is counted as storing 99.3%. Second, the "measured rank" is itself interpolated between the ranks trained, and in 6 of the 15 points it lies outside them: Harvey's larger workspace was trained at ranks 500 and 700 and reported as 282, multilingual MMLU at 16 and 32 and reported as 42.5. The post does not say how the fractional rank is computed.
"Observed" is the share of the dataset stored at the last training step of the run shown in the post's panel (its rank and steps given); "extrapolated" is that run's fitted share at infinite training. Errors are predicted over measured, minus 1. "At most" marks the two the post flags as upper bounds. The All-linear panel measures three of the same datasets at 10% to 16% more bits than the mlp[23] panel (swebench-django 4.85M against 4.40M with the same 2,523,389 tokens; Engram MD 5.79M against 5.02M; Harvey SM 7.64M against 6.56M); the post does not explain the difference.
What holds up. The single-matrix theory is a standard second-order argument with its one strong assumption (a Kronecker-factored Fisher) stated, two limits that check by hand (1.40 bits per parameter at low rank, Wilks' mn/(2 ln 2) at full rank), and a closed form we recomputed independently: Monte Carlo and closed form agree within 0.42%, and the post's measured v_proj runs sit within 0.3% of it from rank 64 to 512. The figures are unusually honest about their data: every point in the interactive figures carries its run, rank, steps and dataset size, which is what made the recomputations on this page possible. The units are right (the post's KB is 1,000 bytes; every bits-per-parameter figure recomputes from its parameter count, for example 23.9 KB × 8,000 / 196,608 = 0.97). The rank predictions err on the safe side: 13 of 15 too high.
Where the evidence is weaker than the wording.
Verdict. Believe the single-matrix capacity curve and the method (measure in bits, compare with a curve measured on sampled data); they are sound and cheap to reuse. Treat the deep-adapter numbers and the real-dataset match as one model's single runs leaning on extrapolated training curves, and read the predicted rank as a conservative estimate of what memorising the dataset needs, a median 12% and at most 47% above what training found in the post's own data, not as accurate to 5%.
Hacker News, submitted 24 November 2026: 131 points and 13 comments (read 30 November). Besides praise for the arithmetic-coding widget and for the forgetting result, the substantive comments are the two below; nobody in the thread replicated a number, and the authors did not reply (thread). No blog rebuttal, replication or paper responding to the post was found by 30 November; two news summaries (AlphaSignal and a personal blog) restate it without new analysis.
A dataset's code length counts signal and noise (redundancy, quirks, typos); a math task's reasoning may fit a far smaller rank than memorising the set, so the post's ranks are upper bounds, and 2M-token windows assume independence logs do not have. A reply: the post never claims to separate task bits from noise.
The forgetting-equals-learning result was shown on data sampled from the base model; asks whether it holds for genuinely new domain knowledge. Unanswered in the thread (read 30 November).
A QLoRA trainer adds an opt-in flag that measures the training set in bits before step 1 and logs capacity used. Its module reports the additive per-matrix theory as a floor and up to 2.5 times it as a ceiling, because the multi-layer bonus has no theory and was measured on one model. Merged 27 November; no review comments.
No follow-up from Engram, no paper citing the post, and no independent replication were found. The one adoption is the exl3-qlora port above (merged 27 November), which keeps the post's numbers as an additive floor and a 2.5 times ceiling. An automated literature-review issue on a GitHub interpretability project summarised the post without new analysis. Not found: any mention in Latent Space's AINews (searched; the lead's note says the post was picked there, unconfirmed here).
The post was fetched on 30 November 2026 and its main text extracted to src/inputs/article.txt (4,353 words, 19 minutes at 230 words a minute, appendix included; KaTeX maths kept as TeX, sidenote references kept as lines); every "in the article" link is a text fragment or heading id checked against it at build time. Its structured data gives published and modified both as 24 November 2026; the Wayback Machine lists a copy of 24 November 22:35 UTC (a minute after the Hacker News submission at 22:34), which could not be downloaded from this sandbox, so no version diff was made.
The figures' data is embedded in the post's page as JSON (one script chunk, parsed as data and never run); src/transcribe_figures.py keeps the numbers this page uses in src/inputs/figures.json, without dataset samples, and src/recompute.py recomputes every derived number on the page into src/inputs/recompute.json, which the page's checks compare with the prose and the widget. The post states no licence, so its figures are redrawn here from that data, credited in each caption. Model shapes were checked against Qwen/Qwen3.5-0.8B's config.json (revision 2fc0636). The Hacker News thread was read through its public API; the exl3-qlora pull request and its training/lora_capacity.py were read on GitHub (commit 57fd219, 28 November).
Every link opens in a new tab; links checked 30 November 2026. Reading time of the resources below: 2h 50m.
Engram research team (Engram; no individual authors named): The post itself (Engram blog (engram.com), published 24 November 2026). Its figures are interactive: hovering a point shows the run behind it. No code, data or weights are released; the figures' data is embedded in the page.
(19 min)
131 points, 13 comments (read 30 November 2026), submitted 24 November 2026.
(5 min)
augment_me, with replies by XTXinverseXTY, 25 November 2026, critique: A dataset's code length counts signal and noise (redundancy, quirks, typos); a math task's reasoning may fit a far smaller rank than memorising the set, so the post's ranks are upper bounds, and 2M-token windows assume independence logs do not have. A reply: the post never claims to separate task bits from noise.
(3 min)
keel_dev, 25 November 2026, question: The forgetting-equals-learning result was shown on data sampled from the base model; asks whether it holds for genuinely new domain knowledge. Unanswered in the thread (read 30 November).
(1 min)
UnstableLlama (exl3-qlora), 27 November 2026, port: A QLoRA trainer adds an opt-in flag that measures the training set in bits before step 1 and logs capacity used. Its module reports the additive per-matrix theory as a floor and up to 2.5 times it as a ceiling, because the multi-layer bonus has no theory and was measured on one model. Merged 27 November; no review comments.
(10 min)
Morris et al., 2025 (third-party): The full-training baseline the post contrasts with: GPT-style models store about 3.6 bits per parameter, linearly in parameter count, measured on random data.
(40 min)
Tan, Du and Feng, July 2026 (third-party; not cited by the post): An earlier measurement of the same quantity with random token sequences: LoRA stores about 2 to 3.4 bits per trainable parameter, less than full fine-tuning. Close to the post's multi-layer numbers, with a different setup.
(40 min)
Schulman and Thinking Machines Lab, 2025 (third-party): Where the capacity question came from: LoRA matches full fine-tuning until the dataset exceeds its capacity, estimated there from about 1 bit per token.
(30 min)
Wilks, 1938 (third-party): The full-rank limit: fitting k free parameters to noise raises the log-likelihood by k/2 nats on average, so mn/(2 ln 2) bits for an m x n matrix.
(20 min)
Qwen team (maker), revision 2fc0636: Checked here: hidden size 1,024, MLP 3,584, 24 layers (every fourth full attention), 2 key-value heads of 256, so v_proj is 512 x 1024.
(2 min)
Owns LoRA: the update BA, the rank and alpha conventions, where to put adapters, and LoRA against full fine-tuning (the capacity argument this post makes quantitative).
The paper page, with a LoRA trained in the browser and the rank tables of the original paper.
LoRA on a 4-bit base, the setting of the exl3-qlora port.
Owns code length as a model's total surprise and animates arithmetic coding (section 7), the two tools the post's units rest on.
Owns the SVD and Eckart-Young (section 10): the best rank-r matrix keeps the top r singular values, the step that gives C(r).
Maximum likelihood and the score function, behind the second-order argument and Wilks' limit.
Owns YaRN, which the post uses to stretch Qwen's context to 2M tokens before measuring a dataset.
The Qwen line; Qwen3.5-0.8B is the only model the post measures.
Forgetting during continued pretraining, the measured counterpart of the post's learning-equals-forgetting result.
This page is one of the Articles: articles worth a page of their own, each with its argument, its evidence judged and what others replied.