Self-Instruct
The 2022 paper that demonstrated how to use a large, proprietary LLM to generate synthetic training data to fine-tune smaller, open-source models.
Paper: Self-Instruct: Aligning Language Models with Self-Generated Instructions
Authors: Yizhong Wang, Yeganeh Kordi, Swaroop Mishra, Alisa Liu, Noah A. Smith, Daniel Khashabi, Hannaneh Hajishirzi · 2022
Read the paperThe Problem
To make a base language model helpful, it needs to undergo Supervised Fine-Tuning (SFT) on tens of thousands of instruction-response pairs. Creating this data manually is incredibly expensive and time-consuming. When LLaMA 1 was released in early 2023, the open-source community had the base model, but no high-quality instruction dataset to turn it into a ChatGPT competitor.
The Idea
Researchers from University of Washington proposed "Self-Instruct." They realized that strong proprietary models (like GPT-3) already knew how to follow instructions. They devised a pipeline to prompt GPT-3 to generate its own instruction dataset. By providing the model with a tiny "seed" set of 175 handwritten instructions, they iteratively prompted the model to brainstorm new, diverse instructions, generate instances for those instructions, and write the final answers. This allowed them to synthetically bootstrap a dataset of 52,000 instruction-following examples for a few hundred dollars in API credits.
How It Works
The Self-Instruct pipeline is a four-step loop:
- Instruction Generation: The model is given the seed instructions and asked to brainstorm new, unique tasks (e.g., "Write a poem about a toaster").
- Classification Task Identification: The model determines if the new instruction requires classification (e.g., "Is this text positive or negative?") or generation.
- Instance Generation: Based on the type of task, the model generates the input context and the final output response.
- Filtering: A script removes exact duplicates, instructions that are too similar (using ROUGE-L similarity), and outputs that are clearly low quality or toxic.
The resulting filtered dataset is then used to fine-tune a smaller, open-source model.
Why It Mattered
This paper provided the exact recipe that ignited the open-source LLM explosion. Shortly after LLaMA 1 dropped, researchers at Stanford used the Self-Instruct method to generate 52k instructions using OpenAI's text-davinci-003, fine-tuned LLaMA 7B on it, and released "Alpaca." It proved that open models could mimic the behavior of frontier models for less than $600.
What Came After
Generating synthetic training data from GPT-4 (often called "distillation" or "imitation learning") became the standard playbook for the open-source community. Projects like Vicuna and WizardLM expanded heavily on this concept, leading to a cat-and-mouse game where API providers updated terms of service to ban using their outputs to train competing models.