Self-Instruct: Aligning Language Models with Self-Generated Instructions

Yizhong Wang, Yeganeh Kordi, Swaroop Mishra, Alisa Liu, Noah A. Smith +2 more
12/20/2022
cs.CLcs.AI

Official code: yizhongw/self-instruct (4,616 stars, Apache-2.0, last commit 2023-03-27). 1 more implementation below.

Abstract

Large "instruction-tuned" language models (i.e., finetuned to respond to instructions) have demonstrated a remarkable ability to generalize zero-shot to new tasks. Nevertheless, they depend heavily on human-written instruction data that is often limited in quantity, diversity, and creativity, therefore hindering the generality of the tuned model. We introduce Self-Instruct, a framework for improving the instruction-following capabilities of pretrained language models by bootstrapping off their own generations. Our pipeline generates instructions, input, and output samples from a language model, then filters invalid or similar ones before using them to finetune the original model. Applying our method to the vanilla GPT3, we demonstrate a 33% absolute improvement over the original model on Super-NaturalInstructions, on par with the performance of InstructGPT-001, which was trained with private user data and human annotations. For further evaluation, we curate a set of expert-written instructions for novel tasks, and show through human evaluation that tuning GPT3 with Self-Instruct outperforms using existing public instruction datasets by a large margin, leaving only a 5% absolute gap behind InstructGPT-001. Self-Instruct provides an almost annotation-free method for aligning pre-trained language models with instructions, and we release our large synthetic dataset to facilitate future studies on instruction tuning. Our code and data are available at https://github.com/yizhongw/self-instruct.

View on arXivView PDF

Code Implementations(2)

Apache-2.0

Aligning pretrained language models with instruction data generated by themselves.

4,616519Shell, PythonDec 20, 20223 years agoApache-2.0
general-purpose-modelinstruction-tuninglanguage-model
Apache-2.0

Code and documentation to train Stanford's Alpaca models, and generate the data.

30,2373,981PythonMar 10, 20232 years agoApache-2.0
deep-learninginstruction-followinglanguage-model

Cite this paper

@article{wang2022selfinstruct,
  title  = {Self-Instruct: Aligning Language Models with Self-Generated Instructions},
  author = {Yizhong Wang and Yeganeh Kordi and Swaroop Mishra and Alisa Liu and Noah A. Smith and Daniel Khashabi and Hannaneh Hajishirzi},
  year   = {2022},
  eprint = {2212.10560},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2212.10560}
}

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/2212.10560.svg)](https://codeofpaper.com/paper/2212.10560)

Discussion