语言人工智能指南

拒绝采样微调

Rejection-sampling fine-tuning generates candidate responses, filters them with a reward model or verifier, and uses selected examples for supervised training.

听听这个指南AI叙述 · ~2 min

在本页阅读时间:2分钟
  1. 概述
  2. 深入探讨
  3. 现实世界的实施
  4. 拒绝采样微调的未来
  5. 付诸实践
  6. 不断探索
  7. 常见问题

概述

It can be simpler than policy-gradient optimization, but quality depends on the candidate pool and scorer.

深入探讨

A rejection-sampling fine-tuning loop prompts a policy to generate multiple candidates, scores them with a reward model or task-specific verifier, and retains examples meeting a selection rule. The model is then fine-tuned with supervised learning on selected responses. In verifiable tasks, tests or exact-answer checks can provide a reward; open-ended tasks often rely on learned preference scores. Llama 2-Chat’s paper describes rejection sampling as one stage of its alignment pipeline. RFT can transfer best-of-N behavior into a model, but cannot select answers absent from the candidate pool and may overfit or exploit an imperfect scorer. It is not equivalent to every RLHF recipe and does not guarantee higher quality or diversity.

现实世界的实施

通过对每个提示采样多个答案来调整 Llama 风格的模型,保持最高的奖励模型分数,然后对这些答案进行 SFT

通过生成许多解决方案并仅保留那些达到正确、可检查答案的解决方案来改进数学求解器

代码生成,仅当候选人通过单元测试时才保留候选人,然后用作训练数据

通过过滤模型自身的最佳自生成响应来构建合成指令数据集以用于下一轮训练

拒绝采样微调的未来

RFT 是现代后训练的核心,通常在 PPO 和 DPO 等 RL 方法之前或与它一起使用。它的吸引力随着廉价的推理和强大的自动验证器而增长:随着模型在自我生成和自我检查方面变得更好,迭代拒绝采样支持合成数据和自我改进循环。期望与推理模型更紧密地集成,产生可验证的思想链,并持续研究如何在对模型自己的输出进行重复训练时避免奖励黑客和多样性崩溃。

付诸实践

为什么这很重要

  • 速度与规模. 语言工作流程可以在不牺牲一致性的情况下更快地移动。
  • 交通与覆盖范围. 它扩展了跨语言和沟通方式的访问。
  • 更清晰的判决. 团队可以花更多时间进行判断,而自动化则可以处理重复。

留意

  • 幻觉的事实可以悄悄地进入报告、支持流程或研究成果。
  • 及时的敏感性可能会在类似的请求中产生不一致的结果。
  • 如果访问控制薄弱,敏感文本数据可能会暴露。

后续步骤

  1. 在推出之前定义输出格式、语气和质量标准。
  2. 当准确性很重要时,请使用可信来源进行地面响应。
  3. 为高风险输出保留人工审查检查点。
  4. 跟踪故障模式并定期重新训练提示或工作流程。

不断探索

免费通讯

获取每日AI简报

每个工作日早晨提供三条经过验证的AI故事,使用简明英文撰写。永久免费,无广告。

每个工作日发送一封邮件。一键退订。我们永不出售或分享您的地址。

测试一下自己

Take the Rejection Sampling Fine-Tuning quiz

每个答案即时反馈,课程通过后可获得可验证ID的可分享证书。

开始测验

支持免费AI教育。AI Understanding是一家501(c)(3)非营利组织——无广告,无付费墙,永不收费。 捐款

常见问题

什么是拒绝采样微调?

Rejection-sampling fine-tuning generates candidate responses, filters them with a reward model or verifier, and uses selected examples for supervised training. It can be simpler than policy-gradient optimization, but quality depends on the candidate pool and scorer.

哪个循环最能描述拒绝采样微调如何改进模型?

RFT 对多个响应进行采样,筛选出得分最高的响应,并对这些获胜者的模型进行微调。

在数学或代码等可验证领域,什么可以作为奖励?

对于可检查的任务,RFT 可以使用精确的正确性或通过单元测试,从而避免学习奖励模型。

Which model family does the cited paper describe using rejection sampling in its alignment pipeline?

The Llama 2 paper describes rejection sampling as one stage of the Llama 2-Chat alignment pipeline.

Why might a team choose rejection-sampling fine-tuning over a policy-gradient approach for some tasks?

RFT uses generated and filtered examples for supervised updates, though generation, scoring, and data quality still incur costs.

对最大奖励样本进行有效训练有什么作用?

通过从最过滤的响应中学习,该模型在一代人中内化了更高质量的行为。