LLM Library
TrainingAnimated walkthrough
Fine-Tuning with LoRA
Adapting a big model by training a few small matrices.
The idea
LoRA freezes the original weights and learns small low-rank update matrices for chosen layers. This needs far less memory and the adapter can be swapped in and out.
Watch it work
The steps light up one at a time. Use the controls to pause or step through.
- 1Freeze the base weights
- 2Add low-rank A and B matrices to some layers
- 3Train only those
- 4Merge or load the adapter at inference
1/4
Step by step
- 1Freeze the base weights
- 2Add low-rank A and B matrices to some layers
- 3Train only those
- 4Merge or load the adapter at inference
Where it is used
Customising open models on one GPU.
Watch out for
Adapters teach style and tasks well, but add little new knowledge.