Skip to main content

Lesson 4 · 13 min

A QLoRA training run, end-to-end

The practical recipe. From dataset → fine-tuned adapter → merged inference.

The minimal viable script

With Hugging Face's transformers, peft, bitsandbytes, and trl, a working QLoRA script is ~50 lines. We won't run it here (no GPU in the browser), but here it is for reference.