影片高階EN8.1 萬 次觀看
Reinforcement Learning from Human Feedback explained with math derivations and the PyTorch code.
來源 Umar Jamil
看影片(在新分頁開啟原站)連到 YouTube・Umar Jamil
摘要
深入解析人類回饋強化學習(RLHF)的數學原理與 PyTorch 實作細節。講者從語言模型與 AI 對齊的基礎出發,逐步推導策略梯度最佳化、REINFORCE 及 PPO 演算法的損失函式,並解釋如何透過基準值函式與優勢估計來降低變異數。最後,影片詳細拆解 Hugging Face 團隊在 Hugging Face 庫中實現 RLHF/PPO 的程式碼邏輯,涵蓋獎勵模型訓練、對數機率計算、KL 散度懲罰及梯度上升最佳化過程。
This video explains the mathematical derivations and PyTorch implementation of Reinforcement Learning from Human Feedback (RLHF), covering Policy Gradient, REINFORCE, and PPO algorithms with a detailed code walkthrough of the Hugging Face library.
摘要、重點與章節標題由語言模型整理,細節(誰說的、數字、先後)可能有誤;要引用請以原始內容為準。
重點
- 從頭推導策略梯度最佳化、REINFORCE 與 PPO 演算法的數學公式。
- 解釋如何利用基準值函式與優勢估計來降低梯度估計的變異數。
- 逐行解析 Hugging Face 庫中 RLHF/PPO 的實際程式碼實作細節。
章節
依話題轉折切分,標題由 AI 產生
- 00:00Introduction
- 03:52Intro to Language Models
- 05:53AI Alignment
- 06:48Intro to RL
- 09:44RL for Language Models
- 11:01Reward model
- 20:39Trajectories (RL)
- 29:33Trajectories (Language Models)
- 31:29Policy Gradient Optimization
- 41:36REINFORCE algorithm
- 44:08REINFORCE algorithm (Language Models)
- 45:15Calculating the log probabilities
- 49:15Calculating the rewards
- 50:42Problems with Gradient Policy Optimization: variance
- 56:00Rewards to go
- 59:19Baseline
- 1:02:49Value function estimation
- 1:04:30Advantage function
- 1:10:54Generalized Advantage Estimation
- 1:19:50Advantage function (Language Models)
- 1:21:59Problems with Gradient Policy Optimization: sampling
- 1:24:08Importance Sampling
- 1:27:56Off-Policy Learning
- 1:33:02Proximal Policy Optimization (loss)
- 1:40:59Reward hacking (KL divergence)
- 1:43:56Code walkthrough
- 2:13:26Conclusion
提到的工具與公司
- PyTorch
- Hugging Face
- PPO
- REINFORCE
適合誰看
適合希望深入理解 RLHF 數學原理並學習如何實作 PPO 演算法的開發者或研究者。
摘要依據
- 依據
- 自動字幕
為什麼排在這裡
- 人氣
- 0.39
- 新鮮
- 0.02
在主題頁與搜尋結果裡,名次由相關、人氣、新鮮三個分數決定;這一頁沒有搜尋的關鍵字,所以沒有相關分數。排序怎麼算
相關內容
- Reinforcement Learning with Human Feedback (RLHF) in 4 minutes影片 ・ Sebastian Raschka ・ 4 分鐘 ・
- Reinforcement Learning for LLMs: The Complete Guide文章 ・ Deep (Learning) Focus(Cameron R. Wolfe) ・
- PPO for LLMs: A Guide for Normal People文章 ・ Deep (Learning) Focus(Cameron R. Wolfe) ・
- Reinforcement Learning with Human Feedback (RLHF), Clearly Explained!!!影片 ・ StatQuest with Josh Starmer ・ 18 分鐘 ・
- Reinforcement Learning with Neural Networks: Mathematical Details影片 ・ StatQuest with Josh Starmer ・ 25 分鐘 ・
- Build A Reasoning Model From Scratch 6: Reinforcement Learning 1 (Implementing GRPO for RLVR)影片 ・ Sebastian Raschka ・ 1 小時 27 分 ・
這個來源最近的內容
摘要由 AI 根據原文產生,可能有誤;完整內容請看原站。看影片(在新分頁開啟原站)
