Coffee-Gym:一个用于评估和改进对错误代码的自然语言反馈的环境
Coffee-Gym: An Environment for Evaluating and Improving Natural Language Feedback on Erroneous Code
AI总结:
Coffee-Gym 通过构建代码编辑反馈数据集 Coffee 和奖励函数 CoffeeEval,解决了 RL 训练反馈模型缺乏高质量数据和准确奖励的问题,训练出的反馈模型能显著提升开源代码 LLM 的编辑性能,达到接近闭源模型的水平。
摘要:
本文提出了 Coffee-Gym,一个用于训练提供代码编辑反馈模型的综合强化学习(RL)环境。Coffee-Gym 包含两个主要组成部分:(1)Coffee,一个包含人类对编码问题的代码编辑轨迹以及针对错误代码的机器生成反馈的数据集;(2)CoffeeEval,一个奖励函数,通过评估修改后代码在单元测试中的表现,忠实地反映反馈的有用性。借助这两个组件,Coffee-Gym 解决了使用 RL 训练反馈模型时高质量数据集不可用的问题,并提供了比当前最优奖励模型(即 GPT-4)更准确的奖励。通过应用 Coffee-Gym,我们训练出的反馈模型在增强开源代码大语言模型(LLM)的代码编辑能力方面优于基线模型,使其可与闭源 LLM 相媲美。我们公开了该数据集和模型检查点。
英文摘要:
This paper presents Coffee-Gym, a comprehensive RL environment for training models that provide feedback on code editing. Coffee-Gym includes two major components: (1) Coffee, a dataset containing humans' code edit traces for coding questions and machine-written feedback for editing erroneous code; (2) CoffeeEval, a reward function that faithfully reflects the helpfulness of feedback by assessing the performance of the revised code in unit tests. With them, Coffee-Gym addresses the unavailability of high-quality datasets for training feedback models with RL, and provides more accurate rewards than the SOTA reward model (i.e., GPT-4). By applying Coffee-Gym, we elicit feedback models that outperform baselines in enhancing open-source code LLMs' code editing, making them comparable with closed-source LLMs. We make the dataset and the model checkpoint publicly available.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。