Post-training · Part 2 / 7
Show it good answers
The simplest fix — keep training the model on (instruction, response) pairs. Same next-word objective, but now the next words are a good answer.
A pretrained model only knows one trick: predict the likely next word. Ask it a question and it might continue with more questions — that’s what often follows a question on the web. Likely is not the same as good.
So here’s the simplest fix. Don’t change the trick. Change what you feed it.
Same game, better answers
Pretraining played one game: hide the next word in some web text, guess it, nudge the weights. plays the exact same game — predict the next word, measure the same cross-entropy loss. Nothing about the math moves.
The only thing that changes is the data. Instead of arbitrary internet text, every example is a pair: an instruction, and a hand-picked good response.
Instruction: Summarize this in one line: ...
Response: <a clean, correct summary> ← the words we train it to predict
It’s called supervised fine-tuning because each instruction comes with a known right answer to copy. (You’ll also see it written SFT.)
Try it: run the prompt through the first — it drifts. Then switch to the tuned model. Same network shape, same objective; only the training answers were different.
Why it generalizes
If you only tuned on summaries, you’d get a summarizer. The trick is to tune on many different tasks at once — translation, Q&A, sentiment, meal planning, on and on.
Across all that variety, the cheapest pattern for the model to learn isn’t this task or that task. It’s the general move: read the instruction, do what it says. So it follows instructions it has never seen. That generalization is the whole payoff.
And it’s cheap. Pretraining chews through trillions of words. Instruction tuning needs only thousands to a few million pairs and a handful of passes — a rounding error next to pretraining.
Where the pairs come from
You need a lot of good (instruction, response) pairs. Four ways to get them:
- People write them. Aya collected 503M instructions across 114 languages — 204K of them hand-written by ~3,000 volunteer fluent speakers.
- Convert old datasets with templates. Decades of labeled NLP data already exist. Take a movie review and its label, drop them into a template like
{{review}} How does the reviewer feel about the movie?, and you’ve minted an instruction. (An LLM can reword the templates for variety.) - Repurpose annotation guidelines. The instructions once given to human labelers make ready-made prompts.
- Have an LLM generate them. For example: take harmful questions and generate safe refusals. Mixing in even ~500 such safety examples sharply cut a model’s harmful answers.
Go deeper: a template, concretely
An old natural-language-inference dataset stores three fields — premise, hypothesis, label. To turn one row into an instruction, slot the fields into a sentence:
Suppose {{premise}} Can we infer that {{hypothesis}}?
Yes, no, or maybe?
The label becomes the target response. One template plus thousands of rows yields thousands of instruction pairs — for free.
One thing it doesn’t do
Instruction tuning makes the model answer. It doesn’t yet make the model prefer the better of two good answers — clearer, kinder, more honest. For that we need the next idea. First, a footnote on how to do this cheaply.
Next: showing it good answers gets you far, but which answer is best? That’s where preference comes in.
Sources · 9
- Jurafsky, D., & Martin, J. H. (2026). Speech and Language Processing: An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition with Language Models (3rd ed., draft of January 6, 2026). Stanford University. Ch. 9 (Post-training: Instruction Tuning, Alignment, and Test-Time Compute).
- Ouyang, L., Wu, J., Jiang, X., Almeida, D., Wainwright, C., Mishkin, P., Zhang, C., Agarwal, S., Slama, K., Ray, A., Schulman, J., Hilton, J., Kelton, F., Miller, L., Simens, M., Askell, A., Welinder, P., Christiano, P., Leike, J., & Lowe, R. (2022). Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems 35 (NeurIPS 2022). arXiv:2203.02155.
- Singh, S., Vargus, F., D'Souza, D., Karlsson, B. F., Mahendiran, A., Ko, W.-Y., Shandilya, H., Patel, D., Mataciunas, J., O'Mahony, L., Zhang, M., et al. (2024). Aya Dataset: An Open-Access Collection for Multilingual Instruction Tuning. arXiv:2402.06619.
- Wang, Y., Mishra, S., Alipoormolabashi, P., Kordi, Y., Mirzaei, A., Naik, A., Ashok, A., et al. (2022). Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP Tasks. EMNLP 2022. arXiv:2204.07705.
- Longpre, S., Hou, L., Vu, T., Webson, A., Chung, H. W., Tay, Y., Zhou, D., Le, Q. V., Zoph, B., Wei, J., & Roberts, A. (2023). The Flan Collection: Designing Data and Methods for Effective Instruction Tuning. ICML 2023. arXiv:2301.13688.
- Iyer, S., Lin, X. V., Pasunuru, R., Mihaylov, T., Simig, D., Yu, P., Shuster, K., Wang, T., Liu, Q., Koura, P. S., Li, X., et al. (2022). OPT-IML: Scaling Language Model Instruction Meta Learning through the Lens of Generalization. arXiv:2212.12017.
- Mishra, S., Khashabi, D., Baral, C., & Hajishirzi, H. (2022). Cross-Task Generalization via Natural Language Crowdsourcing Instructions. ACL 2022. arXiv:2104.08773.
- Rajpurkar, P., Zhang, J., Lopyrev, K., & Liang, P. (2016). SQuAD: 100,000+ Questions for Machine Comprehension of Text. EMNLP 2016. arXiv:1606.05250.
- Bianchi, F., Suzgun, M., Attanasio, G., Röttger, P., Jurafsky, D., Hashimoto, T., & Zou, J. (2024). Safety-Tuned LLaMAs: Lessons From Improving the Safety of Large Language Models that Follow Instructions. ICLR 2024. arXiv:2309.07875.