Note Wisdom
Stanford Lecture 5 explains why LLM tuning needs a third stage beyond pre-training and SFT, then walks through preference data collection, reward models, PPO, best-of-N and DPO, with candid notes on which parts felt rushed or unconvincing.
Institution: Stanford
Original Course: Stanford CME295 Transformers & LLMs | Autumn 2025 | Lecture 5 - LLM tuning
Instructor Bio: This lecture is co-delivered by **Afshine Amidi** and **Shervine Amidi**, adjunct faculty at Stanford University's Institute for Computational and Mathematical Engineering (ICME). Afshine Amidi earned his engineering degree from École Centrale Paris in 2016 and a Master of Science from the Massachusetts Institute of Technology in 2017. He currently leads LLM initiatives for promotional writing at Netflix, and previously held roles at Uber and at Google on the Gemini team. He co-authors widely used technical study guides on machine learning, transformers, and algorithms. Shervine Amidi holds B.S. and M.S. degrees in engineering from École Centrale Paris (2016), as well as an M.S. in Computational and Mathematical Engineering from Stanford University (2019). He is a Senior Machine Learning Engineer at Netflix, and previously worked at Google DeepMind on the Gemini team, Google Assistant, and Uber's data science division. He has served as a teaching assistant for multiple core Stanford CS courses and has been an adjunct lecturer at the university since 2021.
Course Description: This lecture covers the post-training pipeline that adapts pre-trained base models into useful, aligned assistants. It outlines the three-stage training pipeline: pre-training, Supervised Fine-Tuning (SFT), and preference tuning. For SFT, it explains how instruction-response datasets are used to teach models to follow human instructions. For preference tuning, it details Reinforcement Learning from Human Feedback (RLHF) — including reward model training, Proximal Policy Optimization (PPO), and the KL divergence constraint — as well as Direct Preference Optimization (DPO) as a simpler, more stable alternative. The lecture also covers parameter-efficient fine-tuning methods, most notably LoRA (Low-Rank Adaptation), which enables tuning with a fraction of the full model's parameters.
All contents below are exclusive to the paid Word file, NOT available on this web page
Skip hours of watching lectures. Get organized notes, exam prep materials and problem solutions all in one Word file.
Click to see everything included
All contents below are exclusive to the paid Word file, NOT available on this web page

