Instruction Tuning
A supervised post-training regime that teaches a model to follow user instructions by training on prompts paired with desired answers.
Instruction tuning is supervised training that shows the model prompts paired with desired answers. The model learns to imitate those answers so it can respond helpfully when a person later asks for a task, question, or command.
At a glance
Released
March 2022
Authors
Long Ouyang, Jeff Wu, Xu Jiang, et al.
Regime type
Training Alignment
Related modules
No related modules listed yet.
What It Is
Instruction tuning is a post-training stage that shapes how a language model responds to explicit user requests. Instead of only predicting the next token in raw text, the model sees curated examples where each input is a prompt or instruction and each target is the answer people want the model to produce. Training nudges the model toward matching those desired answers on similar requests.Why It Exists
A base model from large-scale pretraining knows a lot about language patterns, but it does not automatically behave like a helpful assistant. People usually want models that follow directions, stay on topic, and answer in a useful format. Instruction tuning exists to teach that behavior directly from demonstration examples before teams add heavier preference optimization or reinforcement-learning stages.How It Works
Each instruction-tuning example pairs an input prompt or instruction with a desired answer, completion, or assistant response. Unlike pretraining text, where the model learns from long passages and predicts the next token wherever it appears, these demonstrations deliberately show what a helpful reply should look like for a specific kind of request. Teams collect or write such examples across common tasks such as summarization, question answering, rewriting, and step-by-step reasoning. Formatting matters because many pipelines wrap prompts and answers in consistent templates so the model learns stable patterns for user requests and assistant replies. Coverage matters because the model can only imitate behaviors that appear often enough in the data. Training uses standard supervised learning: for each example, the model is updated to become more likely to produce the demonstrated answer when it sees a similar prompt. There is no reward model, no preferred-versus-rejected ranking, and no reinforcement signal—only a direct target answer to imitate. Demonstration quality strongly shapes the result. Clear, accurate, and consistent examples produce more reliable instruction-following behavior, while sparse, contradictory, or sloppy examples teach brittle habits. This stage teaches response style from demonstrations; it is not benchmark evaluation, model ranking, or a catalog of papers to download.Instruction tuning training flow
Prompt + desired answer demonstrationsSupervised updateInstruction-following modelPrompt + desired answer demonstrations to Supervised updateSupervised update to Instruction-following model
Request and weight flow
\\mathcal{L}(\\theta) = -\\sum_t \\log p_\\theta(y_t \\mid x, y_{<t})