HuggingFace 团队 Ben Burtenshaw 发起的 Training Agents 系列已完结,6 个月 6 场直播,视频在 Hugging Face YouTube 频道公开,代码在 GitHub 开源。主线为:智能体评估(benchmark 分数与实际体验脱节)、RL for agents(环境、rollout、奖励设计与推理瓶颈)、SFT on agent traces(用 TRL+LoRA 微调,强调 SFT 教的是交互格式而非能力)、蒸馏(off-policy/on-policy/self-distillation)、GRPO(组采样、可验证奖励、故意设置可被 game 的奖励以展示 reward hacking)、环境 RL(OpenEnv 构建环境并接入 TRL GRPOTrainer,通过 Harbor+AsyncGRPOTrainer 训练真实 coding agent)。开源项目提出四阶段挑战阶梯与晋级门槛、Looping RL 双层循环及故障启发式,总目标为训练约 2B 开源模型在 Terminal-Bench 上超过 40 分,且仅 held-out 评估结果可让 checkpoint 进入发布状态。
AI推荐理由该帖转述 HuggingFace 团队 Ben Burtenshaw 发起的 Training Agents 系列:6 个月 6 场直播,覆盖智能体评估、RL for agents、SFT on agent traces、蒸馏、GRPO、环境 RL,并开源代码与 YouTube 播放列表。具体新信息包括四阶段挑战阶梯(SFT→GRPO→带环境 GRPO→自蒸馏)、晋级门槛(非零奖励方差、held-out 提升、与 Terminal-Bench 隔离防泄漏)、Looping RL 双层循环及故障启发式,以及约 2B 开源模型在 Terminal-Bench 超 40 分的可度量目标。局限:内容为二手转述,未提供各阶段实际训练结果或 benchmark 数值,目标是否达成未验证;互动量低仅作传播信号。
82浏览 478点赞 4评论 1转发 0
正文
HuggingFace Training Agents 系列视频公开、代码开源
[@huggingface](https://x.com/huggingface) 团队 [@ben\_burtenshaw](https://x.com/ben_burtenshaw) 发起,6 个月、6 场直播,完成 SFT → 蒸馏 → GRPO → 环境 RL,基于一个 2B 模型的后训练全路线!
6 个视频 Youtube 地址
[youtube.com/playlist?list=…](https://www.youtube.com/playlist?list=PLo2EIpI_JMQvQZm-kVlz4wY1vWF0LBcf5)
开源项目
[github.com/burtenshaw/tra…](https://github.com/burtenshaw/training-agents)
# 六讲 workshop 主线逻辑
第 1 讲:智能体评估(起点)。先讲“评估为什么难”:benchmark 分数与实际使用体验严重脱节。嘉宾阵容横跨学界与工业界(Princeton、MIT CSAIL、Meta、英国 AI 安全研究所、Bespoke Labs),奠定了整个系列的基调:先建立可信的度量,再谈训练。
第 2 讲:面向智能体的 RL(理论准备)。讲清楚从“RL for LLM”到“RL for agents”的关键差异:需要环境、需要 rollout、需要重新设计奖励,并且会遇到推理侧的瓶颈。
第 3 讲:SFT on agent traces(第一步)。把公开 coding agent 的轨迹转成 prompt/completion 数据,用 TRL + LoRA 在 Hugging Face Jobs 上微调,Trackio 看指标。诚实讨论了第一批评估数字能说明什么、不能说明什么——这一讲的元信息是“SFT 教会模型的是交互格式和基本行为,不是能力本身”。
第 4 讲:蒸馏。用 off-policy、on-policy 和 self-distillation 三种方式,把教师模型的能力迁移到更小的 coding agent。
第 5 讲:GRPO 强化学习。SFT 之后上 RL:组采样(group sampling)、可验证的奖励函数、如何读 reward/KL/length 曲线。最有价值的设计是做了三个实验,其中一个故意放了可被 game 的奖励,让学员亲眼看到 reward hacking 如何发生;这是评估意识的延续。
第 6 讲(收官):从奖励函数到环境。概念上的关键跃迁:奖励不再是一个函数,而是智能体活动于其中的“场所”。实操路径是:从 Gym 的 reset()/step() 契约讲到 LLM 智能体,用 OpenEnv 构建环境并推上 Hub,接入 TRL 的 GRPOTrainer,最后通过 Harbor + AsyncGRPOTrainer 在 HF sandboxes 上训练了真实的 coding agent [@opencode](https://x.com/opencode)
# 开源项目里的方法论核心
开源项目里是一套可复用的训练操作系统,有三个值得记住的设计:
1. 四阶段挑战阶梯(challenge ladder):SFT(学格式)→ GRPO(学从可验证奖励中学习)→ 带环境的 GRPO(学与有状态的世界交互)→ 自蒸馏(把验证过的成功轨迹回收为下一轮训练数据)。每一级都有晋级门槛:必须出现非零的奖励方差、held-out 任务上有真实提升,才能爬下一级;且训练任务必须与 Terminal-Bench 等评估基准严格隔离,防泄漏。
2. Looping RL(双层循环):内层是常规 RL 循环(采样→打分→更新);外层训练“研究系统本身”——每次实验要回答的是“这个 setup 是否真的度量了我们想要的行为”,而不是只看奖励涨没涨。文章给出了非常实用的故障启发式,比如:奖励方差为零 → 重新设计 prompt 分组;语法改善但成功率持平 → 数据要从语法级换成语义级;proxy 分数不动 → 不得宣称 benchmark 有进展。
3. 明确的总目标:训练一个约 2B 的开源模型,在 Terminal-Bench 上超过 40 分。所有阶段都服务于这个可度量的北极星,且只有 held-out 评估结果(而非训练奖励)才能让 checkpoint 进入发布状态。


Ben Burtenshaw@ben\_burtenshaw
We finished the Training Agents series. Six live sessions over six months, from evaluating agents to training them inside real environments. All of it is on the Hugging Face YouTube channel and all of the code is open.
Here's what we did and who made it happen:
1. Agentic Evaluations WorkshopWhere agent evals actually stand, and why benchmark scores don't match what people see in use. With Avijit Ghosh and Nathan Habib (Hugging Face), Arvind Narayanan (Princeton), Pierre Andrews (Meta), J.J. Allaire (UK AI Security Institute) and Mahesh Sathiamoorthy (Bespoke Labs).
2. RL for Agents Workshop Environments, rollouts, reward design and the inference bottlenecks that appear when you move from RL for LLMs to RL for agents. With Lewis Tunstall (Hugging Face), Will Brown (Prime Intellect), Ofir Press (Princeton) and Alex Zhang (MIT CSAIL).
3. Training Agents 1: SFT on agent traces Public coding-agent traces turned into prompt/completion data, a TRL + LoRA fine-tune on Hugging Face Jobs, metrics in Trackio, and an honest look at what the first eval numbers can and cannot tell you. Joined by Sergio Paniego and Quentin Gallouédec.
4. Training Agents 2: Distillation Off-policy, on-policy and self-distillation for moving capability from a teacher into a smaller coding agent.
5. Training Agents 3: Reinforcement learning GRPO after SFT: group sampling, verifiable reward functions, reading the reward/KL/length curves, and three experiments, one of them with a deliberately gameable reward so we could watch the hacking happen.
6. Training Agents 4: From reward functions to environments The reward stops being a function and becomes a place the agent acts in. We walked the reset()/step() contract from Gym to LLM agents, built an OpenEnv environment and pushed it to the Hub, plugged it into TRL's GRPOTrainer, then trained a real coding agent (OpenCode) through Harbor with AsyncGRPOTrainer on Hugging Face sandboxes.
The series has passed 300k views. Thank you to every speaker, to the TRL team, and to everyone who showed up live with questions.
Playlist: [youtube.com/playlist?list=…](https://www.youtube.com/playlist?list=PLo2EIpI_JMQvQZm-kVlz4wY1vWF0LBcf5)

[🔗 View Quoted Tweet](https://x.com/ben_burtenshaw/status/2098410420394451153)