Overview
Learn to implement Reinforcement Learning from Human Feedback (RLHF) in this comprehensive tutorial video that demonstrates Python coding techniques for fine-tuning LLama 2 models using both traditional and modern approaches. Master the implementation of Stanford University's Direct Preference Optimization (DPO) method as an alternative to Proximal Policy Optimization (PPO), while incorporating 4-bit quantization and Low-Rank Adaptation (LoRA) techniques. Explore detailed code examples for Supervised Fine-tuning of LLama2 models with 4-bit quantization, implement DPO-Trainer using HuggingFace's toolkit with PEFT and LoRA, and understand the complete workflow from supervised fine-tuning to reward modeling and reinforcement learning training. Compare implementations between LLama 1 and LLama 2 models while learning to optimize model performance through various quantization and adaptation techniques.
Syllabus
How to Code RLHF on LLama2 w/ LoRA, 4-bit, TRL, DPO
Taught by
Discover AI