LoRA (Hu et al., 2021) freezes the pretrained weight and learns only a low-rank update, the product of two thin matrices. Fine-tuning then trains a small fraction of the parameters, and the update can be merged into the weight after training.
Implement lora_delta(A, B, alpha, r), the scaled low-rank update.
B starts at zero so training begins at the pretrained model.Multiply the up-projection by the down-projection, then scale by alpha over r.
No results yet
Run your code to check it against the examples, or submit to run every test.