---
id: 18339
lang: en
title: "Engram Figures Out How to Estimate the Right LoRA Adapter Size in Advance, With Error Up to 5%"
published_at: "2026-11-26 18:25:51"
source_name: "TG: @ai_machinelearning_big_data (Machinelearning)"
source_url: "https://t.me/ai_machinelearning_big_data/11444"
canonical_url: "https://news.hamidun.com/en/news/18339"
categories: ["llm", "research"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# Engram Figures Out How to Estimate the Right LoRA Adapter Size in Advance, With Error Up to 5%

> **Краткая суть (BLUF):** LoRA is a lightweight add-on for fine-tuning a model, and its size (the rank) is usually chosen by guesswork: too small and the model underfits, too large and memory and latency grow for nothing. Researchers at Engram propose measuring both the dataset and the adapter in bits, treating the language model as a text compressor. Their pre-training estimate matched the real minimum rank needed to absorb 95% of the data, with an error of up to 5%. That means the rank can be estimated in advance, without dozens of trial runs on a GPU.  • A single attention layer in Qwen3.5-0.8B holds about 378 thousand bits • Across 24 layers, capacity rises from 1.5 to 3.3 bits per parameter • To absorb 10 KB of new data, the model forgets about 12 KB of old data

Anyone who has fine-tuned a model with LoRA knows the ritual. LoRA is a small add-on (an adapter) on top of a ready neural network: instead of retraining all the weights, you train only that add-on. The size of the add-on is set by the "rank" parameter, and people set it to 8, 16 or 64 simply because someone else did so in a tutorial. If the rank is too low, the model won't absorb the dataset. If you take a generous margin, costs grow: the adapter takes up more memory and disk space, and generation becomes slower. Researchers at Engram have published a method that calculates the minimum necessary rank before training even starts, and the result deviates from reality by no more than 5%.

## The model as an archiver

The idea is to convert everything into one unit of measurement: bits. The authors treat a language model as an archiver. The worse the model predicts the text in your dataset, the more new information it contains, and the more bits are needed to "record" that novelty. If the dataset consists of texts the model already knows almost by heart, the adapter has nothing to do there. If it is internal documentation that was not part of the training, there is a lot of information.

On the other side, the adapter itself is measured in the same bits: how much information a single one of its layers can hold. The authors derived this capacity theoretically. There is a caveat: at low ranks, each parameter works at maximum efficiency, then returns diminish and capacity levels off on a plateau. For a single attention layer in the compact Qwen3.5-0.8B, the calculation gave about 378 thousand bits. At low ranks that is 1.3–1.4 bits per parameter, and at full rank only 0.48 bits.

By comparing "how much information is in the data" with "how much the adapter can hold," you can immediately see which rank is needed. You can also tell whether LoRA will suffice at all or whether all the weights will have to be fine-tuned.

## What the experiments showed

Formulas alone cannot describe transformer behavior, because the layers interact nonlinearly. So the team tested the theory in practice. Using the model and reverse arithmetic coding, they generated synthetic data of a strictly defined size in bits and fine-tuned the network on it.

It turned out that the layers reinforce each other. When the adapter is attached to all 24 layers at once, its useful capacity rises from 1.5 to 3.3 bits per parameter. In other words, across the whole network the adapter "packs" data noticeably better than the single-layer calculation suggests.

There is also an unpleasant side. The model forgets roughly as much old information as it memorizes new information, and sometimes slightly more. For example, to absorb 10 kilobytes of new data, it may lose about 12 kilobytes of base knowledge. For anyone fine-tuning a model for a narrow task and hoping to keep its general skills, this is an important warning: there is no free lunch in training.

## How reliable this is

The method was checked on real data: emails, notes and technical documentation. The team also used the open SWE-bench Django, MATH-500, GSM8K, Tulu 3 and MMMLU sets. To estimate the size of large datasets, the model's context was extended to two million tokens via YaRN, and bits were summed across such windows.

The main result: the pre-training calculation matched the real minimum rank needed to absorb 95% of the dataset. The error was no more than 5%. Put simply, if the formula says "you need rank 32," experiment will show a value within five percent of that figure.

The limitations should also be kept in mind. All experiments were conducted on a single compact model, Qwen3.5-0.8B. The authors only expect the approach to transfer to other architectures and sizes, but for now that is an assumption. In addition, "absorbed 95% of the dataset" does not always mean "got better at your task": quality in real scenarios still has to be verified separately.

## What this means in practice

If a team regularly fine-tunes models on internal data, searching for the rank by brute force turns into dozens of unnecessary GPU runs. A bit-based estimate lets you narrow the range before starting and save money. And if the calculation shows there is too much data for an adapter of any reasonable size, that is a signal to consider full fine-tuning. Or at least not to expect miracles from LoRA.

The second takeaway concerns forgetting. If you need to pour a large volume of new knowledge into a model, plan in advance to mix in the original data and check whether base skills have degraded. Details and calculations are published on the Engram blog.

---
- **Первоисточник:** [TG: @ai_machinelearning_big_data (Machinelearning)](https://t.me/ai_machinelearning_big_data/11444)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/18339
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
