Low-Rank Decomposition
For a pretrained weight matrix W, LoRA represents the update as:- A has shape (d, r)
- B has shape (k, r)
- r is much less than min(d, k)
Hyperparameters
The scaling factor is applied as:
h = W x + (alpha / r) * A B^T x.
Merging LoRA into Base Weights
After training, the adapter is merged for inference and compatibility analysis:LoRA Training Flowchart
Integration Points
- ModelLoader: loads base model and freezes all weights except LoRA parameters.
- DatasetRegistry: provides training and validation splits.
- ExperimentTracker: logs hyperparameters, loss curves, and checkpoint paths.
- ArtifactStore: stores adapter checkpoints and merged weights.
- ModelRegistry: receives the final model after VALIDATED status.