News for hackers. Stuff that matters.
Re:LoRA Learns Less and Forgets Less by chaos_emergent on Friday May 17, 2024 @10:48AM (#40390541)
as a follow up curiosity, has anyone tried using LoRA on the entire model for pretraining to compare regular training model performance to LoRA?
Re:LoRA Learns Less and Forgets Less by buildbot on Friday May 17, 2024 @12:27PM (#40391571)
Yes, I’ve tested this out. It does train, but the scaling doesn’t seem to pan out. It’ll perform slightly better than the number of trainable parameters, but never improves as you scale, so for now there’s no benefit.
Re:LoRA Learns Less and Forgets Less by sp332 on Friday May 17, 2024 @12:10PM (#40391394)
Do you mean leaving most of the model in its initial, randomised state and only training a LoRA?
Re:LoRA Learns Less and Forgets Less by buildbot on Friday May 17, 2024 @12:29PM (#40391600)
I’ve tested specifically this (on my personal time) :) It will train but I found the loss is proportional to the number of trainable parameters. So roughly to hit the performance of a standard 70m param model, you need to train ~70m lora params anyway.
Re:LoRA Learns Less and Forgets Less by cheald on Friday May 17, 2024 @01:25PM (#40392242)
It's worse than that, because lora requires two matrices per layer. At full rank, you have an additional NxN parameters to learn versus full finetuning, where N is min(input_features, output_features).

For example, tuning a layer of 128 in x 256 out is 32k params. Learning a full-rank lora for that layer would be two matrices of 128x128 and 128x256 = 48k params.

Re:LoRA Learns Less and Forgets Less by buildbot on Friday May 17, 2024 @03:18PM (#40393316)
Yeah, exactly. Though the 48k param lora might be as good as a 48k param layer of higher rank, I haven't looked into that case really.
Re:LoRA Learns Less and Forgets Less by cabidaher on Friday May 17, 2024 @10:56AM (#40390640)
This paper [1] does atempt that and reports similar performance compared to conventional pre-training. However, they do start off by doing a normal full-rank training and claim that it is needed to 'warm start' the training process.

[1] https://arxiv.org/abs/2307.05695

Re:LoRA Learns Less and Forgets Less by danielhanchen on Friday May 17, 2024 @01:03PM (#40391974)
Oh yes this paper! The main issue is the scaling of the A and B LoRA matrices. Some papers show scaling the B matrix with larger learning rates (LoRA+) could be beneficial. DoRA for eg learns an auto scaling vector of numbers which tries to alleviate these issues.

Galore might be more equivalent to full pretraining with the gradients being low rank.

Re:LoRA Learns Less and Forgets Less by whimsicalism on Friday May 17, 2024 @02:23PM (#40392790)
i would be shocked if this worked well