TensorX
返回文献探索

Paper · arXiv 2307.04349

RLTF: Reinforcement Learning from Unit Test Feedback

Jiate Liu, Yiqin Zhu, Kaiwen Xiao, Qiang Fu, Xiao Han, Wei Yang, Deheng Ye

5 upvotesJuly 10, 2023arXiv 预印本
AI 摘要

A new reinforcement learning framework using multi-granularity unit test feedback enhances code generation with large language models, achieving superior performance on benchmarks.

reinforcement learninglarge language modelsoffline frameworksunit test feedbackRLTFreal-time trainingfine-grained feedbackcode generationAPPSMBPP benchmarks

Abstract

The goal of program synthesis, or code generation, is to generate executable code based on given descriptions. Recently, there has been an increasing number of studies employing reinforcement learning (RL) to improve the performance of large language models (LLMs) for code. However, these RL methods have only used offline frameworks, limiting their exploration of new sample spaces. Additionally, current approaches that utilize unit test signals are rather simple, not accounting for specific error locations within the code. To address these issues, we proposed RLTF, i.e., Reinforcement Learning from Unit Test Feedback, a novel online RL framework with unit test feedback of multi-granularity for refining code LLMs. Our approach generates data in real-time during training and simultaneously utilizes fine-grained feedback signals to guide the model towards producing higher-quality code. Extensive experiments show that RLTF achieves state-of-the-art performance on the APPS and the MBPP benchmarks. Our code can be found at: https://github.com/Zyq-scut/RLTF.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号