Large language models~(LLMs) strengthen instruction-following capability through instruction-finetuning (IFT) on supervised instruction/response data. However, widely used IFT datasets (e.g., Alpaca's 52k data) surprisingly contain many low-quality instances with incorrect or irrelevant responses, which are misleading and detrimental to IFT. In this paper, we propose a simple and effective data selection strategy that automatically identifies and filters out low-quality data using a strong LLM (e.g., ChatGPT). To this end, we introduce AlpaGasus, which is finetuned on only 9k high-quality data filtered from the 52k Alpaca data. AlpaGasus significantly outperforms the original Alpaca as evaluated by GPT-4 on multiple test sets and the controlled human evaluation. Its 13B variant matches $>90\%$ performance of its teacher LLM (i.e., Text-Davinci-003 generating the 52k data) on test tasks. It also provides 5.7x faster training, reducing the training time for a 7B variant from 80 minutes (for Alpaca) to 14 minutes. Moreover, the experiments prove the efficacy of our method across diverse datasets, base models, and LLM filters. Overall, AlpaGasus demonstrates a novel data-centric IFT paradigm that can be generally applied to instruction-tuning data, leading to faster training and better instruction-following models. Our project page is available at: \url{https://lichang-chen.github.io/AlpaGasus/}
翻译:大语言模型通过监督式指令/响应数据的指令微调来增强指令遵循能力。然而,广泛使用的指令微调数据集(如Alpaca的52k数据)令人惊讶地包含许多低质量样本,这些样本带有错误或不相关的响应,对指令微调具有误导性和破坏性。在本文中,我们提出一种简单有效的数据选择策略,利用强大的大语言模型(如ChatGPT)自动识别并过滤低质量数据。为此,我们引入AlpaGasus,它仅使用从52k Alpaca数据中筛选出的9k高质量数据进行微调。经过GPT-4在多个测试集和受控人类评估上的评价,AlpaGasus显著优于原始Alpaca。其13B变体在测试任务中匹配了教师大语言模型(即生成52k数据的Text-Davinci-003)超过90%的性能。它还提供了5.7倍更快的训练,将7B变体的训练时间从80分钟(Alpaca)缩短至14分钟。此外,实验证明了我们的方法在多样化数据集、基础模型和大语言模型过滤器上的有效性。总体而言,AlpaGasus展示了一种新颖的以数据为中心的指令微调范式,可广泛应用于指令微调数据,从而带来更快的训练和更好的指令遵循模型。我们的项目页面位于:\url{https://lichang-chen.github.io/AlpaGasus/}