Online course · AI
Advanced Generative AI: Fine-tuning, LoRA & Custom Models
Decide when to fine-tune, then train, evaluate and ship LoRA adapters
Created by TrainSkool Trainer
- AI
- Advanced
- English
- 27 lessons
- 12h 3m
- 8 assessments
- Certificate
Coming soon Launch price ₹2,499
This course is not open for enrolment yet.
About this course
An advanced course for ML engineers, MLOps engineers and Python developers who already deploy LLM features and now need to customise a model rather than only prompt it. You follow Ananya, a senior ML engineer at LekhaBooks, a fictional Pune GST and accounting software company, as she decides whether fine-tuning beats prompting or RAG for support-ticket triage, prepares and masks the data with DPDP Act duties in mind, trains a LoRA and QLoRA adapter on a small open-weight model, evaluates it against baselines with slices and significance tests, budgets GPU time in rupees, tests safety and language bias, and deploys it with multi-adapter serving, fallbacks, a canary and rollback. Prerequisites: MLOps & LLMOps and Python & Machine Learning, or equivalent experience. Included: 27 text lessons with slides and quick checks in every lesson, auto-checked Python exercises, chapter projects, chapter quizzes, a capstone where you fine-tune and evaluate a small open model for a defined task, a graded final exam and a certificate of completion. Lessons are text and slides; trainer videos are coming later. GPU work in the capstone needs your own GPU access. TrainSkool is not affiliated with or endorsed by any model provider, library or cloud mentioned. What you will be able to do: - You will be able to decide with evidence whether a task needs prompting, RAG, fine-tuning or a combination, and write a go/no-go memo. - You will be able to build a fine-tuning dataset: chat-format JSONL, loss masking, labelling guidelines, deduplication, PII masking and leak-free splits. - You will be able to configure LoRA and QLoRA runs, count trainable parameters and read loss curves and checkpoints. - You will be able to evaluate a fine-tuned model with task metrics, slices, LLM-as-judge with position swaps and significance tests. - You will be able to estimate GPU memory, training cost and inference break-even in rupees for build-versus-buy decisions. - You will be able to test a customised model for safety regressions and language bias, and set release gates with a model card. - You will be able to package, serve and roll out adapters with structured output, fallbacks, canaries, drift monitoring and rollback. - You will be able to fine-tune and evaluate a small open model for a defined task end to end in the capstone.
What you'll learn
- Decide with evidence whether a task needs prompting, RAG, fine-tuning or a combination, and write a go/no-go memo
- Build a fine-tuning dataset: chat-format JSONL, loss masking, labelling guidelines, deduplication, PII masking and leak-free splits
- Configure LoRA and QLoRA runs, count trainable parameters and read loss curves and checkpoints
- Evaluate a fine-tuned model with task metrics, slices, LLM-as-judge with position swaps and significance tests
- Estimate GPU memory, training cost and inference break-even in rupees for build-versus-buy decisions
- Test a customised model for safety regressions and language bias, and set release gates with a model card
- Package, serve and roll out adapters with structured output, fallbacks, canaries, drift monitoring and rollback
- Fine-tune and evaluate a small open model for a defined task end to end in the capstone
Course content
Chapter 1 · Module 1: When to Fine-tune, Prompt or Use RAG
- Code lab: What Fine-tuning Actually Changes: Pre-training, Instruction Tuning, Preference Tuning and AdaptersTeams that say "we should fine-tune" often mean something vague: know our product, sound like us, be cheaper, stop breaking our JSON.18 topics · 25 min
- Code lab: The Decision Ladder: Prompting, Few-shot, RAG, Fine-tuning and CombinationsFine-tuning is the most expensive rung on the customisation ladder, in money, in people's time and in ongoing maintenance.18 topics · 26 min
- Code lab: Framing the Project: Task Spec, Baselines, Success Metrics and a Go/No-go MemoMost fine-tuning projects that fail do not fail in training. They fail because nobody wrote down exactly what the model should output, what "good enough" means, or what it is being compared against.22 topics · 27 min
Chapter 2 · Module 2: Data Preparation for Fine-tuning
- Code lab: Training Data Formats: Chat Templates, JSONL, Loss Masking and Special TokensMost failed fine-tuning runs fail because of the data file, not the learning rate.14 topics · 27 min
- Code lab: Sourcing and Labelling: Ticket Exports, Annotation Guidelines and Inter-annotator AgreementA fine-tuned model is a compressed copy of its labels. If two agents would label a ticket differently, the model learns noise; if labels come from a dropdown chosen in a hurry, it learns the hurry.15 topics · 26 min
- Code lab: Cleaning, Deduplication and PII Masking with DPDP-aware HandlingWhatever goes into a fine-tuning dataset can come out of the model.14 topics · 28 min
- Code lab: Splits, Leakage, Synthetic Data and Dataset CardsEvery lekha-triage number, from macro-F1 to P1 recall, is only as honest as its split.22 topics · 27 min
Chapter 3 · Module 3: Parameter-efficient Fine-tuning: LoRA and QLoRA
- Code lab: Why Full Fine-tuning Is Expensive and How Adapters HelpBy the end of Chapter 2, Ananya Kulkarni has what most fine-tuning projects never get: 8,000 clean, labelled, PII-masked training tickets in chat format, an 800-ticket validation set and an…15 topics · 26 min
- Code lab: LoRA Mechanics: Rank, Alpha, Target Modules and Parameter CountsLoRA has four knobs that matter: which weight matrices get an adapter (target modules), the rank r, the scaling factor alpha, and dropout.16 topics · 28 min
- Code lab: QLoRA: 4-bit NF4, Double Quantisation and Paged OptimisersLoRA removed the optimiser bill for the frozen weights, but the frozen weights themselves still sit in GPU memory.16 topics · 28 min
- Code lab: A Training Run End to End: Hyperparameters, Schedules, Loss Curves and Checkpoints3. Now Ananya has to press "run", and a training run has more ways to waste a day than any other step in the project.21 topics · 30 min
Chapter 4 · Module 4: Evaluating Fine-tuned Models
- Code lab: Building the Evaluation Set and Harness: Held-out, Time-split and SlicesAt the end of Chapter 3, Ananya had a finished training run: FT v1, a QLoRA adapter at rank 16, saved at step 500.17 topics · 26 min
- Code lab: Task Metrics: JSON Validity, Field Exact Match, Macro-F1 and P1 Recall1 produces 800 records per candidate. Turning those records into numbers is where judgement enters.18 topics · 28 min
- Code lab: Free-text Outputs: LLM-as-judge, Pairwise Win Rates and Human Review2 could score them with exact rules. The sixth, summary, does not.17 topics · 27 min
- Code lab: Regressions, Forgetting, Overfitting and Significance Testing90, summaries roughly on par with the hosted model. Three questions remain before anyone can act on it.23 topics · 27 min
Chapter 5 · Module 5: Cost and Hardware Tradeoffs
- Code lab: GPU Memory Arithmetic: Weights, Gradients, Optimiser States and ActivationsEvery fine-tuning plan eventually meets one hard number: the memory on the GPU you can actually get.15 topics · 28 min
- Code lab: Training Cost in Rupees: GPU Options in India, Managed Fine-tuning and Build vs Buy" is the first question a CTO asks and the one engineers answer worst.15 topics · 26 min
- Code lab: Inference Economics: Throughput, Latency, Quantisation and Break-even vs a Hosted APITraining happens a few times a year; inference happens on every ticket, every day, for the life of the model.21 topics · 27 min
Chapter 6 · Module 6: Safety and Bias When Customising Models
- Code lab: How Fine-tuning Can Erode Safety Behaviour and How to Test for ItFine-tuning does not only teach a new skill.14 topics · 27 min
- Code lab: Bias Across Languages and Customer Segments: Slices, Gaps and Targeted Data90. But when Ananya Kulkarni split the 800-ticket test set by language, the picture changed.15 topics · 27 min
- Code lab: Governance: Licences, Data Rights, DPDP, Model Cards and Release GatesA fine-tuned model is a new artefact with a mixed inheritance. Its weights come partly from a base model released under someone else's licence.19 topics · 26 min
Chapter 7 · Module 7: Deploying a Fine-tuned Model
- Code lab: Packaging: Merging vs Serving Adapters, Formats and Quantisation for Inference5%. Deepa Menon has signed the model card and Sandeep Joshi has approved a pilot.15 topics · 27 min
- Code lab: Serving: Multi-LoRA, Structured Output, Fallbacks and SLOs89 macro-F1 in a notebook can still fail its users. If the GPU queue backs up on the 20th of the month, when GSTR-3B tickets flood in, triage arrives after the agent has already read the ticket.15 topics · 28 min
- Code lab: Rollout and Operations: Shadow, Canary, Drift, Retraining Cadence and RollbackThe test set that approved FT v3 ends in September 2026.22 topics · 27 min
Chapter 8 · Module 8: Capstone: Fine-tune and Evaluate a Small Open Model
- Reading: Capstone Brief: Choose a Defined Task, a Base Model and Success CriteriaEverything in this course so far has followed one project at LekhaBooks: Ananya Kulkarni and her team turning a prompted hosted model into lekha-triage, a QLoRA-tuned 3-4 billion-parameter open…13 topics · 24 min
- Reading: Deliverables and Step-by-step Plan: Data, Training, Evaluation, Model CardA capstone without a clear list of deliverables drifts. Learners spend three evenings on training tricks and run out of time for the evaluation report, which is the part that carries the most marks.13 topics · 26 min
- Code lab: Grading Rubric, Evaluation Report Template and Self-assessmentYou should know exactly how your capstone will be judged before you start it.14 topics · 24 min
Assessments and certificate
- Module 1 quiz: When to Fine-tune, Prompt or Use RAG8 questions · 15 min · pass mark 70%
- Module 2 quiz: Data Preparation for Fine-tuning8 questions · 15 min · pass mark 70%
- Module 3 quiz: Parameter-efficient Fine-tuning: LoRA and QLoRA7 questions · 15 min · pass mark 70%
- Module 4 quiz: Evaluating Fine-tuned Models8 questions · 15 min · pass mark 70%
- Module 5 quiz: Cost and Hardware Tradeoffs8 questions · 15 min · pass mark 70%
- Module 6 quiz: Safety and Bias When Customising Models7 questions · 15 min · pass mark 70%
- Module 7 quiz: Deploying a Fine-tuned Model8 questions · 15 min · pass mark 70%
- Advanced Generative AI: Fine-tuning, LoRA & Custom Models — final assessment20 questions · 40 min · pass mark 70%