QLoRA: Efficient Finetuning of Quantized LLMs

We present QLoRA, an efficient finetuning approach that reduces memory usage enough to finetune a 65B parameter model on a single 48GB GPU while preserving full 16-bit finetuning task performance. QLoRA backpropagates gradients through a frozen, 4-bit quantized pretrained language model into Low Rank Adapters~(LoRA). Our best model family, which we name Guanaco, outperforms all previous openly released models on the Vicuna benchmark, reaching 99.3% of the performance level of ChatGPT while only requiring 24 hours of finetuning on a single GPU. QLoRA introduces a number of innovations to save memory without sacrificing performance: (a) 4-bit NormalFloat (NF4), a new data type that is information theoretically optimal for normally distributed weights (b) double quantization to reduce the average memory footprint by quantizing the quantization constants, and (c) paged optimziers to manage memory spikes. We use QLoRA to finetune more than 1,000 models, providing a detailed analysis of instruction following and chatbot performance across 8 instruction datasets, multiple model types (LLaMA, T5), and model scales that would be infeasible to run with regular finetuning (e.g. 33B and 65B parameter models). Our results show that QLoRA finetuning on a small high-quality dataset leads to state-of-the-art results, even when using smaller models than the previous SoTA. We provide a detailed analysis of chatbot performance based on both human and GPT-4 evaluations showing that GPT-4 evaluations are a cheap and reasonable alternative to human evaluation. Furthermore, we find that current chatbot benchmarks are not trustworthy to accurately evaluate the performance levels of chatbots. A lemon-picked analysis demonstrates where Guanaco fails compared to ChatGPT. We release all of our models and code, including CUDA kernels for 4-bit training.

Paper

References (73)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer enuE8/10 · confidence 4/52023-07-03

Summary

This work pushes the limit of memory-efficient fine-tuning of LLMs by using LoRA over 4-bit quantized LLM. The authors propose NF4, a new data type for normal data. Additionally, efficiency tricks have been proposed, including double quantization, which promotes the quantization of the quantization constant and paged optimizer for long-sequence mini-batches. Combined, QLoRA is able to fine-tune 65B LLMs on a single GPU.

Strengths

1. The fine-tuned models are thoroughly evaluated, and the ablations in the appendix complement the main paper. 2. This work attempts to solve a broader problem in the deep learning community and can do so successfully, unlocking the application of QLoRA on other large-scale deep learning models. 3. The evaluation is thorough with the exact specifications of the compared methods, dataset, hyperparameters and base models.

Weaknesses

1. No serious weakness apart from minor revisions (see questions)

Questions

1. Can the authors re-think the naming convention of double quantization, for example, I had to re-read equations 4 and 5 for better understanding. 2. Can the structure of NF4 data type be directly plugged into 8-bit and higher precision data-types for improved performance, if yes is there any experiment to show the prowess of the NFX data types?

Rating

8: Strong Accept: Technically strong paper, with novel ideas, excellent impact on at least one area, or high-to-excellent impact on multiple areas, with excellent evaluation, resources, and reproducibility, and no unaddressed ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

3 good

Presentation

3 good

Contribution

4 excellent

Limitations

Yes

Reviewer uL2c7/10 · confidence 5/52023-07-06

Summary

The problem addressed in this paper is the high cost associated with fine-tuning large models, such as the standard fp16 LLaMA65B model, which requires over 780G of memory for parameter fine-tuning. The proposed solution is QLoRA, which consists of three main components: NF4 Quantization (4-bit quantization), Double Quantization, Paged Optimizers.

Strengths

The authors have open-sourced all the training code, which will benefit the community in further researching Large Language Models (LLMs). This paper will have significant implications for the community. The motivation behind this paper is very clear. The techniques proposed are innovative. This paper is well-written.

Weaknesses

The authors are encouraged to discuss the inference efficiency of QLoRA.

Questions

see Weaknesses

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

5: You are absolutely certain about your assessment. You are very familiar with the related work and checked the math/other details carefully.

Soundness

3 good

Presentation

3 good

Contribution

4 excellent

Limitations

See Weaknesses

Reviewer pPZQ7/10 · confidence 3/52023-07-07

Summary

This paper proposes a method for efficient finetuning large language models. To address the main bottleneck from memory, the authors quantize the model to 4-bit along with standard LoRA adapter. With the proposed method, the authors demonstrate the possibility of finetuning large language model on single GPU with competitive performance.

Strengths

The main strength lies in the system this paper provides. Quantization and adapter fine-tuning are both standard techniques when it comes to efficiency. However, this paper opens up the possibility of finetuning large language model under reasonable cost. Such possibility is important for the community to study large language model and pursue new research ideas.

Weaknesses

From Table 3, we observe the performance gap increase the model size increase. This could be concerning, especially when the largest model is 11B. It would be helpful for the community to understand when or to what scale does the proposed method works.

Questions

(1) Quantization and efficient finetuning are generally speaking orthogonal techniques. Is there any specific reason for the choice of LoRA. Can the proposed method be applied on top of other efficient finetuning method? (2) The authors mention paged optimizer as a major contribution. Can the authors provide more details on the improvement resuling from the paged optimizer?

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

3 good

Presentation

2 fair

Contribution

3 good

Limitations

The authors provide discussion on the limitation and potentially negative impact.

Reviewer hHMr9/10 · confidence 5/52023-07-11

Summary

This article provides a novel way to finetune 4-bit LLMs for efficient finetuning and serving. QLORA, the proposed method, uses a number of innovations to save memory without sacrificing performance. The authors show that QLORA can be used to finetune a 65B parameter model on a single 48GB GPU, and that it performs well in academic and instruction finetune datasets. QLORA is a significant contribution to the field of LLM finetuning and quantization.

Strengths

1. The QLORA paper conducted extensive evaluations on a wide range of datasets, including both academic datasets and the more recent instruction-following datasets. 2. QLORA introduced a novel data type called 4-bit NormalFloat (NF4) for quantization. 3. QLORA can finetune 65B parameter models on a single 48GB GPU, which is significantly more efficient than traditional finetuning methods. 4. QLORA provides good flexibility, as it supports a variety of LLMs, including LLaMA and T5. This suggests that the method can be used to finetune models of different sizes, from small models to large models. 5. QLORA is open sourced with all of the models and code, making it easy for others to use and reproduce the results.

Weaknesses

I wish the authors had discussed the impact of their work on the serving cost of large language models (LLMs). LLM finetuning is relatively inexpensive, and it is good that this work makes it even more affordable. However, the serving cost (in terms of energy consumption and carbon emissions) is much higher than the pretraining cost, especially when there are hundreds of millions of users. This work has the potential to significantly reduce the serving cost of LLMs, which would be a major benefit for both the environment and the bottom line. Here are some specific points that could be discussed: a. The authors could estimate the potential savings in energy consumption and carbon emissions that could be achieved by using their method to serve LLMs in 4-bit rather than 8-bit or 16 bit. b. They could also discuss the potential impact of their work on the economics of LLMs. For example, if the serving cost is significantly reduced, it could make LLMs more affordable for businesses and organizations. c. Finally, the authors could discuss the challenges that still need to be addressed in order to make their method practical for large-scale deployment.

Questions

1. Can you please replace figure-3 with the table of numbers for Winogrande, HellaSwag, PiQA, Arc-Easy, and Arc-C? 2. Can you please include the ablation studies on the learning-rate / schedule /hyperparameters that you have done in the appendix? Do all the finetuning experiments shared the same recipt?

Rating

9: Very Strong Accept: Technically flawless paper with groundbreaking impact on at least one area of AI/ML and excellent impact on multiple areas of AI/ML, with flawless evaluation, resources, and reproducibility, and no unaddressed ethical considerations.

Confidence

5: You are absolutely certain about your assessment. You are very familiar with the related work and checked the math/other details carefully.

Soundness

4 excellent

Presentation

4 excellent

Contribution

4 excellent

Limitations

The authors discussed the limitations well in the paper.

Program Chairsdecision2023-09-21

Decision

Accept (oral)

© 2026 NYSGPT2525 LLC