ML Fundamentals: Overfitting, Scaling Laws, RL Basics and LLM Training Stages
Company: Meta
Role: Applied Scientist
Category: Machine Learning
Difficulty: hard
Interview Round: Technical Screen
An ML fundamentals round covered four topics: underfitting and overfitting, scaling laws, reinforcement learning fundamentals, and the stages of training a large language model. Answer each part as you would in that round, giving definitions, the reasoning behind them, and how they show up in practice.
### Clarifying Questions
- How deep should each part go: definitions and intuition, or also the underlying math?
- For the large-model parts, should the discussion assume decoder-only language models?
### Part 1 — Underfitting and overfitting
Define underfitting and overfitting. How do you tell which one a model suffers from using its training and validation curves, and what would you change in each case?
```hint Read the gap
Compare where the training error sits relative to the error you need, and how far the validation error sits from the training error.
```
#### What This Part Should Cover
- Definitions in terms of training and validation error, linked to bias and variance
- Diagnosis from loss curves and from learning curves over training-set size
- Remedies for each case and why they work
- How the picture changes for very large models
### Part 2 — Scaling laws
What are neural scaling laws? Describe how a language model's loss changes with model size, dataset size and training compute, and how these relationships are used to decide how to spend a fixed compute budget.
```hint Think in log-log space
Consider what a straight line on a log-log plot of loss against size implies, and what happens when only one of the resources keeps growing.
```
#### What This Part Should Cover
- The power-law form, including the loss that no amount of scale removes
- The relationship between compute, parameters and training tokens
- Compute-optimal allocation between model size and data
- Limits of the laws and reasons to deviate from the compute-optimal point
### Part 3 — Reinforcement learning fundamentals
Explain the reinforcement learning setup and its core concepts. How does it differ from supervised learning, and what are the main families of RL algorithms?
```hint Where the labels went
Supervised learning tells the model the right output for each input. Consider what an RL agent is told instead, and when.
```
#### What This Part Should Cover
- The formal setup and the objective being maximized
- Value functions and the recursive relationship they satisfy
- What makes RL harder than supervised learning: exploration, delayed reward, and data that depends on the policy
- The main algorithm families and the on-policy versus off-policy distinction
### Part 4 — Stages of training a large language model
Walk through the stages a large language model goes through from raw text to a deployed assistant. For each stage, state its objective, its data, and what it changes about the model.
```hint Follow the training signal
For each stage, ask what the loss or reward is and where the signal that defines it comes from.
```
#### What This Part Should Cover
- Data preparation and pretraining with next-token prediction
- Continued training on curated or long-context data
- Supervised fine-tuning on demonstrations
- Preference and reinforcement-learning stages, then evaluation and deployment steps
### What a Strong Answer Covers
- Correct definitions with the intuition behind them, not only names
- Links between the parts, such as where large-model pretraining sits between underfitting and overfitting, and how RL concepts reappear in language-model training
- Practical diagnostics and decisions, not only theory
- Awareness of where each idea stops holding
### Follow-up Questions
- Large language models trained for about one pass over their data rarely overfit in the classic sense. Why, and what changes when data has to be repeated?
- Why might you deliberately train a model on many more tokens than the compute-optimal amount?
- Why does reinforcement-learning fine-tuning of a language model penalize divergence from the starting model?
- When would you choose a preference-optimization method that needs no separate reward model over RL with a learned reward model?
Overview: An ML fundamentals round covering underfitting and overfitting, neural scaling laws, reinforcement learning basics, and the stages of training a large language model. Tests clear definitions, diagnosis from training curves, compute-budget reasoning, and the objective and data behind each training stage.
Read the full Meta Applied Scientist interview experience this question came from