ModuLoRA: Finetuning 2-Bit LLMs on Consumer GPUs by Integrating with Modular Quantizers

Junjie Yin, Jiahao Dong, Yingheng Wang, Christopher De Sa, Volodymyr Kuleshov
9/28/2023
10 citations
cs.LGcs.AI
lora-peft-merging

Official code: kuleshov-group/llmtools (726 stars, Python, last commit 2024-05-25). 1 more implementation below.

Abstract

We propose a memory-efficient finetuning algorithm for large language models (LLMs) that supports finetuning LLMs with 65B parameters in 2/3/4-bit precision on as little as one 24GB GPU. Our method, modular low-rank adaptation (ModuLoRA), integrates any user-specified weight quantizer with finetuning via low-rank adapters (LoRAs).

Show full abstract

Our approach relies on a simple quantization-agnostic backward pass that adaptively materializes low-precision LLM weights from a custom black-box quantization module. This approach enables finetuning 2-bit and 3-bit LLMs for the first time -- leveraging state-of-the-art 2-bit QuIP\# quantization and 3-bit OPTQ quantization -- outperforming finetuning that relies on less sophisticated 4-bit and 8-bit methods. In our experiments, \lplora~attains competitive performance on text classification, natural language inference, and instruction following tasks using significantly less memory than existing approaches, and we also surpass the state-of-the-art ROUGE score on a popular summarization task. We release \lplora~together with a series of low-precision models as part of \llmtune, a user-friendly library for quantizing, running, and finetuning LLMs on consumer GPUs.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
kuleshov-group/llmtoolsOfficial726Python–2024-05-25
kuleshov-group/MODULoRA-ExperimentOfficial13PythonMIT2023-12-05

Finetuning Large Language Models on One Consumer GPU in 2 Bits

72675Python, CudaMay 11, 20232 years ago
MIT

Evaluation Code repository for the paper "ModuLoRA: Finetuning 3-Bit LLMs on Consumer GPUs by Integrating with Modular Quantizers". (2023 TMLR Submission)

132Python, CudaSep 10, 20232 years agoMIT

Similar Papers

Cite this paper

@article{yin2023modulora,
  title  = {ModuLoRA: Finetuning 2-Bit LLMs on Consumer GPUs by Integrating with Modular Quantizers},
  author = {Junjie Yin and Jiahao Dong and Yingheng Wang and Christopher De Sa and Volodymyr Kuleshov},
  year   = {2023},
  eprint = {2309.16119},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2309.16119v2}
}

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/2309.16119.svg)](https://codeofpaper.com/paper/2309.16119)

Discussion