Zubnet AIAprenderWiki › Instruction Tuning
Training

Instruction Tuning

Instruction Fine-Tuning, IFT, SFT
Fine-tunear un modelo de lenguaje pre-entrenado con un dataset de pares (instrucción, respuesta) para enseñarle a seguir instrucciones. Un modelo base que solo predice texto se convierte en un modelo que responde preguntas, sigue indicaciones y se comporta como un asistente. Este es el paso que convierte GPT en ChatGPT, o un Llama base en Llama-Chat.

Por qué importa

El instruction tuning es el puente entre un modelo de lenguaje crudo (que solo puede completar texto) y un asistente útil (que puede seguir instrucciones). Sin él, incluso el modelo base más capaz solo genera texto que suena plausible en vez de realmente hacer lo que le pides. Es posiblemente el paso post-entrenamiento más importante.

Deep Dive

The process: collect thousands to millions of (instruction, ideal response) pairs covering diverse tasks — Q&A, summarization, coding, creative writing, math, conversation. Fine-tune the base model on these pairs using standard supervised learning (minimize the loss on the response tokens given the instruction). The model learns the meta-pattern: "when given an instruction, produce a helpful response."

SFT vs. RLHF vs. DPO

Instruction tuning (Supervised Fine-Tuning / SFT) is typically the first post-training step, followed by alignment via RLHF or DPO. SFT teaches the model the format and basic helpfulness. RLHF/DPO then refines the behavior — making responses more helpful, less harmful, and better calibrated. Some approaches (like ORPO) combine SFT and preference alignment into a single step.

Data Quality Over Quantity

Research consistently shows that a small set of high-quality instruction-response pairs outperforms a large set of low-quality ones. The LIMA paper (Zhou et al., 2023) showed that fine-tuning with just 1,000 carefully curated examples could produce surprisingly good results. The key is diversity (covering many task types) and quality (responses that are genuinely excellent, not just adequate). This is why instruction data curation has become a specialized discipline.

Conceptos relacionados

← Todos los términos
← Instruction Following Jailbreak →