Model Training
Training, fine-tuning, and adapting models for real-world work.
Model training teaches an AI model from data, from large-scale pretraining through post-training and fine-tuning that adapt a general model to a specific domain, task, or product.
Training happens in stages. Pretraining on a large general corpus produces a base model, and how to spend that compute is itself a research result: the Chinchilla study trained over 400 models and found that model size and training tokens should grow together, and its 70B-parameter model, trained on four times more data than the 280B-parameter Gopher with the same compute, outperformed it across a wide range of tasks (Hoffmann et al., Training Compute-Optimal Large Language Models).
Adaptation comes next. Suchin Gururangan and colleagues showed that a second phase of pretraining on in-domain text led to gains across the four domains they tested (biomedical and computer science papers, news, and reviews), even for already broad models (Don't Stop Pretraining); the continued pre-training entry covers how teams use it. Post-training then shapes behavior, through supervised fine-tuning on demonstrations and preference methods such as RLHF.
Most teams never pretrain. Their training work is fine-tuning, and parameter-efficient methods made it affordable: LoRA freezes the base model and trains small low-rank matrices, which its authors report cuts trainable parameters by 10,000 times and GPU memory by three times compared with fully fine-tuning GPT-3 175B, with no added inference latency (Hu et al., LoRA); see LoRA. The risk to watch is catastrophic forgetting, where gains in a new domain cost general capability.
Start here
- Thomson 1: The New $40M Legal AI Model | Thomson Reuters Joel Hron
Trace the continued pre-training stage on legal content before later tuning.
- How Intercom Cut $250K/Month by Ditching GPT for Open Models | Fergal Reid
Compare LoRA experiments with the later distributed training setup.
Go deeper
Data, objective and parameter updates
Training methods
Choose and evaluate adaptation
3 episodes
- Thomson 1: The New $40M Legal AI Model | Thomson Reuters Joel Hron
- How Intercom Cut $250K/Month by Ditching GPT for Open Models | Fergal Reid
- Beyond Transformers: How Liquid AI Is Rethinking LLM Architecture | Maxime Labonne
Explainers on this topic
- How Reinforcement Learning Improves AI Coding Models
- How to Prepare Data for Fine-Tuning an LLM
- How to Use Synthetic Data for AI Evaluation
- What Is Model Distillation in AI?
- How Large Language Models Actually Work
- Why LLMs Hallucinate
Terms on this topic
- Active learning
- Algorithm
- Anomaly Detection
- AutoML
- Backpropagation
- Batch normalization
- Batch Size
- BERT and masked language models
- Bias-variance tradeoff
- Boosting
- Bootstrap aggregating
- Catastrophic Forgetting
- Checkpoint
- Cluster analysis
- Compute
- Constitutional AI
- Continued Pre-training
- Contrastive Learning
- Convergence
- Copyright and AI Training
- Cross-entropy loss
- Cross-Validation
- Data augmentation
- Data Flywheel
- Data Labeling
- Data Leakage
- Data Provenance
- Data Quality
- Data Wall
- Dataset
- Decision boundary
- Deep Learning
- Differential Privacy
- Dimensionality reduction
- Direct Preference Optimization (DPO)
- Distributed training
- Double descent
- Dropout
- Early stopping
- Ensemble methods
- Epoch
- Exploration vs. Exploitation
- Feature Engineering
- Feature extraction
- Feature Scaling
- Feature selection
- Feature Store
- Features and Labels
- Federated Learning
- Floating-point precision and mixed precision
- General-Purpose AI Model (GPAI)
- Generalization
- Gradient Descent
- Ground Truth
- Hyperparameter
- Hyperparameter optimization
- Imbalanced Dataset
- Instruction Tuning
- K-means clustering
- k-Nearest neighbors
- Knowledge Cutoff
- Learning Rate
- Linear Regression
- Logistic Regression
- Loss Function
- Machine Learning
- Machine Learning Engineer
- Markov Decision Process
- Meta-learning
- Model
- Model Collapse
- Model pruning
- Model Registry
- Multitask learning
- Neural architecture search
- Next-Token Prediction
- One-Hot Encoding
- Online Machine Learning
- Optimization Algorithm
- Overfitting
- Parameter-Efficient Fine-Tuning (PEFT)
- Policy Optimization
- Post-training
- Pre-training
- PyTorch
- Q-learning
- Regularization
- Reinforcement Learning
- Representation learning
- Residual connection
- Reward Model
- Scaling Laws
- Self-Supervised Learning
- Semi-supervised learning
- Sim-to-Real Transfer
- Supervised Learning
- Sycophancy
- Temporal difference learning
- The Bitter Lesson
- Time-Series Forecasting
- Training Data
- Training-Serving Skew
- Training, Validation and Test Sets
- Transfer Learning
- Underfitting
- Unsupervised Learning
- Vanishing and Exploding Gradients
- Weak supervision
- World model