← Wed, Nov 25 digest

Predicting LoRA size for any dataset

read article ↗ hn thread ↗

Engram researchers present an information-theoretic framework to predict the exact LoRA rank required to fit a dataset by measuring bits of information.

read it It offers rigorous mathematical derivations combining information and random matrix theory with empirical validation for sizing LoRA adapters.

summary

Researchers at Engram propose an information-theoretic approach to predict the necessary rank for LoRA adapters based on dataset size measured in bits. By drawing on Shannon source coding and arithmetic coding, they measure both adapter capacity and dataset entropy relative to a base model. Theoretical capacity bounds, derived using random matrix theory, accurately match empirical results across various real-world datasets. This provides a formal method for provisioning PEFT modules of the minimum size required for a given task.

key points

  1. Adapter capacity scales with rank following a diminishing-returns curve modeled by random matrix theory, contrasting with full fine-tuning.
  2. Arithmetic coding allows converting language model probabilities into exact bit counts to measure dataset size and model capacity uniformly.
  3. Empirical tests across diverse datasets confirm that predicted capacity accurately bounds the minimum LoRA rank required to store a dataset.

who should read it

ML engineers and researchers working on efficient model customization and parameter-efficient fine-tuning.

discussion positive

consensus

Commenters appreciate the mathematical elegance and novelty of framing dataset size and adapter capacity in bits, though they debate practical implications.

pushback

Critics argue that measuring bits required to fit a dataset conflates task learning with brute-force memorization and overfitting.

best comment by 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 …

It highlights that measuring dataset entropy captures noise and memorization rather than true task-learning complexity.

Generated by an LLM from the article and thread. Check the sources before relying on it.