arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.18341cs.PLcs.AIcs.LG
收藏

基于强化学习反馈的代码模型粗调

Coarse-Tuning Models of Code with Reinforcement Learning Feedback

Rice University(莱斯大学);UT Austin(德克萨斯大学奥斯汀分校);University of Wisconsin(威斯康星大学)

Abhinav Jain, Chima Adiole, Swarat Chaudhuri, Thomas Reps, Chris Jermaine

AI总结:

提出RLCF,用强化学习结合编译器和LLM反馈粗调代码模型,在Java任务上提升编译与执行正确率,达到更大模型性能。

摘要:

在代码上预训练的大型语言模型(LLMs)近来已成为程序合成的主流方法。然而,这些模型使用下一个词元预测进行训练,忽略了代码的语法和语义。我们提出了RLCF,通过强化学习进一步训练预训练LLM,使用来自基础函数的反馈来评分代码质量。该基础函数使用(i)来自编译器的反馈,判断生成的代码是否通过一组正确性检查;以及(ii)来自另一个LLM的反馈,将生成的代码与参考代码进行比较。RLCF与模型和语言无关。我们在Java的MBJP和MathQA任务上进行了实证评估。实验表明,RLCF提高了LLM生成的程序编译、可执行并在测试中产生正确输出的几率,通常使LLM能够达到2倍至8倍更大的LLM的性能。

英文摘要:

Large Language Models (LLMs) pre-trained on code have recently emerged as the dominant approach to program synthesis. However, these models are trained using next-token prediction, which ignores the syntax and semantics of code. We propose RLCF, that further trains a pre-trained LLM via reinforcement learning, using feedback from a grounding function that scores the quality of the code. The grounding function uses (i) compiler-derived feedback on whether the code it generates passes a set of correctness checks; and (ii) feedback from a different LLM that compares the generated code to a reference code. RLCF is model- and language-agnostic. We empirically evaluate it on the MBJP and MathQA tasks for Java. Our experiments show that RLCF raises the odds that an LLM-generated program compiles, is executable, and produces the right output on tests, often allowing LLMs to match the performance of 2x-8x larger LLMs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑