LLM Fine-Tuning Explained · Aishwarya Srinivasan
LLM Fine-Tuning
The Complete Guide
Where fine-tuning sits relative to pre-training, how open-weight and closed-weight models differ, the major methodologies — parameter-efficient, full, and reinforcement-based fine-tuning — and when to reach for each one.
Source: youtube.com/watch?v=Wx1oiBCmxjY · Channel: Aishwarya Srinivasan (@aishwaryasrinivasan)
Agenda
What We'll Cover
Foundations
- Pre-training vs post-training — where fine-tuning fits
- Scale: the parameter universe & weight access
- PEFT — LoRA & QLoRA
- Full fine-tuning
Methods & Practice
- Reinforcement fine-tuning — verifiable rewards, RLHF, DPO
- Choosing the right method — prompts, context, then the model
- Data quality & evaluation — the real challenges
- Key takeaways checklist
Section 1 · Where Fine-Tuning Fits
You Adapt — You Don't Train From Zero
Pre-training — the foundation labs' job
Massive runs on huge GPU clusters over trillions of tokens.
- Produces the base model — Llama, GPT, Claude, Gemini
- The thing you get out of the box: download or API
- You did not train it — the foundation labs did
Post-training — everything after
Fine-tuning is the most common form of post-training.
- Not a new concept — close to what traditional ML teams have done for years
- Adapts a model already trained on a great deal of knowledge
Before LLMs: you owned the pipeline
- Train a model from scratch on your own data
- Fine-tune it on task-specific data
- Ship your own model
Today: model-as-a-service
- Base model served to you by download or API
- Fine-tune on your specific use case
- Profound implications for the compute, data & expertise required
Section 2 · Fine-Tuning at Scale
From Millions to Over a Trillion Parameters
Why scale is the core challenge
- Training memory grows with the number of trainable parameters
- The run must hold weights, gradients and optimizer state
- Even a fraction of a trillion-parameter model needs serious infrastructure
Section 2 (cont.) · Weight Access
Open-Weight vs Closed-Weight Models
Open-weight — full control
Llama · Mistral · Qwen · DeepSeek · GLM and others
- Weights are open — you can change the parameters through fine-tuning
- Download the weights, fine-tune on your own GPUs
- Deploy the fine-tuned model yourself
API providers hosting these models are really just distributing the weights across GPUs.
Closed-weight — provider fine-tuning only
Claude · GPT · Gemini
- No access to the weights — cannot train from your own infrastructure
- Use the provider's native service: OpenAI's API, Vertex AI, Anthropic
- Submit data → provider runs the job → access the fine-tuned version via API
Section 3 · Parameter-Efficient Fine-Tuning (PEFT)
Do You Need to Update All 70B Parameters?
PEFT is the first big bucket of fine-tuning methods — and the place most people get confused. It is where LoRA and QLoRA live.
The answer all of PEFT is built around
Usually no. Instead of updating billions of parameters, PEFT keeps the frozen base model and learns a compact adjustment on top of it.
Section 3 · PEFT — LoRA
LoRA: Train 100 Million, Not 70 Billion
The "low rank" in the name
For each layer it touches, LoRA learns a small pair of matrices whose product forms the update — living in a much smaller dimensional space than the full weight matrix it adjusts.
What that buys you
- A massive reduction in compute, memory and cost
- The base model's knowledge stays intact and untouched
- Adapters are small — store, swap, compare or delete them
- Several fine-tunes of one base, no extra full copies
Section 3 · PEFT — QLoRA
QLoRA: A 70B Model on a Single H100
Quantization is compression
Base weights are stored at much lower numerical precision, shrinking their memory footprint dramatically — at some cost in precision.
The default starting point
QLoRA is the default starting point for most teams fine-tuning their own open-weight models today.
Section 4 · Full Fine-Tuning
Full Fine-Tuning: Most Flexibility, Highest Cost
The opposite approach — you update every single parameter in the model.
Section 5 · Reinforcement Fine-Tuning
Three Flavors of Reinforcement Fine-Tuning
The category that has exploded in the last year — spanning classic human-preference alignment and today's reasoning models.
Verifiable rewards
Reward answers that can be checked automatically.
Powers OpenAI's o-series, DeepSeek R1 and most modern reasoning models.
RLHF
Human preferences → reward model → PPO.
The classic technique that powered ChatGPT — heavy data and a complex loop.
DPO
Skip the reward model entirely.
Optimizes preference pairs directly — easier, less compute, the open-weight default.
Section 5.1 · Verifiable Rewards
Reward the Reasoning That Works
Section 5.2 · RLHF
RLHF: Steering the Model With Preferences
Reinforcement learning from human feedback — the classic technique that powered ChatGPT.
PPO = proximal policy optimization, the core RL algorithm used inside RLHF.
Section 5.3 · DPO
DPO: Skip the Reward Model
Direct preference optimization — instead of training a reward model and optimizing against it, DPO optimizes the language model on the preference pairs in a single step.
| RLHF | DPO | |
|---|---|---|
| Reward model | Trained separately on human preferences | Skipped entirely |
| Optimization | PPO steers the language model with reward-model signals | Direct optimization on the pairs in a single step |
| Cost & complexity | Heavy human data, complex loop | Much easier to implement, less compute |
| Typical role | Classic alignment, ChatGPT era | Default for preference tuning on open-weight models |
Section 6 · Choosing the Right Method
Fine-Tuning Isn't the First Lever
Prompts & context are your benchmark
Both steps give a decent performance bump on their own. The gap that remains is exactly what fine-tuning has to close — so you can measure the improvement it actually delivers.
Match the method to your goal
- Domain task or tone → start with QLoRA
- QLoRA short of the quality bar (rare) → full fine-tuning
- Style, safety, tone → RLHF or DPO
- Reasoning on auto-verifiable tasks → verifiable rewards
Section 7 · The Real Challenges
Bad Data Makes a Good Model Worse
A "bad" dataset does not only mean wrong answers:
A model faithfully absorbs whatever patterns its training data contains — bad patterns become bad behavior. No clever parameter-efficient machinery or RL sophistication can compensate.
Section 7 (cont.) · Evaluation
Define the Yardstick Before You Start
The second biggest challenge: without a proper eval set and a clear metric in place first, you will have no idea whether fine-tuning improved anything.
A proper eval set
A representative, held-out collection of examples that stand for the real task — separate from anything used in training.
A clear metric
A measure you commit to in advance, one that matches the outcome you actually care about.
Key Takeaways
What to Remember
The End
Fine-Tune With Understanding
Fine-tuning adapts an already pre-trained model to your use case — optimize prompts and context first, start with PEFT, escalate deliberately, and treat every run as an experiment with a baseline and a yardstick.
Source: "LLM Fine-Tuning Explained: The Complete Guide" — Aishwarya Srinivasan (youtube.com/watch?v=Wx1oiBCmxjY · @aishwaryasrinivasan) · Full article in this repo.