用两个协作智能体交替训练,让大模型更稳定地优化。
Coevolving with the Other You: Fine-Tuning LLM with Sequential Cooperative Multi-Agent Reinforcement Learning
- 将模型拆成先锋与观察者,轮流生成响应并协同训练。
- 在IMDB和GSM8K上优于PPO,抗分布坍塌能力更强。
- 适合追求训练稳定性和生成多样性的大模型调优场景。
强化学习(RL)已成为微调大语言模型(LLM)的关键技术。然而,现有方法主要依赖PPO及其变体,虽在通用强化学习中有效,但在微调LLM时常表现不佳,易出现分布坍塌。本文提出CORY,将LLM微调扩展至顺序协作多智能体强化学习框架,利用多智能体系统的共进化与涌现能力。CORY将待微调的LLM初始复制为两个自主智能体:先锋与观察者。先锋根据查询生成响应,观察者则结合查询和先锋的响应生成回应。二者共同训练,并周期性交换角色,促进协作与共进化。实验在IMDB Review和GSM8K数据集上分别使用主观与客观奖励函数对GPT-2和Llama-2进行微调。结果表明,CORY在策略最优性、抗分布坍塌能力及训练鲁棒性方面均优于PPO,展现出其在真实应用中优化大模型的潜力。
原文摘要 · Abstract (English)
Reinforcement learning (RL) has emerged as a pivotal technique for fine-tuning large language models (LLMs) on specific tasks. However, prevailing RL fine-tuning methods predominantly rely on PPO and its variants. Though these algorithms are effective in general RL settings, they often exhibit suboptimal performance and vulnerability to distribution collapse when applied to the fine-tuning of LLMs. In this paper, we propose CORY, extending the RL fine-tuning of LLMs to a sequential cooperative multi-agent reinforcement learning framework, to leverage the inherent coevolution and emergent capabilities of multi-agent systems. In CORY, the LLM to be fine-tuned is initially duplicated into two autonomous agents: a pioneer and an observer. The pioneer generates responses based on queries, while the observer generates responses using both the queries and the pioneer's responses. The two agents are trained together. During training, the agents exchange roles periodically, fostering cooperation and coevolution between them. Experiments evaluate CORY's performance by fine-tuning GPT-2 and Llama-2 under subjective and objective reward functions on the IMDB Review and GSM8K datasets, respectively. Results show that CORY outperforms PPO in terms of policy optimality, resistance to distribution collapse, and training robustness, thereby underscoring its potential as a superior methodology for refining LLMs in real-world applications.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。