π»Training with QLoRA
Fine-tuning models on consumer hardware
Overview

What is QLoRa?
4-bit NormalFloat quantization
Double quantization
Paging with unified memory
Fine-tuning a GPT model with QLoRa
Hardware requirements for QLoRa
GPU
RAM
Hard drive
Software requirements for QLoRa
bitsandbytes
Hugging Face Transformers and Accelerate
PEFT
Datasets
Get all of them
The Python script
Loading and Quantization of a GPT model
Get the model and the associated tokenizer
Loading the model in 4-bit
Preprocessing the GPT model for LoRa
Dataset
Fine-tuning GPT-NeoX-20B with QLoRa
GPT Inference with QLoRa
Conclusion
Credit
Last updated