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

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

20 Dec 2022arXiv:2212.10560archive 2025-07-28

Yizhong Wang, Yeganeh Kordi, Swaroop Mishra, Alisa Liu, Noah A. Smith, Daniel Khashabi, Hannaneh Hajishirzi

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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2212.10560")

Code

Syntology Ran 7 of 17 code samples harvested from 5 repositories linked to this paper; 10 have no recorded run. Of those that ran: 4 ran · our draft was wrong; 3 ran with no contract checked.

By repository: official repository: 1 sample from 1 repository, 1 ran; community (archive-listed): 15 samples from 4 repositories, 5 ran; 1 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

19 repositories listed; official and paper-mentioned ones first.

tatsu-lab/stanford_alpaca officialmentioned in papermentioned on GitHubpytorchApache-2.0 report
yizhongw/self-instruct officialmentioned in papermentioned on GitHub report
baai-zlab/coig mentioned on GitHub report
beomi/koalpaca mentioned on GitHubpytorchApache-2.0 report
camel-ai/camel mentioned on GitHubpytorch report
daniel-furman/sft-demos mentioned on GitHubpytorchApache-2.0 report
databrickslabs/dolly mentioned on GitHubpytorch report
facico/chinese-vicuna mentioned on GitHubpytorch report
flagopen/flaginstruct mentioned on GitHubApache-2.0 report
fsoft-ai4code/codecapybara mentioned on GitHubpytorch report
imoneoi/openchat mentioned on GitHubpytorch report
jondurbin/airoboros mentioned on GitHubpytorchApache-2.0 report
lightaime/camel mentioned on GitHubpytorchApache-2.0 report
ofa-sys/expertllama mentioned on GitHubpytorch report
phoebussi/alpaca-cot mentioned on GitHubpytorchApache-2.0 report
replicate/cog_stanford_alpaca mentioned on GitHubpytorchApache-2.0 report
sahil280114/codealpaca mentioned on GitHubpytorch report
teelinsan/camoscio mentioned on GitHubpytorchApache-2.0 report
xzhang97666/alpacare mentioned on GitHubApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

17 samples harvested; 7 ran; 0 honoured the contract we drafted; 10 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

4ran · our draft was wrong
3ran
10unverified

Licence: 1 of the 17 samples is pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 5 repositories linked to this paper, official or community; each sample names its own and says which. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

encode_prompt yizhongw/self-instruct/self_instruct/bootstrap_instructions.py official repository ran · our draft was wrong Apache-2.0 (permissive) · e0456866b386ce58 · report
ModelDataConfig imoneoi/openchat/ochat/experimental/generate_dataset_old.py community (archive-listed) ran · metamorphic tier: deterministic Apache-2.0 (permissive) · 1afe396e11afa85e · report
encode_prompt fsoft-ai4code/codecapybara/data_generation/data_generation.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · bde7f9e76c0f398c · report
instruct_prompt facico/chinese-vicuna/prompt.py community (archive-listed) ran Apache-2.0 (permissive) · f56f83bd10a33749 · report
post_process_1st_response fsoft-ai4code/codecapybara/data_generation/data_generation.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · 0396d7986c9245e0 · report
prompt facico/chinese-vicuna/prompt.py community (archive-listed) ran Apache-2.0 (permissive) · 1171a8f3cf445159 · report
average_pool jondurbin/airoboros/airoboros/embeddings.py community (archive-listed) unverified Apache-2.0 (permissive) · 4c1e8ffec89c5351 · report
calculate_embeddings jondurbin/airoboros/airoboros/embeddings.py community (archive-listed) unverified Apache-2.0 (permissive) · d2f185ffba2db890 · report
calculate_fragment_embeddings jondurbin/airoboros/airoboros/embeddings.py community (archive-listed) unverified Apache-2.0 (permissive) · deed53aece8a579f · report
generate_dataset imoneoi/openchat/ochat/experimental/generate_dataset_old.py community (archive-listed) unverified Apache-2.0 (permissive) · a035d0e0d1e7dd67 · report
generate_instruction_following_data fsoft-ai4code/codecapybara/data_generation/data_generation.py community (archive-listed) unverified Apache-2.0 (permissive) · 750d305ce32e0643 · report
generate_prompt jondurbin/airoboros/airoboros/instructors/contextual.py community (archive-listed) unverified Apache-2.0 (permissive) · 3df9ac239aea5147 · report
generate_split imoneoi/openchat/ochat/experimental/generate_dataset_old.py community (archive-listed) unverified Apache-2.0 (permissive) · a4fc9157b8751af4 · report
num_tokens_from_messages fsoft-ai4code/codecapybara/data_generation/data_generation.py community (archive-listed) unverified Apache-2.0 (permissive) · da03aab82afbcc6b · report
one_call fsoft-ai4code/codecapybara/data_generation/data_generation.py community (archive-listed) unverified Apache-2.0 (permissive) · 0fd35c82026b1481 · report
printf facico/chinese-vicuna/prompt.py community (archive-listed) unverified Apache-2.0 (permissive) · f53b42abf295354b · report
find_word_in_string identical code first harvested elsewhere ran · our draft was wrong fingerprinted licence of this copy not recorded · 8ca6a5f9f77053c2 · report

Tasks

Instruction FollowingLanguage Modelling

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections