Supervised fine-tuning (SFT) is a post-training technique in which a pretrained large language model is trained further on a curated set of prompt-response demonstrations, using the same next-token cross-entropy objective as pretraining, with the loss usually computed only on the response tokens. It is the canonical first stage of modern post-training pipelines: demonstrations convert a raw text-continuation model into one that answers in a consistent assistant format, after which preference methods such as reinforcement learning from human feedback (RLHF) or direct preference optimization refine its judgment.1

Its most prominent form is instruction tuning, training on instruction-response pairs so that a model follows natural-language task descriptions, and the two terms are often used interchangeably. As a general recipe, however, SFT covers any supervised demonstration training: installing chat formats and personas, adapting models to domains such as code or medicine, distilling a stronger model's outputs into a weaker one, and "cold-starting" reasoning behavior before reinforcement learning.8

The InstructGPT work (2022) fixed SFT's place in the standard stack, fine-tuning GPT-3 on a demonstration dataset of about 13,000 prompts before reward modeling and RLHF.1 As of July 2026, essentially every deployed assistant model passes through an SFT stage.

Motivation

A pretrained base model maximizes the likelihood of web text, so when given a question it may continue with another question, a forum-style digression, or an inconsistent persona rather than an answer; the InstructGPT authors described the language modeling objective as "misaligned" with users' intent to receive helpful responses.1 SFT is the most direct correction available: a few thousand examples of the desired behavior shift the model's output distribution onto the assistant format at a minute fraction of pretraining cost.

SFT also initializes the policy for everything downstream. Reward models and preference-optimization methods need a model that already produces coherent, comparably formatted candidate responses, and post-training pipelines therefore run SFT first.1 The Meta AI LIMA experiment articulated the underlying division of labor as the "superficial alignment hypothesis": a model's knowledge and capabilities are learned almost entirely during pretraining, while alignment mainly teaches which subdistribution of formats to use when interacting with users. Fine-tuning a 65-billion-parameter LLaMA model on just 1,000 curated examples, with no reinforcement learning, produced a competitive assistant.3

How it works

The training corpus is a set of prompt-response pairs collected from paid annotators, templated NLP datasets, filtered user interactions, or synthetic generation. Each pair is rendered into the model's chat template, and training minimizes cross-entropy over the target tokens; prompt tokens are conventionally masked out of the loss so the model learns to produce responses rather than imitate user text. Training typically runs for a small number of epochs at a much lower learning rate than pretraining, and can be combined with parameter-efficient methods such as low-rank adapters when compute or memory is constrained.

Dataset scale is small relative to pretraining and has trended toward curation over volume. InstructGPT used roughly 13,000 training prompts for its SFT stage.1 For Llama 2, Meta set aside millions of examples from third-party instruction datasets after finding that fewer, higher-quality vendor annotations gave notably better results (a section of the paper is titled "Quality Is All You Need"), and stopped collecting after 27,540 SFT annotations.2 LIMA pushed the same logic to an extreme with 1,000 examples.3

Variants and extensions

Instruction tuning, the multitask form of SFT introduced in the 2021 FLAN and T0 papers,45 reached wide use through public checkpoints such as Flan-T5.

Synthetic demonstration data extends SFT past what humans write by hand. Building on the Self-Instruct bootstrapping recipe (2022),6 Stanford's Alpaca (March 2023) fine-tuned LLaMA 7B on 52,000 demonstrations generated by OpenAI's text-davinci-003, for under $500 in API costs.7

Training on a stronger model's outputs makes SFT a form of sequence-level knowledge distillation, the recipe behind community models such as Vicuna, fine-tuned on user-shared ChatGPT conversations; DeepSeek released distilled variants of Qwen2.5 and Llama models trained by pure SFT, with no reinforcement-learning stage, on the roughly 800,000 samples curated with DeepSeek-R1.8

In reasoning models, SFT reappears as a "cold start": DeepSeek-R1 fine-tuned the DeepSeek-V3 base model on thousands of long chain-of-thought demonstrations before large-scale reinforcement learning, to stabilize early training and improve readability.8 Llama 2's rejection-sampling fine-tuning runs the loop in the other direction: sample several candidate responses, keep the reward model's favorite, and fine-tune on it, feeding model-generated data back through the SFT machinery.2

Adoption

As of July 2026, SFT is the default first stage of post-training at every major lab; published pipelines from InstructGPT and Llama 2 through DeepSeek-R1 all begin with a supervised demonstration stage.128 Openly documented recipes have made the practice reproducible outside large labs: the Allen Institute for AI's Tulu 3 released its complete post-training recipe, including SFT data mixtures, code, and evaluation tooling, ahead of preference tuning and reinforcement learning with verifiable rewards stages.10 The wider open ecosystem, from Hugging Face training libraries to countless fine-tunes across the Llama family, runs on the same supervised recipe.

Limitations and critiques

SFT is a form of behavior cloning, and John Schulman argued in an April 2023 Berkeley lecture that this actively trains hallucination: when demonstrations contain facts the network does not know, the model learns to guess confidently in that format, since "the correct target has to actually depend on what knowledge is in the network," which the data collector cannot observe.9

Fine-tuning on a narrow demonstration distribution can also erode base-model capabilities (catastrophic forgetting); the InstructGPT authors called the regressions they measured on public NLP datasets an "alignment tax" and mitigated them by mixing pretraining gradients into post-training updates.1 Nor is SFT a way to install knowledge: on LIMA's superficial alignment hypothesis, what a model knows, the capability that MMLU-style benchmarks probe, is learned almost entirely during pretraining.3

More broadly, demonstrations carry only a positive signal: the objective shows the model what to produce but never grades one response against another or marks behavior to avoid, which is why SFT is normally followed by RLHF, direct preference optimization, or Constitutional AI-style feedback rather than used alone.1

History

Task-specific supervised fine-tuning predates LLM post-training. GPT-1 (2018) established generative pretraining followed by supervised fine-tuning on each downstream task,11 and BERT made the pretrain-then-fine-tune paradigm, with a separate fine-tuned copy per task, the dominant transfer-learning approach of the early Transformer era.12 Modern SFT differs in aim: one general model rather than per-task specialists.

The multitask turn came in 2021 with FLAN and T0,45 and InstructGPT slotted SFT beneath reward modeling and RLHF in 2022.1 The 2023 open wave (Alpaca, Vicuna, LIMA, Llama 2) established that small, high-quality demonstration sets could align open weights cheaply.237 From 2024 onward, fully open recipes such as Tulu 3 documented industrial-grade SFT stages end to end,10 and the reasoning era repurposed SFT for cold-start data and large-scale distillation of chain-of-thought models.8

See also

References


  1. Ouyang, L., et al., "Training language models to follow instructions with human feedback," arXiv:2203.02155, March 2022. ↩↩↩↩↩↩↩↩↩

  2. Touvron, H., Martin, L., et al., "Llama 2: Open Foundation and Fine-Tuned Chat Models," arXiv:2307.09288, July 2023. ↩↩↩↩

  3. Zhou, C., et al., "LIMA: Less Is More for Alignment," arXiv:2305.11206, May 2023. ↩↩↩↩

  4. Wei, J., et al., "Finetuned Language Models Are Zero-Shot Learners," arXiv:2109.01652, September 2021. ↩↩

  5. Sanh, V., et al., "Multitask Prompted Training Enables Zero-Shot Task Generalization," arXiv:2110.08207, October 2021. ↩↩

  6. Wang, Y., et al., "Self-Instruct: Aligning Language Models with Self-Generated Instructions," arXiv:2212.10560, December 2022. ↩

  7. Taori, R., et al., "Alpaca: A Strong, Replicable Instruction-Following Model," Stanford CRFM, March 2023. ↩↩

  8. DeepSeek-AI, "DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning," arXiv:2501.12948, January 2025. ↩↩↩↩↩

  9. Schulman, J., "Reinforcement Learning from Human Feedback: Progress and Challenges," EECS Colloquium Distinguished Lecture, UC Berkeley, April 19, 2023; transcript published as "Berkeley Talks transcript: ChatGPT developer John Schulman on making AI more truthful," Berkeley News, April 24, 2023. ↩

  10. Lambert, N., et al., "Tulu 3: Pushing Frontiers in Open Language Model Post-Training," arXiv:2411.15124, November 2024. ↩↩

  11. Radford, Narasimhan, Salimans, and Sutskever, "Improving Language Understanding by Generative Pre-Training," OpenAI, June 2018. ↩

  12. Devlin, J., et al., "BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding," arXiv:1810.04805, October 2018. ↩