Fluxo de Trabalho RLHF: Da Modelagem de Recompensa ao RLHF Online
RLHF Workflow: From Reward Modeling to Online RLHF
May 13, 2024
Autores: Hanze Dong, Wei Xiong, Bo Pang, Haoxiang Wang, Han Zhao, Yingbo Zhou, Nan Jiang, Doyen Sahoo, Caiming Xiong, Tong Zhang
cs.AI
Resumo
Apresentamos o fluxo de trabalho do Aprendizado por Reforço Iterativo Online com Feedback Humano (RLHF) neste relatório técnico, que é amplamente relatado como superando sua contraparte offline por uma grande margem na literatura recente sobre modelos de linguagem de grande escala (LLM). No entanto, os projetos de RLHF de código aberto existentes ainda estão amplamente confinados ao cenário de aprendizado offline. Neste relatório técnico, nosso objetivo é preencher essa lacuna e fornecer uma receita detalhada que seja fácil de reproduzir para o RLHF iterativo online. Em particular, como o feedback humano online geralmente é inviável para comunidades de código aberto com recursos limitados, começamos construindo modelos de preferência usando um conjunto diversificado de conjuntos de dados de código aberto e usamos o modelo de preferência proxy construído para aproximar o feedback humano. Em seguida, discutimos as percepções teóricas e os princípios algorítmicos por trás do RLHF iterativo online, seguidos por uma implementação prática detalhada. Nosso LLM treinado, SFR-Iterative-DPO-LLaMA-3-8B-R, alcança desempenho impressionante em benchmarks de chatbots LLM, incluindo AlpacaEval-2, Arena-Hard e MT-Bench, bem como em outros benchmarks acadêmicos como HumanEval e TruthfulQA. Demonstramos que o ajuste fino supervisionado (SFT) e o RLHF iterativo podem obter desempenho de última geração com conjuntos de dados totalmente de código aberto. Além disso, disponibilizamos publicamente nossos modelos, conjuntos de dados curados e guias de código passo a passo abrangentes. Consulte https://github.com/RLHFlow/RLHF-Reward-Modeling e https://github.com/RLHFlow/Online-RLHF para obter informações mais detalhadas.
English
We present the workflow of Online Iterative Reinforcement Learning from Human
Feedback (RLHF) in this technical report, which is widely reported to
outperform its offline counterpart by a large margin in the recent large
language model (LLM) literature. However, existing open-source RLHF projects
are still largely confined to the offline learning setting. In this technical
report, we aim to fill in this gap and provide a detailed recipe that is easy
to reproduce for online iterative RLHF. In particular, since online human
feedback is usually infeasible for open-source communities with limited
resources, we start by constructing preference models using a diverse set of
open-source datasets and use the constructed proxy preference model to
approximate human feedback. Then, we discuss the theoretical insights and
algorithmic principles behind online iterative RLHF, followed by a detailed
practical implementation. Our trained LLM, SFR-Iterative-DPO-LLaMA-3-8B-R,
achieves impressive performance on LLM chatbot benchmarks, including
AlpacaEval-2, Arena-Hard, and MT-Bench, as well as other academic benchmarks
such as HumanEval and TruthfulQA. We have shown that supervised fine-tuning
(SFT) and iterative RLHF can obtain state-of-the-art performance with fully
open-source datasets. Further, we have made our models, curated datasets, and
comprehensive step-by-step code guidebooks publicly available. Please refer to
https://github.com/RLHFlow/RLHF-Reward-Modeling and
https://github.com/RLHFlow/Online-RLHF for more detailed information.