AIWiki
Malaysia
Back to all articles
AI Foundationsfine-tuningquantisationLoRA

QLoRA

4 min readUpdated August 2026
QLoRA
Type
Fine-tuning technique
Full name
Quantized Low-Rank Adaptation
Introduced
May 2023 (Dettmers et al., University of Washington)
Key idea
4-bit quantized base model + LoRA adapters
Related
LoRA, quantisation, PEFT, fine-tuning

QLoRA (Quantized Low-Rank Adaptation) is a parameter-efficient fine-tuning technique for large language models introduced by researchers at the University of Washington in May 2023. It reduces the memory required to fine-tune a large language model by freezing a 4-bit quantized version of the base model and training only small low-rank adapter matrices, making it possible to fine-tune a 65-billion-parameter model on a single 48 GB GPU while preserving performance comparable to full 16-bit fine-tuning.[1]

History and Background

QLoRA builds on LoRA (Low-Rank Adaptation), introduced by Hu et al. in 2021, which freezes the weights of a pretrained model and inserts small trainable matrices whose product approximates the weight update. LoRA substantially reduced the compute and storage cost of fine-tuning, but the base model still had to be loaded in full precision, limiting the size of models that could be fine-tuned on consumer hardware.[1]

The QLoRA paper, "QLoRA: Efficient Finetuning of Quantized LLMs" by Tim Dettmers, Artidoro Pagnoni, Ari Holtzman and Luke Zettlemoyer, was released on arXiv on 23 May 2023 and later presented at the NeurIPS 2023 conference. The authors showed that gradients could be backpropagated through a frozen, 4-bit quantized pretrained model into the low-rank adapters, and released an open-source implementation together with the Guanaco family of fine-tuned models. Guanaco models outperformed all previously released open models on the Vicuna benchmark, reaching 99.3% of the performance level of ChatGPT.[1][2]

Technology

QLoRA combines three technical innovations:

  • 4-bit NormalFloat (NF4) quantization — a data type designed to be information-theoretically optimal for the roughly normal distribution of neural network weights, offering better accuracy than standard 4-bit integer or floating-point formats.[1]
  • Double Quantization — the quantization constants themselves are quantized a second time, further reducing memory without degrading performance.[1]
  • Paged Optimizers — optimizer states are managed using memory paging techniques to avoid out-of-memory errors during training.[1][2]
In practice, the base model is loaded in 4-bit via the bitsandbytes library, while the LoRA adapters are trained in higher precision (typically 16-bit). Because only the small adapter weights are updated, the fine-tuned output can be stored as a tiny adapter file that is combined with the base model at inference time. QLoRA is integrated into the Hugging Face Transformers and PEFT libraries, and the reference implementation is available on GitHub.[2][3]

Applications and Impact

QLoRA is widely used for domain adaptation and instruction tuning of large language models in settings where GPU memory is limited. Common applications include fine-tuning models for specific languages, legal or medical domains, customer service, and specialized tasks such as code generation, using consumer-grade GPUs rather than large server clusters. The technique also supports quantised inference, allowing fine-tuned models to run efficiently on lower-end hardware. QLoRA is one of the most widely adopted parameter-efficient fine-tuning methods in the open-source AI ecosystem, and the approach underlies thousands of community models published on Hugging Face.[1][3]

See Also

🇲🇾Malaysian Context

QLoRA has become an important tool for Malaysian AI developers and startups because it allows large language models to be fine-tuned on the limited GPU resources typically available in the country, reducing dependence on large cloud clusters. Local open-source language model projects, such as MaLLaM and Ilmu by Mesolitica, publish Malay-language models on Hugging Face, and parameter-efficient fine-tuning techniques such as QLoRA are commonly used by the Malaysian community to adapt open-weight models to Bahasa Melayu and local languages.[4] The technique is taught in AI training programmes supported by HRD Corp and in university courses, and Malaysian organisations applying QLoRA to data containing personal information must comply with the Personal Data Protection Act (PDPA) when preparing fine-tuning datasets.[5]

References

  1. Dettmers, T., Pagnoni, A., Holtzman, A., Zettlemoyer, L. (2023). QLoRA: Efficient Finetuning of Quantized LLMs. arXiv:2305.14314. https://arxiv.org/abs/2305.14314
  2. GitHub. artidoro/qlora — QLoRA reference implementation. https://github.com/artidoro/qlora
  3. Hugging Face Blog. Making LLMs even more accessible with bitsandbytes, 4-bit quantization and QLoRA. https://huggingface.co/blog/4bit-transformers-bitsandbytes
  4. Hugging Face. mesolitica/mallam-3B-4096 — MaLLaM 3B (Malaysia Large Language Model). https://huggingface.co/mesolitica/mallam-3B-4096
  5. AIWiki Malaysia. PDPA AI Compliance. https://aiwiki.com.my/wiki/pdpa-ai-compliance