Saved in:
Bibliographic Details
Main Authors: Li, Tao, He, Zhengbao, Li, Yujun, Wang, Yasheng, Shang, Lifeng, Huang, Xiaolin
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2409.14396
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913856403537920
author Li, Tao
He, Zhengbao
Li, Yujun
Wang, Yasheng
Shang, Lifeng
Huang, Xiaolin
author_facet Li, Tao
He, Zhengbao
Li, Yujun
Wang, Yasheng
Shang, Lifeng
Huang, Xiaolin
contents Fine-tuning large-scale pre-trained models is prohibitively expensive in terms of computation and memory costs. Low-Rank Adaptation (LoRA), a popular Parameter-Efficient Fine-Tuning (PEFT) method, offers an efficient solution by optimizing only low-rank matrices. Despite recent progress in improving LoRA's performance, the relationship between the LoRA optimization space and the full parameter space is often overlooked. A solution that appears flat in the loss landscape of the LoRA space may still exhibit sharp directions in the full parameter space, potentially compromising generalization. We introduce Flat-LoRA, which aims to identify a low-rank adaptation situated in a flat region of the full parameter space. Instead of adopting the well-established sharpness-aware minimization approach, which incurs significant computation and memory overheads, we employ a Bayesian expectation loss objective to preserve training efficiency. Further, we design a refined random perturbation generation strategy for improved performance and carefully manage memory overhead using random seeds. Experiments across diverse tasks-including mathematical reasoning, coding abilities, dialogue generation, instruction following, and text-to-image generation-demonstrate that Flat-LoRA improves both in-domain and out-of-domain generalization. Code is available at https://github.com/nblt/Flat-LoRA.
format Preprint
id arxiv_https___arxiv_org_abs_2409_14396
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Flat-LoRA: Low-Rank Adaptation over a Flat Loss Landscape
Li, Tao
He, Zhengbao
Li, Yujun
Wang, Yasheng
Shang, Lifeng
Huang, Xiaolin
Machine Learning
Fine-tuning large-scale pre-trained models is prohibitively expensive in terms of computation and memory costs. Low-Rank Adaptation (LoRA), a popular Parameter-Efficient Fine-Tuning (PEFT) method, offers an efficient solution by optimizing only low-rank matrices. Despite recent progress in improving LoRA's performance, the relationship between the LoRA optimization space and the full parameter space is often overlooked. A solution that appears flat in the loss landscape of the LoRA space may still exhibit sharp directions in the full parameter space, potentially compromising generalization. We introduce Flat-LoRA, which aims to identify a low-rank adaptation situated in a flat region of the full parameter space. Instead of adopting the well-established sharpness-aware minimization approach, which incurs significant computation and memory overheads, we employ a Bayesian expectation loss objective to preserve training efficiency. Further, we design a refined random perturbation generation strategy for improved performance and carefully manage memory overhead using random seeds. Experiments across diverse tasks-including mathematical reasoning, coding abilities, dialogue generation, instruction following, and text-to-image generation-demonstrate that Flat-LoRA improves both in-domain and out-of-domain generalization. Code is available at https://github.com/nblt/Flat-LoRA.
title Flat-LoRA: Low-Rank Adaptation over a Flat Loss Landscape
topic Machine Learning
url https://arxiv.org/abs/2409.14396