SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.12621 · ACL · 2024

Reflect-RL: Two-Player Online RL Fine-Tuning for LMs

Runlong Zhou, Beibin Li, S. Du

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 6 functions out of this paper's own repositories and ran 2 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
zhourunlong/Reflect-RL — 2 of 6
FunctionStatusWhere it lives
PolicyTrainer Ran zhourunlong/Reflect-RL/trainers/ppotrainer.py
code served (permissive licence) · get_code("9917f19d5da4578d")
compile_from_log Ran zhourunlong/Reflect-RL/trainers/ppotrainer.py
code served (permissive licence) · get_code("2e00d68051c3a593")
PPOTrainer Not yet run zhourunlong/Reflect-RL/trainers/ppotrainer.py
code served (permissive licence) · get_code("67efdf6ed6ca2dca")
calc_probs_log_probs Not yet run zhourunlong/Reflect-RL/trainers/ppotrainer.py
code served (permissive licence) · get_code("634c2c825e2d9f24")
compute_advantage Not yet run zhourunlong/Reflect-RL/trainers/ppotrainer.py
code served (permissive licence) · get_code("39a497facb3b1a48")
update_critic Not yet run zhourunlong/Reflect-RL/trainers/ppotrainer.py
code served (permissive licence) · get_code("0d7d3c331692259a")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

As language models (LMs) demonstrate their capabilities in various fields, their application to tasks requiring multi-round interactions has become increasingly popular. These tasks usually have complex dynamics, so supervised fine-tuning (SFT) on a limited offline dataset does not yield good performance. However, only a few works attempted to directly train the LMs within interactive decision-making environments. We aim to create an effective approach to finetune LMs with online reinforcement learning (RL) in these environments. We propose Reflect-RL, a two-player system to fine-tune an LM using SFT and online RL, where a frozen reflection model (player) assists the policy model (player). To generate data for the warm-up SFT stage, we use negative example generation to enhance the error-correction ability of the reflection model. Furthermore, we designed single-prompt action enumeration and applied curriculum learning to allow the policy model to learn more efficiently. Empirically, we verify that Reflect-RL outperforms SFT and online RL without reflection. Testing results indicate GPT-2 XL 1.56B fine-tuned with Reflect-RL outperforms larger open-source LMs, such as Mistral 7B. The benchmarks, dataset, and code involved in this work are publicly available. 1

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2402.12621")
get_code_for_paper("2402.12621")
have("2402.12621")

Connect an agent — have() is free.