EigenTune is a novel Parameter-Efficient Fine-Tuning (PEFT) method inspired by the mathematical properties of model weights. Instead of adding new matrices like LoRA, EigenTune identifies the most important "feature directions" in existing weight matrices (via SVD) and only fine-tunes their magnitudes.
This approach is highly parameter-efficient and aims to preserve pre-trained knowledge by re-calibrating existing features rather than introducing new ones.
- A target
nn.Linearlayer's weight matrixWis decomposed using SVD:W = UΣVᵀ. - The orthogonal matrices
UandV(representing feature directions) are frozen. - A tiny, trainable vector
δof sizer(rank) is introduced. - The fine-tuned weight
W'is implicitly represented asW' = U(Σ + diag(δ))Vᵀ. - The forward pass is efficiently calculated as
y = Wx + (U_r diag(δ) Vh_r)x, avoiding the formation of the fullW'matrix.
pip install eigentune