Skip to main content
QUICK REVIEW

[Paper Review] AlpaGasus: Training A Better Alpaca with Fewer Data

Lichang Chen, Shiyang Li|arXiv (Cornell University)|Jul 17, 2023
Video Analysis and SummarizationComputer Science15 citations
TL;DR

AlpaGasus automatically filters high-quality instruction data from Alpaca’s 52k dataset using a strong LLM as an auto-grader, then fine-tunes a smaller model (9k data) that surpasses Alpaca and offers faster training.

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. 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/

Motivation & Objective

  • Motivate data quality over quantity in instruction fine-tuning (IFT) for LLMs.
  • Propose an automatic data-filtering method using a strong LLM as evaluator to improve IFT data quality.
  • Show that a smaller, high-quality subset can outperform a larger, noisier dataset in instruction-following tasks.

Proposed method

  • Define a scoring prompt for a strong LLM (e.g., ChatGPT) to rate each (instruction, input, response) triplet on an accuracy dimension.
  • Filter Alpaca’s 52k data by thresholding scores to obtain a 9,229-sample subset from which AlpaGasus is finetuned.
  • Train the base model (LLaMA-series) with the same Alpaca IFT pipeline on the filtered 9k data.
  • Evaluate using GPT-4 as judge to compare AlpaGasus versus Alpaca across multiple test sets and benchmarks.
  • Conduct human evaluations to validate model comparisons and assess task granularity across Generic, Roleplay, Knowledge, and Commonsense.

Experimental results

Research questions

  • RQ1Can automatic data quality assessment with a strong LLM improve instruction-following performance when finetuning a model on fewer data?
  • RQ2How does AlpaGasus compare to Alpaca and other baselines across diverse test sets and benchmarks when trained on high-quality filtered data?
  • RQ3Is data quality more impactful than data quantity for IFT across model sizes and base architectures?
  • RQ4Do results generalize across different LLM filters, base models, and data types (machine-generated vs human-written)?

Key findings

  • AlpaGasus trained on 9k high-quality data significantly outperforms Alpaca trained on 52k data on four test sets (Vicuna, Koala, Self-Instruct, WizardLM).
  • The 13B AlpaGasus model reaches over 90% of the performance of its teacher Text-Davinci-003 on test tasks.
  • AlpaGasus achieves 5.7x faster training time, reducing 7B training from 80 minutes to 14 minutes on 4× NVIDIA A100 (80GB) GPUs.
  • Evaluation with GPT-4 as judge shows AlpaGasus often outperforms Alpaca across multiple benchmarks, with human studies corroborating its superiority.
  • Filtered data generalizes across base models (LLaMA-1 and LLaMA-2) and different LLM filters (ChatGPT and Claude-2).
  • Data quality filtering yields meaningful cost savings and faster iteration without sacrificing instruction-following performance.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.