Fine-Tuning LLMs: Quantization, LoRA and QLoRA with Llama 2 and Gemma
Learn how to fine-tune large language models on your own data. You start with the theory every interview asks about: quantization (full vs half precision, scale and zero point, PTQ vs QAT) and LoRA/QLoRA (low-rank matrix decomposition and rank). Then you fine-tune Llama 2 7B in Google Colab with QLoRA and SFTTrainer, look at 1-bit LLMs (BitNet b1.58), fine-tune Google's Gemma on a quotes dataset, build a no-code RAG pipeline you can call from Python, and fine-tune a model in the cloud with a few custom examples.
Built on the publicly available Fine-Tuning LLMs: Quantization, LoRA and QLoRA with Llama 2 and Gemma by Krish Naik, via freeCodeCamp.org — watch the original. Adapted by Oreni: the lessons, quizzes and exercises are AI-generated from the videos. Not endorsed by the creator.
Free to join, no card needed. New accounts get one module free.

Free to join, no card needed. New accounts get one module free.
What you’ll learn
- Explain quantization and compute the scale and zero point for symmetric and asymmetric INT8.
- Tell post-training quantization apart from quantization-aware training.
- Explain how LoRA stores weight updates as two low-rank matrices, and how QLoRA adds a 4-bit base model.
- Fine-tune Llama 2 7B chat in Colab with bitsandbytes, PEFT and SFTTrainer.
- Explain why 1.58-bit (ternary) LLMs replace multiplications with additions.
- Load Google Gemma in 4-bit from Hugging Face and fine-tune it with LoRA.
- Build a no-code RAG pipeline and call it from Python with an API key.
- Fine-tune a hosted model with your own instruction/response samples.
Watching teaches. Practice proves it.
Every feature below ladders up to one question: can you actually do the job and pass the interview.
AI-graded mock interviews
Answer real interview questions in writing — AI grades you and hands back a reference answer.
Active recall
Open-ended questions after every lesson, AI-graded, with follow-ups when you're shaky.
Quizzes
Retake any quiz, review your mistakes, and keep your best score.
Hands-on exercises
Checklist tasks with an expected-outcome reveal, so you know the moment you got it right.
Spaced-repetition flashcards
FSRS-scheduled review with a live due-count — it only resurfaces cards right before you'd forget them.
Skill mindmap
See how every concept in the course connects — not a syllabus, a map.
Cheatsheets
Searchable, copyable, downloadable — a reference you keep using after you finish.
Timestamped notes
Pin a note to the exact video moment, jump straight back to it later.
Progress + resume
Every topic tracked — close the tab, come back next week, pick up exactly where you left off.
Inside the course
6 milestones, 14 lessons, ~3 hours of video. Every lesson comes with hands-on tasks and active-recall checks — you practise it, not just watch it.
See why big LLMs don't fit on normal hardware and how quantization fixes it: full vs half precision, the scale-and-zero-point maths for symmetric and asymmetric INT8, and the two modes, PTQ and QAT.
- What Quantization Is: Full and Half Precision
- Symmetric and Asymmetric Quantization: Scale and Zero Point
- Post-Training Quantization vs Quantization-Aware Training
Learn the kinds of fine-tuning, why updating every weight is too expensive, and how LoRA trains a tiny low-rank add-on instead — then QLoRA, which does it on a 4-bit model.
- Ways to Fine-Tune an LLM and Why Full Fine-Tuning Is Hard
- How LoRA and QLoRA Work: Matrix Decomposition and Rank
Put the theory to work: install the Hugging Face stack, format data in the Llama 2 chat template, train with QLoRA and SFTTrainer on a free GPU, then save and test your model.
- Llama 2 Fine-Tuning Setup: Libraries, Prompt Template and Dataset
- Configuring QLoRA and Training Llama 2 with SFTTrainer
- Saving and Testing the Fine-Tuned Llama 2 Model
Read a research paper with the instructor and see how BitNet b1.58 uses only −1, 0 and 1 as weights to cut memory, latency and energy.
- 1-Bit LLMs: BitNet b1.58 and Ternary Weights
Get access to Google's open Gemma model, load it in 4-bit, and fine-tune it with LoRA to name the author of a quote.
- Loading Google Gemma in 4-Bit from Hugging Face
- Fine-Tuning Gemma on a Quotes Dataset with LoRA
Build an LLM pipeline without code (RAG over your PDFs plus search tools), call it from Python, and fine-tune a hosted model in the cloud with a handful of your own examples.
- Building a No-Code LLM Pipeline: RAG and Smart Functions
- Calling Your LLM Pipeline from Python with an API Key
- Fine-Tuning an LLM in the Cloud with Your Own Data (Gradient)
Before you start
- Basic Python (functions, lists, dictionaries)
- A rough idea of what a neural network and its weights are
- A Google account for Google Colab and a free Hugging Face account
Start learning today
See the full course plan and try a lesson free, no account needed. Sign up to keep going and pick up where you left off on any device.
Free to join, no card needed. New accounts get one module free.