QLoRA is all you need (Fast and lightweight model fine-tuning) @sentdex
QLoRA is all you need (Fast and lightweight model fine-tuning)  @sentdex
Uploaded September 2023 | Updated November 2026, 4 days ago
Learning and sharing my process with QLoRA (quantized low rank adapters) fine-tuning. In this case, I use a custom-made reddit dataset, but you can use anything you want.

I referenced a LOT of stuff in this video, I will do my best to link everything, but let me know if I forget anything.

Resources:
WSB-GPT-7B Model: huggingface.co/Sentdex/WSB-GPT-7B
WSB-GPT-13B Model: huggingface.co/Sentdex/WSB-GPT-13B
WSB Training data: huggingface.co/datasets/Sentdex/wsb_reddit_v002

Code:
QLoRA Repo: github.com/artidoro/qlora
qlora.py: github.com/artidoro/qlora/blob/main/qlora.py
Simple qlora training notebook: colab.research.google.com/drive/1VoYNfYDKcKRQRor98Zbf2-9VQTtGJ24k?usp=sharing
qlora merging/dequantizing code: gist.github.com/ChrisHayduk/1a53463331f52dca205e55982baf9930

Referenced Research Papers:
Intrinsic Dimensionality Explains the Effectiveness of Language Model Fine-Tuning: arxiv.org/abs/2012.13255
LoRA: Low-Rank Adaptation of Large Language Models: arxiv.org/abs/2106.09685
QLoRA: Efficient Finetuning of Quantized LLMs: arxiv.org/abs/2305.14314

Yannic's GPT-4chan model: huggingface.co/ykilcher/gpt-4chan
Condemnation letter: docs.google.com/forms/d/e/1FAIpQLSdh3Pgh0sGrYtRihBu-GPN7FSQoODBLvF7dVAFLZk2iuMgoLw/viewform
youtube.com/watch?v=efPrtcLdcdM

Contents:

0:00 - Why QLoRA?
0:55 - LoRA/QLoRA Research
4:13 - Fine-tuning dataset
11:10 - QLoRA Training Process
15:02 - QLoRA Adapters
17:10 - Merging, Dequantizing, and Sharing
19:34 - WSB QLoRA fine-tuned model examples

Neural Networks from Scratch book: nnfs.io
Channel membership: youtube.com/channel/UCfzlCWGWYyIQ0aLC5w48gBQ/join
Discord: discord.gg/sentdex
Reddit: reddit.com/r/sentdex
Support the content: pythonprogramming.net/support-donate
Twitter: twitter.com/sentdex
Instagram: instagram.com/sentdex
Facebook: facebook.com/pythonprogramming.net
Twitch: twitch.tv/sentdex
QLoRA is all you need (Fast and lightweight model fine-tuning)Autoencoders in Python with Tensorflow/KerasEffective DoomerismBetter tracking for your deep learning training - Wandb.ai (Weights & Biases)Sockets Tutorial with Python 3 part 1 - sending and receiving dataMembers only bug.Better Attention is All You NeedGenerative Python Transformer p.2 - Raw Data CleaningVibe Coding Robot Hands w/ Cursor (Inspire RH56DFQ-2L/R)Running our Reinforcement Learning Agent - Self-driving cars with Carla and Python p.5Jev, Yang & Recursive Self Improvement - Happenings in AIWorking with Foreign Keys - Django Web Development with Python p.10
sentdex |

QLoRA is all you need (Fast and lightweight model fine-tuning)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER