Study the paper
Scaling Laws for Neural Language Models
Lessons, visuals, quizzes, flashcards, and resourcesāorganized in teaching order.
16 activities
At a glance
Overview of Scaling Laws in Language ModelsScaling Laws in Language Models
LessonTransformer Parameter Count Approximation
Transformer Parameter and Compute ScalingThis equation estimates the total number of non-embedding parameters in a standard Transformer model. It assumes standard scaling relationships between the model dimension, attention dimension, and feed-forward dimension.
LessonTransformer Forward Pass FLOPs Estimate
Transformer Parameter and Compute ScalingThis equation estimates the computational cost (in FLOPs per token) of a forward pass through a standard Transformer model. It accounts for both the parameter-dependent operations (such as feed-forward networks and projections) and the context-dependent attention operations.
LessonUnified Loss Equation L(N,D)
Transformer Parameter and Compute ScalingThe unified loss equation L(N,D) models the joint dependence of the cross-entropy loss on both the number of non-embedding parameters N and the dataset size D (measured in tokens). It captures how overfitting occurs when either resource is constrained relative to the other.
LessonOptimal Compute Allocation Scaling Relations
Transformer Parameter and Compute ScalingThis set of scaling relations determines how to optimally allocate an increased compute budget C among the model size (number of non-embedding parameters N ), the batch size B , and the number of training steps S . The total number of tokens processed during training is given by D = B cdot S .
VisualTransformer Parameter Count Approximation: step by step
Transformer Parameter and Compute ScalingFollow the existing bounded walkthrough in its intended sequence.
VisualTransformer Forward Pass FLOPs Estimate: step by step
Transformer Parameter and Compute ScalingFollow the existing bounded walkthrough in its intended sequence.
VisualOptimal Compute Allocation Scaling Relations: step by step
Transformer Parameter and Compute ScalingFollow the existing bounded walkthrough in its intended sequence.
VisualUnified Loss Equation L(N,D): step by step
Transformer Parameter and Compute ScalingFollow the existing bounded walkthrough in its intended sequence.
LessonThe Infinite Data Limit and Overfitting
The Infinite Data Limit and OverfittingJoint Scaling and Overfitting
LessonCritical Batch Size Power Law
Critical Batch Size and Training DynamicsThe critical batch size B rm crit (L) determines the optimal batch size for training neural language models. It represents the threshold where further increasing the batch size yields diminishing returns in terms of training speedup per step. This relationship is modeled as a power law of the cross-entropy loss L .
VisualCritical Batch Size Power Law: step by step
Critical Batch Size and Training DynamicsFollow the existing bounded walkthrough in its intended sequence.
LessonOptimal Allocation of Compute Budgets
Optimal Allocation of Compute BudgetsLanguage modeling performance improves smoothly as we increase the model size, dataset size, and amount of compute used for training. Empirical performance has a power-law relationship with each individual factor when not bottlenecked by the other two.
LessonExtreme Scaling: Contradictions and Conjectures
Extreme Scaling: Contradictions and ConjecturesThe Contradiction in Scaling Laws at Extreme Scales
QuizTest your understanding
Scaling Laws Assessment12 questions grounded in this paper section.
ResourceFurther learning
Scaling Laws Assessment3 supplementary resources for this paper section.