← Back to LLMs Mind Map
⚡Flashcard Drill➔
⚡ LLMsID: sft-basics

Supervised Fine-Tuning (SFT)

指令微调 SFT
🎯Core Definition
SFT (Supervised Fine-Tuning) fine-tunes the pretrained model on high-quality instruction–response pairs to turn a text-continuation engine into an instruction follower. Mechanism: the objective stays cross-entropy L=−∑log⁡P(y∣x)L = -\sum \log P(y|x) but on instruction data; typically 1–3 epochs at a low LR (~1e-5, far below pretraining) with global-batch packing. The core lesson is 'quality beats quantity': Alpaca replicated ChatGPT-level instruction following with only 52K GPT-generated samples.
💡Use Cases
giving general models conversational/instruction-following ability, domain adaptation (medical/legal/finance), and as the initial policy for RLHF.
⚡Key Problems Solved
pretrained models only continue text and ignore instructions. A few thousand to tens of thousands of high-quality pairs align behavior — far better than blindly scaling data; more than 3 epochs overfits instructions and hurts general ability (catastrophic forgetting). Compared with ~1.4T pretraining tokens, SFT uses ~7 orders of magnitude less data (52K vs 1.4T), slashing cost, while providing the starting policy for RLHF.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of Supervised Fine-Tuning (SFT).
Use Cases
In production engineering, what are the primary use cases for Supervised Fine-Tuning (SFT) and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
SFT vs pretraining: data, objective, epochs?
2
Why does quality beat quantity in SFT data?
3
Can SFT overfit? How to choose epochs and LR?
4
What is the relationship between SFT and RLHF/DPO?
5
How are instruction datasets built and filtered (human/LLM-generated)?
Updated 2026-08-12
🎯
Verify Mastery: Practice Exam Questions for "Supervised Fine-Tuning (SFT)"
Take pitfall multiple-choice questions with derivation options; mistakes are automatically logged.
🚀 Start Card Practice ➔
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
🎯 Drill This Card Now➔
← Previous CardFlashAttentionNext Card →LoRA / QLoRA Low-Rank Adaptation

🔗 More LLMs Knowledge Cards

引用出处: TalentMe 450+ 工业级 AI 架构考点知识库 (Tech Vault) · 遵循 CC-BY-4.0 知识共享协议
URL: https://talentme.airsota.com/resources/tech/roadmap/mindmap/LLM/card/sft-basics