LoRA's capacity can be predicted from a dataset's bit count

Predicting LoRA size for any dataset

LoRA's capacity can be predicted from a dataset's bit count

Engram researchers derive a formula for how many bits a rank-r LoRA adapter can store, then validate it by generating synthetic datasets of exactly N bits via arithmetic coding and training adapters on them. Capacity rises roughly linearly at low rank before plateauing, and a single layer stores about 1.5 bits per parameter while 24 layers reach 3.3. The predictions let you pick the smallest rank that fits a real dataset.

It turns out that models with more layers can store more per-parameter: a single layer with LoRA stores just 1.5 bits-per-parameter, while a 24-layer model can store 3.3 bits-per-parameter.
  1. augment_me

    Memorizing a dataset =/= learning a task.

    Cross entropy of a finite dataset measures signal + noise(redundancy, quirks, typos, etc)

    If you have 10MB of math data, the underlying task of learning the reasoning pattern might have low entropy and fit in a much lower LoRA rank, even though memorizing the dataset requires more.

    On any task like GSM, Math500, Openthought3 this would just be massive overfitting.

    Also they assume that the 2M-token context chunking is independent but for example logs are usually not.

    ---

    I think this is good to point out, because the company seems to sell a solution to cram private company wikis into the Lora adapters, so the measures are upper bounds in terms of info due to their assumption of memorization.

  2. Samin100

    The arithmetic coding widget halfway down the blog post is honestly really great. I'm surprised I haven't seen token probabilities expressed as bits of entropy before this.

  3. bee_rider

    Are there related questions along the lines of “what elements could I add to the dataset that would most increase the LoRA size.”

    Is there a metric other than size that can describe a LoRA’s… usefulness? Trueness to the original? (Is trueness to the original a positive or negative in this context, anyway?). Then maybe we can formulate questions about things like <usefulness>/<size>.

More from this day

2026-11-25