Study the paper

Scaling Laws for Neural Language Models

Lessons, visuals, quizzes, flashcards, and resources—organized in teaching order.

14 activities

Lesson

At a glance

Overview of Scaling Laws for Language Models

Scaling Laws for Language Models

Lesson

Overview of Scaling Laws for Language Models

Overview of Scaling Laws for Language Models

Power-Law Scaling of Language Models

Lesson

Hyperparameter and Shape Independence

Hyperparameter and Shape Independence

Robustness to Architectural Hyperparameters

Lesson

Joint Scaling Law L(N,D)

Overfitting and the Infinite Data Limit

The joint scaling law L(N,D) models the simultaneous dependence of the cross-entropy loss on both the model parameter count N and the dataset size D . It captures how performance scales when both resources are finite, incorporating the effects of overfitting.

Lesson

Optimal Allocation Scaling

Overfitting and the Infinite Data Limit

This equation describes the optimal scaling of model parameters ( N ), batch size ( B ), and training steps ( S ) as power-law functions of the total compute budget ( C ). It also defines the total dataset size in tokens ( D ) as the product of batch size and training steps.

Visual

Joint Scaling Law L(N,D): step by step

Overfitting and the Infinite Data Limit

Follow the existing bounded walkthrough in its intended sequence.

Visual

Optimal Allocation Scaling: step by step

Overfitting and the Infinite Data Limit

Follow the existing bounded walkthrough in its intended sequence.

Lesson

Critical Batch Size Power Law

Critical Batch Size and Training Dynamics

The critical batch size B rm crit (L) determines the optimal batch size for training neural language models. It represents the threshold where increasing the batch size further yields diminishing returns in terms of training speedup per unit of compute. This relationship is modeled as a power law of the cross-entropy loss L .

Visual

Critical Batch Size Power Law: step by step

Critical Batch Size and Training Dynamics

Follow the existing bounded walkthrough in its intended sequence.

Lesson

Figure 5: Hyperparameter Independence

Optimal Allocation of Compute Budget

Performance depends very mildly on model shape when the total number of non-embedding parameters N is held fixed. The loss varies only a few percent over a wide range of shapes. Aspect ratio in particular can vary by a factor of 40 while only slightly impacting performance; an (n mathrm layer , d mathrm model ) = (6, 4288) model reaches a loss within 3% of the (48, 1600) model.

Lesson

Figure 9: Overfitting and Dataset Size

Optimal Allocation of Compute Budget

The early-stopped test loss L(N,D) depends predictably on the dataset size D and model size N . For large D , performance is a straight power law in N . For a smaller fixed D , performance stops improving as N increases and the model begins to overfit. The extent of overfitting depends predominantly on the ratio N^ alpha N / alpha D / D .

Lesson

Figure 14: Optimal Allocation of Compute

Optimal Allocation of Compute Budget

Each value of the compute budget C rm min has an associated optimal model size N . Optimal model size grows very rapidly with C rm min , increasing by 5x for each 10x increase in compute. The number of data examples processed makes up the remainder of the increase, growing relatively modestly by only 2x.

Quiz

Test your understanding

Scaling Laws Assessment

12 questions grounded in this paper section.

Resource

Further learning

Scaling Laws Assessment

3 supplementary resources for this paper section.