Fine-Tuning of Transformer models with Frames
Organizations: University of Wisconsin-Madison · Google DeepMind
Abstract
Parameter-Efficient Fine-Tuning (PEFT) strategies such as Low-Rank Adaptation (LoRA) are effective solutions for fine-tuning large-scale pre-trained models; however, their memory requirements scale with the size of the model, , where is the model's hidden dimension and is the rank. Our proposal, FrameFT, models the parameter update with a sparse coefficient matrix in a Fusion Frame basis. Fusion Frames can be generated algorithmically and shared across model layers, enabling very efficient updates. Only the sparse coefficients of the basis expansion are stored/optimized, reducing the memory footprint. The sparse structure of the coefficient matrix in FrameFT and the sparsity in the Fusion Frames give large compute benefits, and our analysis provides formal convergence results. We evaluate the idea across a suite of supervised fine-tuning benchmarks, focusing on language tasks, but also report application to vision models. Our experiments show that FrameFT achieves performance on par with/exceeding state-of-the-art PEFT techniques, but needs far fewer trainable parameters.
Figures & tables
| Model | Method | Params | SST-2 | MRPC | CoLA | QNLI | RTE | STS-B | Avg. |
|---|---|---|---|---|---|---|---|---|---|
| RoBERTa Base | FF* | M | |||||||
| SMT | K | ||||||||
| LoRA* | M | ||||||||
| K | |||||||||
| AdaLoRA* | M | ||||||||
| FourierFT* | K |
| Method | #params | #toks/sec | |
|---|---|---|---|
| Llama-2-7b | LoRA | 262k | 23.6k |
| DoRA | 262k | 14.1k | |
| SVFit | 1k | 9.0k | |
| FourierFT | 1k | 1.8k | |
| FrameFT | 1k | ||
| Gemma-2-9b | LoRA | 245k | 22.1k |
| Model | Method | #Params | ARC-c | ARC-e | BoolQ | HellaSwag | OBQA | PIQA | RTE | WinoGrande | Avg. |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Llama-2-7b | LoRA | M | |||||||||
| 614K | |||||||||||
| DoRA | M | ||||||||||
| M | |||||||||||
| M | |||||||||||
| FourierFT | K |
| Method | SST-2 | MRPC | CoLA | QNLI | RTE | STS-B | Avg. |
|---|---|---|---|---|---|---|---|
| Shared random mask | |||||||
| Per-layer random mask | |||||||
| Magnitude-based mask | |||||||
| Gradient-based mask |
| Metric | Method | Llama-2-7B | Llama-2-13B | Gemma-2-9B | Gemma-2-2B | Llama-3.1-8B |
|---|---|---|---|---|---|---|
| Training time (min) | LoRA | 238 | 363 | 323 | 126 | 231 |
| FrameFT | 225 | 345 | 301 | 115 | 212 | |
| GPU memory (GiB) | LoRA | 30.1 | 34.8 | 37.8 | 26.9 | 38.2 |
| FrameFT | 29.5 | 34.7 | 37.7 | 26.8 | 37.6 |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | Params | Pets | Cars | CIFAR10 | DTD | EuroSAT | FGVC | RESISC45 | CIFAR100 | Avg. | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| ViT-B | Full finetune* | M | |||||||||
| LinearProbe* | |||||||||||
| LoRA* | K | ||||||||||
| FourierFT | K | ||||||||||
| FourierFT | K | ||||||||||
| FrameFT ( ours ) | K |
| Optimizer | AdamW |
|---|---|
| LR scheduler | Linear schedule with warmup |
| Batch size | 32 |
| Head learning rate | 3E-3 |
| Adapter learning rate | 0.12 |
| Warmup ratio | 0.06 |
| Max. Seq. length | 512 |
| Optimizer | AdamW |
|---|---|
| LR scheduler | Linear schedule with warmup |
| Batch size | 50 |
| Head learning rate | 3E-2 |
| Adapter learning rate | 0.33 |
| Warmup ratio | 0.06 |
| 250.0 |
| Optimizer | AdamW |
|---|---|
| LR scheduler | Linear schedule with warmup |
| Batch size | 128 |
| Learning rate | 0.1 |
| Warmup ratio | 0.03 |
| 200.0 |
| Model | Method | Bases construction time (s) |
|---|---|---|
| Llama-2-7B | Gram-Schmidt | 112.1 |
| QR decomposition | 0.31 | |
| Spectral Tetris | 0.09 | |
| Gemma-2-9B | Gram-Schmidt | 228.8 |
| QR decomposition | 0.64 | |
| Spectral Tetris | 0.21 |
| ARC-c | ARC-e | BoolQ | HellaSwag | OBQA | PIQA | RTE | WinoGrande | Avg. | |
| 10 | 45.9 | 77.4 | 78.75 | 58.01 | 34.0 | 78.67 | 61.01 | 70.0 | 62.97 |
| 100 | 45.47 | 77.1 | 78.53 | 58.28 | 34.4 | 78.78 | 63.89 | 70.71 | 63.40 |
| 200 (default) | 45.22 | 76.93 | 78.62 | 58.08 | 34.2 | 78.62 | 66.06 | 71.19 | 63.62 |
| 400 | 45.47 | 77.31 | 79.2 | 58.32 | 34.0 | 78.62 | 62.45 | 70.32 | 63.21 |
| 600 | 45.56 | 77.02 | 78.99 | 58.31 | 34.6 | 78.73 | 62.82 | 70.56 | 63.32 |
| LoRA | 45.82 | 77.02 | 78.81 | 58.08 | 35.2 | 78.83 | 61.01 | 70.72 | 63.18 |
Parameter-Efficient Fine-Tuning
Parameter-efficient fine-tuning adapts pretrained models by updating small parameter subsets or lightweight modules instead of all weights.
See all 610 papers