Vizuara Books
LLM Finetuning
Free preview available. Sign in and subscribe to unlock the full book.
Vizuara AI Labs · intermediate

LLM Finetuning

Rewire a pretrained model to your task.

A hands-on tour of finetuning: instruction tuning by hand, then Hugging Face, Unsloth, LoRA, and QLoRA at scale. Closes with research-grade projects on subliminal learning and retrieval-augmented finetuning (RAFT).

intermediatellmfinetuninglorapeft
40 capsules144 figures~8 hoursby Dr. Raj Dandekar

Read on your Kindle or e-reader

Download the EPUB and read offline — perfect for the train. Works on Kindle, Kobo, Apple Books & more.

Send to Kindle →
00Why Finetune at All5 capsules

Why Finetune at All — 5 chapters.

01What Finetuning Actually Isconceptfree10 min02Pretraining vs Finetuningconceptfree10 min03Knowledge vs Behaviorintuition🔒12 min04Transfer Learning and Intrinsic Dimensionalitymath🔒10 min05Who Finetuning Is Forconcept🔒12 min
01Finetuning vs RAG6 capsules

Finetuning vs RAG — 6 chapters.

06The Central Tradeoffconcept🔒11 min07How RAG Worksconcept🔒11 min08Structured vs Unstructured RAGconcept🔒10 min09Case Study: A Financial Chatbotproject🔒10 min10The Technical Limits of RAGdeep-dive🔒12 min11Few-Shot Prompting vs Finetuningintuition🔒12 min
02Instruction Finetuning from Scratch6 capsules

Instruction Finetuning from Scratch — 6 chapters.

12Anatomy of an Instruction Datasetcode🔒11 min13Tokenizing and Formatting the Datacode🔒12 min14The Finetuning Training Loopcode🔒12 min15Sparse Finetuning and Layer Normsdeep-dive🔒10 min16Evaluating Your Finetuned Modelconcept🔒14 min17How OpenAI Uses Finetuningconcept🔒11 min
03Finetuning with Hugging Face & Unsloth7 capsules

Finetuning with Hugging Face & Unsloth — 7 chapters.

18The Hugging Face Ecosystemconcept🔒12 min19Loading and Testing the Tiny Stories Modelcode🔒12 min20Instruction vs Classification Finetuningconcept🔒11 min21Adding a Custom Classification Headcode🔒11 min22Data Collation and Dynamic Paddingcode🔒10 min23Left vs Right Paddingdeep-dive🔒11 min24A Finetuning Project with Unslothproject🔒12 min
04Parameter-Efficient Finetuning (PEFT)7 capsules

Parameter-Efficient Finetuning (PEFT) — 7 chapters.

25Why Full Finetuning Hurtsconcept🔒11 min26The LoRA Ideamath🔒11 min27The Math Behind LoRAmath🔒13 min28Implementing LoRA in GPT-2code🔒13 min29The PEFT Training Loopcode🔒14 min30Tuning LoRA Hyperparametersdeep-dive🔒13 min31QLoRA and Quantized Finetuningconcept🔒13 min
05Research Projects6 capsules

Research Projects — 6 chapters.

32Replicating a Research Paperproject🔒11 min33Subliminal Learning Explaineddeep-dive🔒11 min34Generating Training Data at Scalecode🔒11 min35Finetuning on the OpenAI Platformproject🔒12 min36RAFT: Retrieval-Augmented Finetuningdeep-dive🔒10 min37Setting Up a RAFT Projectproject🔒12 min
06Putting It Together3 capsules

Putting It Together — 3 chapters.

38Choosing Your Finetuning Strategyconcept🔒12 min39The Workshop Code and Resourcescode🔒12 min40Capstone: Ship a Finetuned Modelproject🔒12 min

Ratings & reviews

1,607 readers
4.5
445 ratings
553%
427%
310%
25%
14%
Rate this book
JB
Jonas Bergström
last week

A few sections moved fast for me, but re-reading with the figures open made everything land. Highly recommend.

KP
Kevin Park
4 weeks ago

This is the resource I wish I had when I started. Clear mental models, zero fluff.

AM
Aarav Mehta
last month

Concise capsules I can finish over coffee, yet each one taught me something I actually use.