LLM Learning Hub

workspace/llm-course/home

Instruction Tuning

Instruction-tuning is a form of SFT where the training data consists of diverse natural-language instructions and high-quality responses, teaching the model to follow commands and generalize across tasks.

What is Instruction Tuning?

Instruction-tuning is a form of SFT where the training data consists of diverse natural-language instructions and high-quality responses, teaching the model to follow commands and generalize across tasks.

Instruction-tuning is a form of SFT where the training data consists of diverse natural-language instructions and high-quality responses, teaching the model to follow commands and generalize across tasks.

Where is it used?

FLAN-T5, Alpaca, and Llama-3-Instruct are instruction-tuned; the Dolly-15k and OpenAssistant datasets are popular open instruction-tuning corpora used with `SFTTrainer`.

How to build it

Load an instruction dataset like `databricks/databricks-dolly-15k` via `load_dataset`, format each row into a chat template with `tokenizer.apply_chat_template`, and fine-tune with `SFTTrainer`.