AlpaGasus: Training A Better Alpaca with Fewer Data

Lichang Chen, Shi-Yang Li, Jun Yan, Hai Wang, Kalpa Gunaratna +6 more
7/1/2023
361 citations

Official code: gpt4life/alpagasus (94 stars, Python, last commit 2023-09-23).

Abstract

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.

Show full abstract

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: https://lichang-chen.github.io/AlpaGasus/

View on arXivView PDF

Code Implementations(1)

gpt4life/alpagasusOfficial100%

Unofficial implementation of AlpaGasus

947Python, ShellJul 18, 20233 years ago

Similar Papers

Cite this paper

@article{chen2023alpagasus,
  title  = {AlpaGasus: Training A Better Alpaca with Fewer Data},
  author = {Lichang Chen and Shi-Yang Li and Jun Yan and Hai Wang and Kalpa Gunaratna and Vikas Yadav and Zheng Tang and Vijay Srinivasan and Tian-Yi Zhou and Heng Huang and Hong-Xia Jin},
  year   = {2023},
  eprint = {2307.08701},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2307.08701},
  url    = {https://doi.org/10.48550/arXiv.2307.08701},
  journal = {International Conference on Learning Representations}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2307.08701.svg)](https://codeofpaper.com/paper/2307.08701)

Discussion