Parameter-Efficient Fine-Tuning with Discrete Fourier Transform

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Gao, Ziqi, Wang, Qichao, Chen, Aochuan, Liu, Zijing, Wu, Bingzhe, Chen, Liang, Li, Jia
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866911867846262784
author Gao, Ziqi
Wang, Qichao
Chen, Aochuan
Liu, Zijing
Wu, Bingzhe
Chen, Liang
Li, Jia
author_facet Gao, Ziqi
Wang, Qichao
Chen, Aochuan
Liu, Zijing
Wu, Bingzhe
Chen, Liang
Li, Jia
contents Low-rank adaptation~(LoRA) has recently gained much interest in fine-tuning foundation models. It effectively reduces the number of trainable parameters by incorporating low-rank matrices $A$ and $B$ to represent the weight change, i.e., $ΔW=BA$. Despite LoRA's progress, it faces storage challenges when handling extensive customization adaptations or larger base models. In this work, we aim to further compress trainable parameters by enjoying the powerful expressiveness of the Fourier transform. Specifically, we introduce FourierFT, which treats $ΔW$ as a matrix in the spatial domain and learns only a small fraction of its spectral coefficients. With the trained spectral coefficients, we implement the inverse discrete Fourier transform to recover $ΔW$. Empirically, our FourierFT method shows comparable or better performance with fewer parameters than LoRA on various tasks, including natural language understanding, natural language generation, instruction tuning, and image classification. For example, when performing instruction tuning on the LLaMA2-7B model, FourierFT surpasses LoRA with only 0.064M trainable parameters, compared to LoRA's 33.5M. Our code is released at \url{https://github.com/Chaos96/fourierft}.
format Preprint
id arxiv_https___arxiv_org_abs_2405_03003
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Parameter-Efficient Fine-Tuning with Discrete Fourier Transform
Gao, Ziqi
Wang, Qichao
Chen, Aochuan
Liu, Zijing
Wu, Bingzhe
Chen, Liang
Li, Jia
Machine Learning
Artificial Intelligence
Computation and Language
Low-rank adaptation~(LoRA) has recently gained much interest in fine-tuning foundation models. It effectively reduces the number of trainable parameters by incorporating low-rank matrices $A$ and $B$ to represent the weight change, i.e., $ΔW=BA$. Despite LoRA's progress, it faces storage challenges when handling extensive customization adaptations or larger base models. In this work, we aim to further compress trainable parameters by enjoying the powerful expressiveness of the Fourier transform. Specifically, we introduce FourierFT, which treats $ΔW$ as a matrix in the spatial domain and learns only a small fraction of its spectral coefficients. With the trained spectral coefficients, we implement the inverse discrete Fourier transform to recover $ΔW$. Empirically, our FourierFT method shows comparable or better performance with fewer parameters than LoRA on various tasks, including natural language understanding, natural language generation, instruction tuning, and image classification. For example, when performing instruction tuning on the LLaMA2-7B model, FourierFT surpasses LoRA with only 0.064M trainable parameters, compared to LoRA's 33.5M. Our code is released at \url{https://github.com/Chaos96/fourierft}.
title Parameter-Efficient Fine-Tuning with Discrete Fourier Transform
topic Machine Learning
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2405.03003