MEFT: Memory-Efficient Fine-Tuning through Sparse Adapter

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Hao, Jitai, Sun, WeiWei, Xin, Xin, Meng, Qi, Chen, Zhumin, Ren, Pengjie, Ren, Zhaochun
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866929377345798144
author Hao, Jitai
Sun, WeiWei
Xin, Xin
Meng, Qi
Chen, Zhumin
Ren, Pengjie
Ren, Zhaochun
author_facet Hao, Jitai
Sun, WeiWei
Xin, Xin
Meng, Qi
Chen, Zhumin
Ren, Pengjie
Ren, Zhaochun
contents Parameter-Efficient Fine-tuning (PEFT) facilitates the fine-tuning of Large Language Models (LLMs) under limited resources. However, the fine-tuning performance with PEFT on complex, knowledge-intensive tasks is limited due to the constrained model capacity, which originates from the limited number of additional trainable parameters. To overcome this limitation, we introduce a novel mechanism that fine-tunes LLMs with adapters of larger size yet memory-efficient. This is achieved by leveraging the inherent activation sparsity in the Feed-Forward Networks (FFNs) of LLMs and utilizing the larger capacity of Central Processing Unit (CPU) memory compared to Graphics Processing Unit (GPU). We store and update the parameters of larger adapters on the CPU. Moreover, we employ a Mixture of Experts (MoE)-like architecture to mitigate unnecessary CPU computations and reduce the communication volume between the GPU and CPU. This is particularly beneficial over the limited bandwidth of PCI Express (PCIe). Our method can achieve fine-tuning results comparable to those obtained with larger memory capacities, even when operating under more limited resources such as a 24GB memory single GPU setup, with acceptable loss in training efficiency. Our codes are available at https://github.com/CURRENTF/MEFT.
format Preprint
id arxiv_https___arxiv_org_abs_2406_04984
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle MEFT: Memory-Efficient Fine-Tuning through Sparse Adapter
Hao, Jitai
Sun, WeiWei
Xin, Xin
Meng, Qi
Chen, Zhumin
Ren, Pengjie
Ren, Zhaochun
Computation and Language
Parameter-Efficient Fine-tuning (PEFT) facilitates the fine-tuning of Large Language Models (LLMs) under limited resources. However, the fine-tuning performance with PEFT on complex, knowledge-intensive tasks is limited due to the constrained model capacity, which originates from the limited number of additional trainable parameters. To overcome this limitation, we introduce a novel mechanism that fine-tunes LLMs with adapters of larger size yet memory-efficient. This is achieved by leveraging the inherent activation sparsity in the Feed-Forward Networks (FFNs) of LLMs and utilizing the larger capacity of Central Processing Unit (CPU) memory compared to Graphics Processing Unit (GPU). We store and update the parameters of larger adapters on the CPU. Moreover, we employ a Mixture of Experts (MoE)-like architecture to mitigate unnecessary CPU computations and reduce the communication volume between the GPU and CPU. This is particularly beneficial over the limited bandwidth of PCI Express (PCIe). Our method can achieve fine-tuning results comparable to those obtained with larger memory capacities, even when operating under more limited resources such as a 24GB memory single GPU setup, with acceptable loss in training efficiency. Our codes are available at https://github.com/CURRENTF/MEFT.
title MEFT: Memory-Efficient Fine-Tuning through Sparse Adapter
topic Computation and Language
url https://arxiv.org/abs/2406.04984