Flora: Low-Rank Adapters Are Secretly Gradient Compressors

Yongchang Hao, Yanshuai Cao, Lili Mou
2/5/2024
cs.LGcs.AIstat.ML

No official code found. Best implementation: BorealisAI/flora-opt (108 stars, LGPL-3.0, JAX, last commit 2024-07-01).

Abstract

Despite large neural networks demonstrating remarkable abilities to complete different tasks, they require excessive memory usage to store the optimization states for training. To alleviate this, the low-rank adaptation (LoRA) is proposed to reduce the optimization states by training fewer parameters. However, LoRA restricts overall weight update matrices to be low-rank, limiting the model performance. In this work, we investigate the dynamics of LoRA and identify that it can be approximated by a random projection. Based on this observation, we propose Flora, which is able to achieve high-rank updates by resampling the projection matrices while enjoying the sublinear space complexity of optimization states. We conduct experiments across different tasks and model architectures to verify the effectiveness of our approach.

View on arXivView PDF

Code Implementations(1)

JAXLGPL-3.0

This is the official repository for the paper "Flora: Low-Rank Adapters Are Secretly Gradient Compressors" in ICML 2024.

1085Shell, PythonFeb 5, 20242 years agoLGPL-3.0
deep-learningflaxjaxlarge-language-modelslora+5 more

Similar Papers

Cite this paper

@article{hao2024flora,
  title  = {Flora: Low-Rank Adapters Are Secretly Gradient Compressors},
  author = {Yongchang Hao and Yanshuai Cao and Lili Mou},
  year   = {2024},
  eprint = {2402.03293},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.03293v2},
  journal = {ICML 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.03293.svg)](https://codeofpaper.com/paper/2402.03293)

Discussion