All work

Research

LoRA ensembles

Cheaper fine-tuning, and whether several small models beat one

I compared full fine-tuning of a language model with LoRA, a far cheaper method, and tested whether a team of four LoRA models beats one at labelling financial news as positive, negative or neutral.

Result

98.89% fewer trainable parameters, same accuracy

Role

Solo project (DSA4213)

Period

Sep 2025

Stack

Python, PyTorch, DistilBERT, Hugging Face Transformers, PEFT, Scikit-Learn, Pandas

In short

Adapting a pre-trained language model to a new task usually means retraining all of its 67 million internal numbers. LoRA freezes those numbers and trains a small add-on instead, a bit like adding sticky notes to a textbook rather than rewriting it.

I compared both on financial news, where the task is to label each sentence as positive, negative or neutral. LoRA trained about 1% as many numbers, used about half the memory, and was just as accurate. Combining four LoRA models into a team made little difference overall, but looking at where the models disagreed showed there was a lot of room for improvement.

What I compared

  1. Full fine-tuning. Retrain all 66,955,779 numbers in DistilBERT, a compact language model. This is the baseline.
  2. LoRA. Freeze the model and train small add-ons inside it, plus the final labelling layer: 740,355 numbers in all.
  3. A team of four LoRA models. Each is trained from a different random starting point, and their answers are combined four ways: a majority vote, a vote weighted by confidence, taking the most confident member, and averaging.

The data is 5,842 labelled financial sentences. Over half are neutral and only 15% negative, so I also report macro-F1. This score weighs all three labels equally, so a model can't do well by mostly answering "neutral".

Results

Full fine-tuning and LoRA

Full fine-tuningLoRA
Numbers trained66,955,779740,355 (−98.89%)
Peak GPU memory1.37 GB0.72 GB
Accuracy79.98%80.41%
Macro-F10.74010.6985

LoRA matched full fine-tuning on accuracy, but its macro-F1 was lower, which means it did worse on the less common labels. The team's majority vote raised macro-F1 to 0.7424, the highest of any method.

The team of four

Accuracy on 1,169 held-out sentences

Full fine-tuning

LoRA

Team of four, best way of combining

Team of four, if the right member were picked every time

The last bar uses the correct answers to pick a member, so it isn't achievable as is. It shows how much better combining could be.
Show as a table
Accuracy
Full fine-tuning79.98%
LoRA80.41%
Team of four, best way of combining80.50%
Team of four, if the right member were picked every time90.59%

The best way of combining the team got one more sentence right out of 1,169 than a single LoRA model. However, for 90.59% of sentences, at least one member had the right answer. The members agreed with each other too often to correct each other's mistakes: on average, any two of them gave the same answer 85% of the time.

How the four models voted on each sentence

All four agree

Three against one

Two against two

No majority

Out of 1,169 sentences. Combining can only change the outcome on the 302 where the models disagree.
Show as a table
Sentences
All four agree867
Three against one189
Two against two106
No majority7

Where the team did help, it was mostly on sentences that a single model found difficult. Compared with one member on its own, the majority vote fixed 53 mistakes and introduced 31. On the sentences it fixed, that member's average confidence was 58%, compared with 82% overall. One example is "Germanwings disaster will not affect image of budget air travel – easyJet", which is labelled neutral but was read as negative by a single model.

Conclusion

For a task like this, LoRA is the better option, since it reaches the same accuracy with about 1% of the trainable numbers and half the memory. A team of four costs four times as much to run and gained one sentence. It would only be worth it with a better way of choosing which member to trust, for example by only using the team when a single model is unsure.

For the technically minded

The base model is DistilBERT-base-uncased. LoRA uses rank 8, α = 16 and dropout 0.1 on the query and value projections of all six attention blocks. That is 147,456 adapter parameters plus 592,899 in the classification head. Full fine-tuning used a learning rate of 2×10⁻⁵ and LoRA 10⁻³, all in FP16 on a Tesla T4. The team members used seeds 123, 456, 789 and 2024 on the same stratified 80/20 split (4,673 / 1,169). The code is on GitHub.

Limits

  • The evaluation split was also used to pick checkpoints, so there's no untouched test set, and no differences were tested for significance.
  • Differences under a point are within random variation: the four team members alone ranged from 78.02% to 80.15% accuracy.
  • The 53 fixed and 31 introduced mistakes compare the vote with one team member, not with the separately trained LoRA model.
  • Averaging is reconstructed from each member's top-label confidence only, not its full probabilities.
  • This was a course assignment for DSA4213.