← Back to LLMs Mind Map
⚡Flashcard Drill➔
⚡ LLMsID: pretrain-training-details

Pre-Training Objectives & Optimizer Details

训练目标与优化器细节
🎯Core Definition
The mainstream pretraining objective is Next-Token Prediction (autoregressive cross-entropy L=−∑log⁡P(xt∣x<t)L = -\sum \log P(x_t | x_{<t})); code models often use FIM (Fill-in-the-Middle): the document is split into prefix/suffix/middle, and with ~50% probability the model predicts the middle from both sides, learning bidirectional context. The optimizer standard is AdamW (β₁=0.9, β₂=0.95, weight decay=0.1) with gradient clipping (global norm 1.0) and a warmup + cosine LR schedule; on a loss spike, training rolls back to the last checkpoint before the spike and resumes.
💡Use Cases
pretraining and continued pretraining, code LLM training, debugging divergence or exploding gradients.
⚡Key Problems Solved
pure next-token prediction cannot use right-side context, limiting code completion — FIM sees both sides and markedly boosts code continuation; β₂=0.95 decays the second-moment estimate faster than the standard 0.999, better matching LLM gradient scales, and wd=0.1's strong weight decay curbs overfitting; clipping at 1.0 prevents single-step gradient explosions; a loss spike can destroy hours of training, and the rollback strategy reduces the cost to re-running only the minutes before the spike.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of Pre-Training Objectives & Optimizer Details.
Use Cases
In production engineering, what are the primary use cases for Pre-Training Objectives & Optimizer Details and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Next-Token vs FIM objectives? How are FIM samples constructed?
2
Why β₂=0.95 and wd=0.1 in AdamW? Difference from standard Adam?
3
Role & implementation of gradient clipping (global vs per-parameter norm)?
4
Causes of loss spikes and how the rollback strategy works?
5
How to design the LR schedule (warmup + cosine decay)?
Updated 2026-08-12
🎯
Verify Mastery: Practice Exam Questions for "Pre-Training Objectives & Optimizer Details"
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 CardPre-Training Data EngineeringNext Card →Tokenization: BPE / WordPiece

🔗 More LLMs Knowledge Cards

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