Self-play with Execution Feedback: Improving Instruction-following Capabilities of Large Language Models

Guanting Dong,Keming Lu,Chengpeng Li,Tingyu Xia,Bowen Yu,Chang Zhou,Jingren Zhou
2024-07-18
Abstract:One core capability of large language models (LLMs) is to follow natural language instructions. However, the issue of automatically constructing high-quality training data to enhance the complex instruction-following abilities of LLMs without manual annotation remains unresolved. In this paper, we introduce AutoIF, the first scalable and reliable method for automatically generating instruction-following training data. AutoIF transforms the validation of instruction-following data quality into code verification, requiring LLMs to generate instructions, the corresponding code to check the correctness of the instruction responses, and unit test samples to verify the code's correctness. Then, execution feedback-based rejection sampling can generate data for Supervised Fine-Tuning (SFT) and Reinforcement Learning from Human Feedback (RLHF) training. AutoIF achieves significant improvements across three training algorithms, SFT, Offline DPO, and Online DPO, when applied to the top open-source LLMs, Qwen2 and LLaMA3, in self-alignment and strong-to-weak distillation settings. Our code is publicly available at <a class="link-external link-https" href="https://github.com/QwenLM/AutoIF" rel="external noopener nofollow">this https URL</a>.
Computation and Language,Artificial Intelligence,Machine Learning
What problem does this paper attempt to address?
The problem this paper attempts to address is how to automatically construct high-quality instruction-following training data to enhance the complex instruction-following capabilities of large language models (LLMs) without the need for manual annotation. Specifically, the paper proposes a method called AUTOIF, which generates instruction-following training data through code verification and utilizes execution feedback for data filtering, thereby improving the model's performance in supervised fine-tuning (SFT) and reinforcement learning from human feedback (RLHF).