章鱼总结
00:00 / 14:19

bycloud · 14:19

Last year, the frontier of LLMs was hitting a research wall. To put it simply, the field has basically discovered how to let LLMs explore using reinforcement learning to find solutions or obtain capabilities that are out of its learning data. While this is a powerful technique, the downside is that any model that is trained using RL faces a practical problem. It would start reshaping the model's probability distribution heavily towards a specific behavior. To understand why, we first need to talk about how LLMs are trained in the first place. During pre-training, the model is not trained to produce one single perfect answer. It is trained to model a huge distribution of possible next tokens through next token prediction across the internet, books, code, math, dialogue, and many other domains. So for any prompt, the base model knows more than one continuation, which means it has a broad probability distribution over many possible continuations, and that broad distribution is what gives the model the ability to generalize. But RL changes the training game. Instead of trying to do next token prediction to match the distribution to human text, RL directly increases the probability of the sampled answer that got high reward and directly decreases the probability of the sampled answer that got lower reward inside the model weights. So if a model generates a reasoning trace and gets rewarded, RL pushes up the probability of that trajectory, disregarding the good, the bad, and anything that happened during the reasoning. If another trajectory gets rejected, RL would also push it down. Then over many updates, this creates a sharpening effect because the model would become more confident in the kinds of responses that get rewarded and less likely to produce nearby alternatives that are not explicitly rewarded. So the model would start skewing towards rewarded behaviors, making a model better at a narrow capability while also making it less general. Some symptoms are a math RL model might be insanely good at complex long reasoning, but it might also make the model overuse long reasoning when a short answer would have been better. Or a code RL model might make the model test-driven and execution-focused, but it might also make the model worse at open-ended explanations. or have stylistic flexibility. And because the reward is usually sparse, the learned behaviors would be very imprecisely activated. On top of that, when you want to train multiple capabilities into the model, you basically have to stack multiple RL specialists. And each different RL objective will move the model towards a different reward behavior distribution. So not only we are sharpening the distributions to make the answers less diverse, but now their behaviors might get suppressed under another objective contesting the behaviors. So while all frontier researchers are banging their head against the wall looking for a solution out of this, the least expected method, distillation, has emerged as a way to solve this problem. Because by utilizing distillation in the process, it perfectly sidesteps the sharpening failure mode of RL.

去年,大语言模型的前沿研究正遭遇瓶颈。 简单来说,这个领域基本上已经发现了如何让大语言模型利用强化学习进行探索,从而找到训练数据之外的解决方案或获得新的能力。 虽然这是一种强大的技术,但其缺点是,任何使用强化学习训练的模型都会面临一个实际问题。 它会开始大幅重塑模型的概率分布,使其偏向特定行为。 要理解其中的原因,我们首先需要了解大语言模型最初是如何训练的。 在预训练期间,模型并不是被训练来生成唯一的完美答案。 它通过对互联网上的文本、书籍、代码、数学、对话及许多其他领域的数据进行下一词元预测,来学习可能的下一词元的庞大分布。 因此,对于任何提示,基础模型都知道不止一种续写方式,也就是说,它对许多可能的续写有一个广泛的概率分布,而正是这个广泛的分布赋予了模型泛化能力。 但强化学习改变了训练的玩法。 强化学习不再尝试通过下一词元预测来使分布匹配人类文本,而是直接在模型权重中提高获得高奖励的采样答案的概率,降低获得较低奖励的采样答案的概率。 因此,如果模型生成了一条推理轨迹并获得奖励,强化学习就会提高这条轨迹的概率,而不管推理过程中哪些是好的、哪些是坏的,也不管发生了什么。 如果另一条轨迹被拒绝,强化学习也会降低它的概率。 经过多次更新后,这会产生一种分布尖锐化效应,因为模型会对获得奖励的回答类型更加确信,也更不容易生成相近但未被明确奖励的其他回答。 因此,模型会开始偏向获得奖励的行为,使它在某项狭窄的能力上表现更好,同时也使它的通用性下降。 例如,经过数学强化学习训练的模型可能极其擅长复杂的长篇推理,但它也可能在简短回答更合适时过度使用长篇推理。 又或者,代码强化学习可能让模型变得以测试驱动、注重执行,但也可能让模型在开放式解释方面表现更差。 或者在风格上变得不够灵活。 而且,由于奖励通常是稀疏的,学到的行为会被非常不精确地激活。 除此之外,当你想让模型习得多种能力时,基本上就必须叠加多个强化学习专才。 而每个不同的强化学习目标都会使模型转向不同的受奖励行为分布。 所以,我们不仅在锐化分布,让答案的多样性降低,这些行为现在还可能被另一个与之冲突的目标压制。 因此,当前沿研究人员都在为寻找解决方案绞尽脑汁时,最出人意料的方法——蒸馏——却成为了解决这个问题的途径。 因为在这个过程中使用蒸馏,可以完美避开强化学习中分布锐化导致的失效模式。

And before we dive into why it helps, if you have ever considered running LLM experiments like what we are talking about today, or even fine-tuning it for your own use case, today's sponsor, Crusoe Cloud, has turned this LLM process into something much more elegant for you with something called Crucial Intelligence. Crusoe Intelligence Foundry. Crusoe Intelligence Foundry is a platform that enables you to run AI workloads at every stage from initial experimentation to production at scale. They basically provide you managed AI services like managed inference and serverless fine-tuning for leading open models, all without the hassle of having to provision or manage the underlying GPU infrastructure yourself. You can start by deploying a model of yours or an open model and calling it through an API in minutes or fine-tune the model on your own dataset without setting up an entire cluster first. So whether you want to quickly experiment with it, build an application around one, or customize the model with your own data, Crusoe handles the infrastructure underneath so you can spend more time actually working on the model or your application for your business. And right now, every new Crusoe account automatically gets $5 in free credits for you to try it out. All you need to do is just sign up and the credits are applied directly to your account. So check out Crusoe Intelligence Foundry now using the link down in the description and thank you Crusoe Cloud team for sponsoring this video.

在深入探讨它为什么有帮助之前,如果你曾考虑过运行类似我们今天讨论的大语言模型实验,或者针对自己的使用场景对模型进行微调,今天的赞助商 Crusoe Cloud 推出了一款名为 Crucial Intelligence 的产品,让这个过程变得更加简单优雅。 Crusoe Intelligence Foundry。 Crusoe Intelligence Foundry 是一个平台,让你能够在从初期实验到大规模生产的每个阶段运行 AI 工作负载。 他们提供托管推理和无服务器微调等托管 AI 服务,支持主流开放模型,而且你完全不必费心自行配置或管理底层 GPU 基础设施。 你可以部署自己的模型或开放模型,几分钟内就能通过 API 调用;也可以用自己的数据集微调模型,无需先搭建整个集群。 所以,无论你是想快速进行实验、基于模型构建应用,还是用自己的数据定制模型,Crusoe 都会负责底层基础设施,让你有更多时间专注于模型本身或业务应用。 现在,每个新注册的 Crusoe 账户都会自动获得 5 美元的免费额度,供你试用。 你只需注册,额度就会直接添加到账户中。 现在就通过下方简介中的链接了解 Crusoe Intelligence Foundry,感谢 Crusoe Cloud 团队赞助本视频。

Anyways, it's not like any distillation works, but when it's used in a specific setup, distillation becomes. a great way to overcome the RL problem. In the typical setup that we associate distillation with, the teacher writes the answer first and the student is then trained to imitate that answer, right? Which means the student is learning from the teacher's generation trajectory and not its own. But the problem of this is that during inference, the student does not live inside the teacher's perfect answer. It has to generate its own answer from scratch. And if it makes a small mistake early that deviates from what the teacher would usually generate, then every next token is now conditioned on that mistake which the teacher will not make or have, which means the error would snowball and lead to answers that are completely wrong. This approach is called off-policy distillation, where policy refers to the probability distribution the model uses to decide what token comes next. So if the student is trained on answers produced by the teacher, the training data is coming from the teacher's policy. But when the student is deployed, the answers come from the student's own policy, which is where we got the name off-policy. And to fix this mismatch, on-policy distillation. was introduced as a better alternative. Instead of copying answers from the teacher, the teacher model actually supervises the student's actual generation trajectory token by token. It's like solving a math question with a teacher looking over your shoulder step by step and correcting you on the way rather than letting you copy their entire solution. Another good analogy of the difference is that off-policy is like watching a chess grandmaster playing in positions that you'll never reach, even though it might be relevant. On-policy, on the other hand, is like a grandmaster sitting beside you evaluating each move you actually played. Okay, so now that we understand what OPD is, then how does it really solve the RL problem?

总之,并不是任何蒸馏方法都有效,但在特定的设置下,蒸馏会成为 克服强化学习问题的绝佳方法。 在我们通常所说的蒸馏设置中,教师模型先写出答案,然后训练学生模型模仿这个答案,对吧? 这意味着学生模型学习的是教师模型的生成轨迹,而不是它自己的。 但问题在于,推理时,学生模型并不是在教师模型的完美答案中运行。 它必须从头生成自己的答案。 如果它一开始犯了一个小错误,偏离了教师模型通常会生成的内容,那么之后的每个词元都要以这个教师模型不会犯、也不会遇到的错误为条件生成。这意味着错误会像滚雪球一样累积,最终导致答案完全错误。 这种方法称为离策略蒸馏,其中的策略是指模型用来决定下一个词元的概率分布。 所以,如果学生模型是用教师模型生成的答案来训练的,训练数据就来自教师模型的策略。 但当学生模型被部署后,答案来自学生模型自己的策略,这就是“离策略”名称的由来。 为了解决这种不匹配, 人们提出了更好的替代方案:同策略蒸馏。 教师模型不是让学生复制自己的答案,而是逐个 token 地监督学生实际的生成轨迹。 这就像做数学题时,老师在你身旁一步步看着你,随时纠正你的错误,而不是让你抄下整份解答。 另一个很好的类比是:离策略就像观看国际象棋特级大师在你永远不会遇到的局面中下棋,尽管这些内容可能有一定参考价值。 而同策略则像是一位特级大师坐在你身边,评估你实际走出的每一步棋。 好了,既然我们已经理解了什么是 OPD,那么它到底是如何解决 RL 问题的呢?

Well, the core issue is that RL increases or decreases the probability of the entire trajectory, even if some parts of the reasoning were not as useful, which leads to RL sharpening the distribution of model really bluntly. But now with OPD, instead of getting one reward at the end, it gets a correction signal at every step. However, the setup has to be like the following to make that possible. You first make a copy of your current model, refine. it using RL to become some sort of specialist, then use that RL model as a teacher to distill to the original model. Not only would it be on policy, but its own training distribution was already really similar to begin with. For example, imagine the math RL specialist discovers a strong reasoning strategy. If you just stop there and use the model though, it might overthink really easily, but if you use that RL trained model as a teacher, OPD can distill the useful reasoning pattern into the student more softly. This is because the student wouldn't inherit the entire sharpened behavior as it only moves the target closer to the teacher in the places where the teacher gives useful token level guidance, since the objective of OPD is next token prediction. On top of that, if you need multiple specialist skills, you no longer need to stack multiple RL objectives directly into one model. You can just train specialists separately, then use them as teachers and distill all of them into the clean base model. This not only prevents all the RL objectives from fighting each other inside the same model, but it also turns the whole process into something. much more modular and scalable. So now we have RL that pushes the capabilities frontier and OPD that consolidates it, which is what DeepCV4 and Mimo V2 Flash have shown in the latest frontier of open source research. In their papers, they demonstrated that the next post-training paradigm converges to training many specialist models with targeted RL, then use OPD to consolidate their capabilities back into one deployable model. So their methodology kind of implies that RL is no longer the thing you use to directly shape the final model for everything. It now only needs to do the thing that it's good at, which is being an exploratory mechanism that can discover capabilities. However, this means you can push multiple specialists into a narrow region as hard as possible where the reward signal is strong and clean. Then have OPD as the transfer mechanism to move that discovered capabilities back into the general model without forcing the general model to go through the same aggressive RL pressure. So the final model can learn from all of them through distillation.

核心问题在于,RL 会提高或降低整条轨迹的概率,即使其中某些推理环节并不那么有用,这会导致 RL 以非常粗糙的方式使模型分布变得尖锐。 但有了 OPD,模型不再只在最后得到一个奖励,而是在每一步都能获得纠正信号。 不过,要做到这一点,必须采用如下设置。 首先,复制一份当前模型,然后对其进行优化, 用 RL 将它训练成某种专家模型,再用这个 RL 模型作为教师,向原始模型进行蒸馏。 这样不仅是同策略的,而且它们的训练分布从一开始就已经非常相似。 例如,假设数学 RL 专家模型发现了一种很强的推理策略。 不过,如果就此打住并直接使用这个模型,它可能很容易过度思考;但如果用这个经过 RL 训练的模型作为教师,OPD 就能更柔和地将有用的推理模式蒸馏给学生模型。 这是因为学生模型不会继承整套被强化得过于尖锐的行为;由于 OPD 的目标是预测下一个 token,它只会在教师提供有用的 token 级指导的地方,让学生的预测目标更接近教师。 此外,如果需要多种专家技能,也不再需要将多个 RL 目标直接叠加到一个模型中。 只需分别训练专家模型,然后以它们为教师,将所有技能蒸馏到未受这些训练影响的基础模型中。 这不仅能防止所有强化学习目标在同一个模型内部相互冲突,还能让整个流程变得 更加模块化、更加可扩展。 所以现在,我们用强化学习拓展能力边界,再用OPD整合这些能力,DeepCV4和Mimo V2 Flash在最新的开源前沿研究中展示了这一点。 他们在论文中表明,下一代后训练范式正趋向于通过有针对性的强化学习训练多个专家模型,然后用OPD将它们的能力整合到一个可部署的模型中。 所以,他们的方法在某种程度上意味着,强化学习不再需要直接塑造最终模型的所有能力。 它现在只需要做好自己擅长的事:作为一种能够发现新能力的探索机制。 这意味着你可以在奖励信号强且清晰的狭窄领域里,尽可能大力地训练多个专家模型。 然后用OPD作为迁移机制,将发现的能力转移回通用模型,而无需让通用模型承受同样激进的强化学习压力。 这样,最终模型就能通过蒸馏向所有专家学习。

But of course, this immediately creates a new. new problem. If you have multiple teachers, which teacher should the student actually listen to? Because a math specialist probably favors using some sets of symbols for reasoning steps, but coding tokens might dislike using math symbols as they are usually avoided in code. And if you naively average all their distributions together, you might get a student that is pulled in conflicting directions in specific areas. Well, for DeepSeek V4, they straight up just sidesteps this problem. In their OPD setup, instead of having every teacher contribute equally to every token, each expert gets a weight and the student selectively learns from the expert that is relevant to the current task context. So for a math prompt, the math expert should dominate, for a coding prompt, the coding expert should dominate, and for an agent prompt, the agent expert should dominate. While this does not mean the problem is solved, it is still how DeepSeek avoids the most naive failure mode of multi-teacher OPD where all teachers pull the student in incompatible directions at once.

但当然,这马上又带来了一个新 新问题。 如果有多个教师模型,学生模型究竟该听哪一个的? 因为数学专家可能倾向于在推理步骤中使用某些符号,而代码词元可能不喜欢使用数学符号,因为代码中通常会避免使用它们。 如果你简单地把它们的分布全部取平均,得到的学生模型在特定领域可能会被拉向相互冲突的方向。 而DeepSeek V4直接绕开了这个问题。 在他们的OPD方案中,并不是让每个教师对每个词元都做出同等贡献,而是给每个专家分配一个权重,让学生有选择地向与当前任务上下文相关的专家学习。 所以,对于数学提示,数学专家应该占主导;对于编程提示,编程专家应该占主导;对于智能体提示,智能体专家应该占主导。 虽然这并不意味着问题已经解决,但DeepSeek正是以此避免了多教师OPD最基本的失败模式:所有教师同时将学生拉向互不兼容的方向。

Another interesting solution is from this paper called CoPD, short for co-evolving policy distillation. Instead of training experts that. separately until convergence and only then doing OPD, they let the expert branches co-evolve. So each branch still does RL on its own domain, but branches periodically distill into each other while they are still close enough for the knowledge to be absorbable. Mimo V2 Flash, on the other hand, addresses this from another angle. They make the student learn from two hybrid signals at the same time, then token-level signals from domain teachers and verifiable outcome-based rewards, basically fusing OPD and RL together. So the final update is just not pure imitation. It has a step-by-step guidance plus verifiable reward model that gives outcome-level direction, so even if the rollout outcome is wrong, it would be suppressed and promoted if it's correct. So as long as the answer is good, it'll learn it. But there is a caveat here. Mimo does not fully remove the need for selective absorption either. It just gives the student another signal to decide whether the teacher-guided trajectory was actually useful. Not to mention, you are still applying RL on top of the model. So if a result is wrong, it will still get suppressed.

另一个有趣的解决方案来自一篇名为CoPD的论文,CoPD是协同进化策略蒸馏的简称。 他们没有训练那些 他们没有让各分支分别收敛后才进行OPD,而是让专家分支共同演进。 每个分支仍在自己的领域内进行强化学习,但在分支之间还足够接近、能够吸收彼此知识时,会定期进行相互蒸馏。 另一方面,Mimo V2 Flash从另一个角度解决这个问题。 他们让学生同时从两种混合信号中学习:来自领域教师的token级信号,以及基于可验证结果的奖励,基本上是将OPD和强化学习融合在一起。 因此,最终的更新并不只是纯粹的模仿。 它既有逐步指导,也有提供结果层面方向的可验证奖励模型,因此,采样结果如果是错的就会受到抑制,如果是对的就会得到强化。 所以只要答案是好的,它就会学习这个答案。 不过,这里有一个需要注意的地方。 Mimo也没有完全消除对选择性吸收的需求。 它只是给了学生另一个信号,让它判断教师引导的轨迹是否真的有用。 更何况,你仍然在模型上应用强化学习。 所以如果结果是错的,它仍然会受到抑制。

But beside the selective absorption problem, you would probably also realize that there is a granularity problem when looking at MIMO's method. Like, is token level more important or is the outcome level more important? This paper called TIP, short for Token Importance in On-Policy Distillation, tackles it from the token level perspective. As there are always a small number of tokens that are the actual decision points where the model is uncertain, wrong, or about to branch into a different reasoning path, they tackled it by calculating the uncertainty of the token. So the paper maps every token using two axes. The first is student entropy, which scores how uncertain the student is, and this is when the model has multiple answers with similar probabilities. The second is teacher-student divergence, where it measures how much the teacher disagrees with the student. Through these two axes, you would basically get a spectrum of relationships. If the student is uncertain and the teacher disagrees, then that is a high-value correction token. But another unexpected useful case is when the student is very confident and the teacher strongly disagrees. Because that means the student is just confidently wrong. And this is one of the most valuable places to apply OPD because this highlights where the model has a systematic bias that needs to be broken. The paper shows that informative OPD tokens come from both high entropy positions and low entropy but high divergence positions just like this one, and that retaining selected tokens can match or beat full token OPD while cutting peak training memory heavily.

但除了选择性吸收的问题,观察MIMO的方法时,你可能还会意识到存在一个粒度问题。 比如说,token级别和结果级别,哪个更重要? 一篇名为TIP的论文从token级别的角度解决了这个问题。TIP是“同策略蒸馏中的Token重要性”的缩写。 总有少数token是真正的决策点,模型在这些位置可能不确定、出错,或者即将转向另一条推理路径。研究者通过计算token的不确定性来解决这个问题。 因此,论文使用两个维度来映射每个token。 第一个是学生熵,用来衡量学生有多不确定,也就是模型给出的多个答案概率相近的情况。 第二个是教师与学生之间的散度,用来衡量教师与学生的意见有多大分歧。 通过这两个维度,基本上可以得到一系列不同的关系。 如果学生模型不确定,而教师模型持不同意见,那么这就是一个高价值的纠错词元。 但另一个出人意料的有用情况是,学生模型非常自信,而教师模型强烈反对。 因为这意味着学生模型自信满满地犯了错。 这是应用OPD最有价值的场景之一,因为它突显了模型中需要打破的系统性偏差。 论文表明,信息量大的OPD词元既来自高熵位置,也来自像这里这样熵低但分歧大的位置;只保留选定的词元,就能达到或超过全词元OPD的效果,同时大幅降低训练内存峰值。

It definitely sounds useful, but of course this has a strong emphasis on the fact that the teacher model is always correct. In long horizon task settings, it is very easy for a model to drift away from the correct trajectory. And it's not like the teacher will be correct 100% of the time either, especially when AI agents might take tens or hundreds of actions. So this May 20 paper proposed SDAR, short for Self-Distilled Agentic Reinforcement Learning. They clarified that for agents, RL should remain the primary optimization backbone and the process should not dominate. So they instead use a gated auxiliary signal where they utilize token-level gates to decide when distillation should help and when it should. back off. If the teacher endorses a token that the student generated, SDAR strengthens that signal. But if the teacher rejects a token, SDAR treats that more cautiously because the teacher might not always be 100% correct or the trajectory might have drifted across multiple turns. This approach is much more agent-aware as agent take actions are a lot more complicated because in multi-turn environments, teacher-student gaps can easily compound across turns and teacher signals are not always that reliable. So the paper keeps RL as the main objective while using OPD as a gated auxiliary objective with a gate controlled by token-level signals like entropy or teacher-student divergence. A lot more cautious when applying OPD basically.

这听起来确实很有用,但当然,这种方法很大程度上依赖于教师模型始终正确这一前提。 在长周期任务中,模型很容易偏离正确的轨迹。 而且教师模型也不可能百分之百正确,尤其是当AI智能体可能要执行几十甚至几百个动作时。 因此,这篇5月20日的论文提出了SDAR,即自蒸馏智能体强化学习。 他们明确指出,对于智能体而言,强化学习应当仍是主要的优化骨干,过程不应占据主导地位。 因此,他们转而使用门控辅助信号,利用词元级门控来决定蒸馏何时应该发挥作用,何时应该 退让。 如果教师模型认可学生模型生成的词元,SDAR就会强化该信号。 但如果教师模型否定某个词元,SDAR会更谨慎地处理,因为教师模型未必总是百分之百正确,而且轨迹可能已经在多个轮次中发生了偏移。 这种方法更加考虑智能体的特点,因为智能体执行动作要复杂得多:在多轮环境中,教师模型与学生模型之间的差距很容易随着轮次累积,而教师模型的信号也并非总是可靠。 因此,论文将强化学习保留为主要目标,同时将OPD作为门控辅助目标,门控由熵或教师模型与学生模型之间的分歧等词元级信号控制。 简单来说,就是在应用OPD时谨慎得多。

So as you can see, this new post-training methodology still seems to be in its early stage of progress and containing many challenges that need to be fixed. But what it offers so far has already demonstrated tremendous value by overcoming a major pain point of RL, which means we will probably see more frontier AI labs other than DeepSeek and Xiaomi picking it up and experimenting. experimenting, maybe even providing an even more elegant solution than what we have seen so far. And what do you think about this AI research development? Let me know down in the comments too. And if learning about on-policy distillation today makes you want to learn more in depth about LLMs, my platform intuitiveai. academy might just be the perfect place for you to start. The platform focuses on helping you build an intuitive understanding of the key concepts behind LLMs from the fundamentals all the way to advanced topics like mixture of experts and model optimization. And rather than bombarding you with intimidating math, we want to make sure you fully understand the higher level logic first so the technical details actually make sense when you get to them. On top of that, we recently just had a content revamp where we went back and updated all the early fundamental materials to make the learning experience much better. We also recently added a new quiz system that tests your understanding after every chapter along with a weekly leaderboard to make learning a little more competitive. So if you're working with LLMs at work, transitioning into the field, or wanting to get into LLM research, check it out using the link down in the description and use our limited time code back to school. for 50% off a yearly membership. and thank you guys for watching. a big shout out to spammatch, chris ladoux, deegan, robert zaviasa, puf and inu, dx research group, alex, leo halawani, and many others that support me through patreon or youtube. follow me on twitter if you haven't and i'll see you in the next one.

所以,正如你所看到的,这种新的后训练方法似乎仍处于发展的早期阶段,还有许多挑战需要解决。 但它目前展现出的能力,已经通过克服强化学习的一大痛点证明了巨大的价值。这意味着,除了DeepSeek和小米之外,我们可能会看到更多前沿AI实验室采用并尝试这种方法。 进行尝试,甚至可能提出比目前所见更优雅的解决方案。 那么,你怎么看待这项 AI 研究进展? 也欢迎在评论区告诉我。 如果今天对在策略蒸馏的了解让你想更深入地学习大语言模型,我的平台 intuitiveai. academy 也许正是你开始学习的理想之地。 这个平台专注于帮助你直观理解大语言模型背后的核心概念,涵盖从基础知识到专家混合模型和模型优化等高级主题。 我们不会用令人望而生畏的数学知识狂轰滥炸,而是希望你先充分理解高层次的逻辑,这样学到技术细节时才能真正理解它们。 此外,我们最近还对内容进行了一次全面改版,重新更新了所有早期的基础材料,让学习体验更上一层楼。 我们最近还新增了一套测验系统,在每章结束后检验你的理解程度,并设置了每周排行榜,让学习更有竞争性。 所以,如果你在工作中使用大语言模型、正在转行进入这个领域,或者想从事大语言模型研究,可以通过下方简介中的链接了解一下,并使用我们的限时代码 back to school, 即可享受年度会员五折优惠。 感谢大家观看。 特别感谢 spammatch、chris ladoux、deegan、robert zaviasa、puf and inu、dx research group、alex、leo halawani,以及许多其他通过 Patreon 或 YouTube 支持我的朋友。 如果你还没关注我的 Twitter,记得关注,我们下期再见。

摘要

视频探讨同策略蒸馏如何缓解强化学习后训练中的能力偏窄与目标冲突。强化学习可帮助模型探索新能力,但奖励会强化整条生成轨迹,使概率分布偏向特定行为;同策略蒸馏则让教师逐词监督学生自己的生成过程。将强化学习训练出的多个专家作为教师,可以更模块化地向通用模型转移能力。视频还比较 DeepSeek V4、MiMo V2 Flash、CoPD、TIP 和 SDAR 在专家选择、信号粒度及教师可靠性方面的不同方法,并指出该领域仍处于早期,效果和适用范围有待进一步探索。

章节

00:00 强化学习的能力收益与分布收窄

预训练通过预测下一个 token 学习广泛的文本分布,使模型能够生成多种延续并具备泛化能力。强化学习则提高高奖励生成轨迹的概率、降低低奖励轨迹的概率,长期更新可能使模型过度偏向受奖励的行为。数学专家可能在简单问题上过度推理,代码专家可能牺牲开放式解释和风格灵活性;多个强化学习目标还可能相互压制。

强化学习提升特定能力同时降低泛化性

02:45 赞助内容:托管推理与微调

Crusoe Intelligence Foundry 提供托管推理和无服务器微调等服务,用户可通过 API 部署模型或使用自己的数据微调,而不必自行配置 GPU 集群。赞助内容称新账户可获得 5 美元试用额度。

托管推理与无服务器微调服务

03:55 离策略与同策略蒸馏

离策略蒸馏让学生模仿教师生成的答案,但部署时学生必须自行生成;早期偏离教师轨迹的错误可能逐步累积。同策略蒸馏改为让教师逐 token 监督学生实际生成的轨迹,类似老师对学生正在做的每一步提供指导,从而缩小训练与推理轨迹之间的差异。

同策略蒸馏的逐词监督

05:36 用强化学习专家向通用模型转移能力

一种做法是复制现有模型,用强化学习将副本训练为专家,再让专家作为教师向原模型蒸馏。逐 token 信号可以更细致地传递有用策略,而不必让学生完整继承专家过度强化的行为。多个专家可分别训练,再向同一个基础模型传递能力;DeepSeek V4 和 MiMo V2 Flash 被用作这种能力探索与整合思路的例子。

专项模型能力向通用模型的整合

07:58 多教师冲突与选择性吸收

不同专家对同一 token 的偏好可能冲突,直接平均教师分布会把学生拉向不兼容的方向。DeepSeek V4 的方案为专家分配权重,让当前任务相关的专家占主导,例如数学任务侧重数学专家、代码任务侧重代码专家。这避免了最直接的冲突,但并不意味着多教师问题已经彻底解决。

学生根据任务上下文选择相关专家进行学习

08:53 专家共同演化与蒸馏、奖励混合

CoPD 让各领域专家分支分别进行强化学习,并在训练过程中定期相互蒸馏,而不是等专家各自收敛后才转移知识。MiMo V2 Flash 则结合领域教师的逐 token 信号与可验证的结果奖励:正确结果得到强化,错误结果受到抑制。这提供了判断轨迹是否有用的额外信号,但仍需选择性吸收,也未摆脱强化学习的影响。

领域教师的词元级信号与可验证的结果奖励

10:00 TIP:选择重要的蒸馏 token

TIP 根据学生熵和师生分歧衡量 token 的信息量。学生不确定且教师不同意的位置可能是重要的纠错点;学生高度自信但教师强烈反对的位置,也可能暴露系统性偏差。该研究发现,保留选出的 token 可以达到或超过全 token 蒸馏的效果,同时大幅降低峰值训练内存。

学生熵:衡量学生的不确定性
师生分歧:衡量教师与学生的意见差异
学生不确定且教师不认同时的高价值纠错 token
学生高度自信但教师强烈不认同的情况
筛选 token 的效果与训练内存结论

11:23 SDAR:对智能体任务谨慎使用教师信号

长时程、多轮智能体任务中,轨迹可能漂移,教师也不总是正确。SDAR 保留强化学习作为主要优化目标,将蒸馏作为受 token 级门控控制的辅助信号:教师认可学生生成的 token 时加强信号,教师否定时则更谨慎。门控可参考熵或师生分歧,以减少不可靠教师意见造成的影响。

RL主目标与门控辅助目标

12:41 发展前景与学习资源

同策略蒸馏后训练仍处于早期,选择性吸收、信号粒度和教师可靠性等问题有待解决,但其缓解强化学习局限的潜力值得进一步实验。片尾推广 Intuitive AI Academy:课程侧重直观理解大模型概念,提供更新后的基础材料、章节测验和排行榜,并宣传年费优惠。

学习平台的章节测验与排行榜

结论

01:23 强化学习能够探索新能力,但奖励驱动的分布收窄可能损害模型的通用性。

04:57 同策略蒸馏通过监督学生自己的生成轨迹,缓解模仿教师答案时的训练与推理差异。

06:40 分别训练强化学习专家并向基础模型蒸馏,可更模块化地整合多种能力。

08:23 多教师蒸馏需要根据任务选择或加权专家,以减少相互冲突的指导。

11:10 重要 token 的选择可以兼顾蒸馏效果与训练内存效率。

12:28 在长时程智能体任务中,不可靠的教师信号需要谨慎门控,强化学习仍可作为主要优化目标。

12:41 同策略蒸馏具有潜力,但相关后训练方法仍处于早期并面临多项挑战。