What's the difference between parameters and hyperparameters? How do you tune hyperparameters efficiently?
Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.
Model answer: the part to lead with
Parameters are learned from data by the optimizer - weights, biases, embedding tables. A 7B-parameter LLM has 7 billion of them. Hyperparameters are set before training and control the learning process: learning rate, batch size, weight decay, dropout rate, architecture choices (depth, width, number of heads), warmup steps, LoRA rank. A quick sanity check interviewers like: a Linear(in=4096, out=11008) layer has 4096×11008 weights + 11008 biases ≈ 45M parameters.
Full worked answer
Parameters are learned from data by the optimizer - weights, biases, embedding tables. A 7B-parameter LLM has 7 billion of them. Hyperparameters are set before training and control the learning process: learning rate, batch size, weight decay, dropout rate, architecture choices (depth, width, number of heads), warmup steps, LoRA rank. A quick sanity check interviewers like: a Linear(in=4096, out=11008) layer has 4096×11008 weights + 11008 biases ≈ 45M parameters.
Tuning approaches, in order of sophistication:
- Grid search - exhaustive over a discrete grid; wasteful in high dimensions.
- Random search - Bergstra & Bengio showed it beats grid search because typically only a few hyperparameters matter, and random sampling explores each dimension's marginal far better for the same budget.
- Bayesian optimization / successive halving (Optuna, ASHA/Hyperband) - model the response surface or aggressively kill bad trials early; the practical default for expensive training runs.
Going further: follow-up territory
Practical guidance a senior candidate gives: learning rate is almost always the highest-impact hyperparameter - search it on a log scale (e.g., 1e-5 to 1e-3). Tune on a smaller proxy (subset of data, shorter run, smaller model) and transfer; this is the idea μP (μTransfer) makes principled for scaling model width. Don't tune everything at once - fix a sensible recipe (AdamW, cosine schedule, decay 0.1) and sweep the 2-3 knobs that matter. And every tuning decision must be made on validation data, never test.
What a good answer covers
- Parameters are learned from data by the optimizer - weights, biases, embedding tables
- A 7B-parameter LLM has 7 billion of them
- Hyperparameters are set before training and control the learning process
- Tuning approaches, in order of sophistication
Key terms: Parameters · Hyperparameters · Grid search · Random search · Bayesian optimization / successive halving
In the glossary: Weight decay · Dropout · Warmup · LoRA · AdamW
Interviewer follow-ups to expect
Why sample learning rate log-uniformly?
If you can afford 20 runs, how do you allocate them?
Is the number of training epochs a parameter or hyperparameter - and what about a learned temperature like CLIP's?
Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep