Engram published an article titled “Predicting LoRA size for any dataset,” in which they proposed calculating the minimum rank of a LoRA adapter before launching training. The method converts both the dataset and the adapter into a common unit of measurement—bits: the size of the data is evaluated as the negative log-likelihood under the base model, while the adapter's capacity is assessed through the singular values of a random matrix. Testing on Qwen3.5-0.8B showed a discrepancy of approximately 5% between the predicted and actual rank.



What happened
The article was published on November 24, 2026, on Engram's website (engram.com/blog/lora-size). The method measures the size of the task as the negative log-likelihood of the dataset under the base model, while the capacity of a LoRA adapter of rank r is evaluated by the formula C(r) ≈ E[σ₁²+...+σᵣ²]/(2 ln 2) bits, where σᵢ are the singular values of a random matrix of the adaptable weight's dimension. At low ranks, capacity grows approximately linearly, at about 1.3–1.4 bits per parameter, while at full rank it plateaus at around 0.48 bits per parameter. For a v_proj layer of size 512×1024 in Qwen3.5-0.8B, the calculation yielded approximately 378,000 bits. Testing on Qwen3.5-0.8B using the GSM8K, MATH-500, Tulu 3, and SWE-bench datasets showed a discrepancy of approximately 5% between the predicted and actual rank. The article also describes a “law of conservation”: during fine-tuning, the model forgets approximately as many bits as it memorizes—for every 10 KB of new data, about 12 KB of old data is forgotten.
Context
LoRA rank is a standard fine-tuning parameter that has traditionally been selected heuristically: by trial and error with values of 8, 16, 32, and 64, launching trial training runs for each. Each such run costs GPU hours, and in multi-tenant systems like S-LoRA, every extra adapter parameter also increases storage and transmission costs. Before Engram, there was no common unit in which one could compare “how much information is in the task” with “how much the model can write into an adapter of a given rank.”
Why this matters for the industry
The method replaces part of the heuristic rank search with a single calculation: one run of dataset likelihood evaluation under the base model provides the target adapter size in bits before training starts. This reduces the cost of experiments, memory usage, and disk space, which is particularly important in multi-tenant systems like S-LoRA. For products, a ready-made scenario emerges—a “LoRA rank calculator” at the entry point of the fine-tuning pipeline, which immediately displays the target rank. If the formula is confirmed on other model families and sizes, and Engram releases code or an API, the calculated rank could become a standard step in fine-tuning pipelines.
Why this matters for users
The adapter size can now be estimated in advance with a single run of dataset likelihood evaluation, rather than being selected “by eye” through a series of trial trainings. This saves time and computation for those who wish to reproduce the calculation themselves before launching fine-tuning. However, the “law of conservation” from the article should be considered: fine-tuning on new data partially erases old knowledge, so a small rank does not guarantee that the model will forget nothing—it only limits the volume of new information that can be written.
What is currently unknown / limitations
The material was published as an article rather than a reproducible artifact: there is no public code, API, or description of the NLL evaluation hyperparameters and validation protocol. The accuracy of approximately 5% was obtained on one compact model, Qwen3.5-0.8B, and four datasets, so transfer to other families, model sizes, and task types is not yet confirmed. The method cannot be used directly in production—its practical utility is currently limited to the research and experimental loop.
Sources
- Predicting LoRA size for any dataset — Engram Blog
- Engram's Bit-Based Formula Predicts the Right LoRA Rank Without Costly Training Runs — AlphaSignal
- Predicting LoRA size for any dataset — Grafy News
Author
Look at AI, editorial team
