Topic 4 of 20 · 39 words
Model Training & Optimization
How raw foundation models are pre-trained at scale, fine-tuned on instructions, aligned with human preferences, and compressed.
The 39 words, in learning order
Start at 1. Each word builds on the ones before it.
- Pre-trainingPre-training is the first, giant training stage where a model learns general knowledge from enormous amounts of data.
- Fine-tuningFine-tuning is giving an already-trained AI model extra training on a smaller, focused set of examples so it gets good at a specific job.
- Supervised Fine-Tuning (SFT)Supervised fine-tuning trains a pre-trained model on example conversations with good answers, so it learns to respond the way we want.
- Instruction TuningInstruction tuning is fine-tuning a model on many examples of instructions and correct responses, so it learns to follow directions.
- Preference TuningPreference tuning trains a model to give answers that people prefer, using comparisons between better and worse responses.
- Reinforcement Learning from Human Feedback (RLHF)RLHF is a way to improve a chatbot by having people rate its answers and then training it to give the kinds of answers people prefer.
- Direct Preference Optimization (DPO)DPO is a simpler way to do preference tuning that trains directly on "better vs worse" answer pairs, without a separate reward model.
- Proximal Policy Optimization (PPO)PPO is a reinforcement learning method that improves a model in small, careful steps so it does not change too much at once.
- Knowledge DistillationKnowledge distillation trains a small "student" model to copy the behavior of a big "teacher" model.
- Model CompressionModel compression is any technique that makes an AI model smaller or faster while keeping most of its quality.
- PruningPruning removes parts of a neural network that contribute little, making the model smaller and faster.
- SparsitySparsity means that many of the numbers in a model are zero or unused, so the computer can skip them.
- Sparse TrainingSparse training means training a model where only a fraction of its connections are active or updated at a time.
- Dense TrainingDense training means every parameter in the model is used and updated for every training example.
- GradientA gradient is a set of numbers that tells a model which direction to change each weight to reduce its mistakes, and by how much.
- Gradient AccumulationGradient accumulation adds up gradients over several small batches before updating the model, to act like one big batch.
- Gradient ClippingGradient clipping limits how large gradients can get, so one bad batch cannot cause a huge, damaging update.
- OptimizerAn optimizer is the algorithm that decides exactly how to update a model's weights using the gradients.
- AdamAdam is a popular optimizer that adjusts the step size for each weight automatically, using its past gradients.
- AdamWAdamW is a version of Adam that handles weight decay in a cleaner way, which usually leads to better models.
- SGDSGD, or Stochastic Gradient Descent, updates a model's weights using gradients from small random batches instead of the whole dataset.
- MomentumMomentum is an optimizer trick that keeps a model moving in the direction it has been going, smoothing out jumpy updates.
- Learning Rate SchedulerA learning rate scheduler changes the learning rate during training, usually starting larger and getting smaller over time.
- WarmupWarmup is a short period at the start of training where the learning rate slowly rises from very small to its normal value.
- Weight DecayWeight decay gently shrinks a model's weights a little at every step, which helps prevent overfitting.
- DropoutDropout randomly turns off some neurons during training, so the network cannot rely too much on any single one.
- RegularizationRegularization is any technique that stops a model from overfitting by discouraging it from becoming too complex.
- CheckpointA checkpoint is a saved copy of a model's weights, and often its training state, at a particular moment.
- Training LossTraining loss is the error score a model gets on the data it is learning from.
- Validation LossValidation loss is the error score a model gets on held-out data it is not trained on.
- ConvergenceConvergence is when training settles down and the loss stops improving much, meaning the model has learned about as much as it can with that setup.
- Catastrophic ForgettingCatastrophic forgetting is when a model learns something new and suddenly loses skills it had before.
- Synthetic DataSynthetic data is training data created by computers, often by other AI models, instead of collected from the real world.
- Data AugmentationData augmentation creates extra training examples by slightly changing existing ones.
- Curriculum LearningCurriculum learning trains a model on easier examples first and harder ones later, like a school curriculum.
- Data ContaminationData contamination is when test or benchmark questions accidentally end up in a model's training data.
- Scaling LawsScaling laws are patterns showing that models get predictably better as you increase their size, data and compute.
- Compute-Optimal TrainingCompute-optimal training means choosing the best balance of model size and training data for a fixed computing budget.
- Chinchilla Scaling LawsThe Chinchilla scaling laws, from a 2022 DeepMind study, found that many big models were too large and trained on too little data.
How Model Training & Optimization fits together
Building a capable AI model happens in stages. Pre-training teaches general world knowledge by predicting trillions of tokens from raw text—burning nearly all the compute budget. Post-training (Supervised Fine-Tuning, RLHF, or DPO) turns that raw predictor into a helpful assistant that follows instructions and avoids harmful outputs.
Along the way, optimizers like AdamW, learning-rate warmup, gradient clipping, and scaling laws keep training runs stable and compute-efficient, while distillation and pruning pack large-model intelligence into smaller, faster models.