Hyperparameter Selection › Worked Example: Hyperparameter Search for a 350M Model
Language AI HandbookAll chapters Hyperparameter Selection › Worked Example: Hyperparameter Search for a 350M ModelOne section · Sections in this chapter10 / 14 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
To illustrate the full workflow, consider setting up training for a 350M parameter model with a 100B token dataset.
Step 1: Set architecture-determined hyperparameters.
For a 350M model, a typical architecture is 24 layers, hidden dimension 1024, 16 attention heads, FFN ratio 4. These are fixed by the scaling recipe and not searched.
Step 2: Set the compute-optimal training length.
Using the Chinchilla recipe, a 350M model should train on roughly tokens. With a batch size of 0.5M tokens per step, that is steps. We will use 15,000 steps rounded up.
Step 3: Proxy search on a 40M model.
Build a 40M parameter proxy using the same architecture ratios (fewer layers, smaller hidden dimension). Train it for 2,000 steps (proportional to the proxy's compute-optimal budget) at 7 different learning rates:
Evaluate validation loss at the end of each run. Identify the best configuration and the second-best; the optimal is likely between these two.
Step 4: Refine on the proxy.
Run a finer search between the two best values. With 5 additional evaluations, you can narrow down to within 20% of the true optimum.
Step 5: Transfer to the 350M target.
If using muP, transfer the proxy learning rate directly. If using standard parametrization, scale by the width ratio: approximately.
Step 6: Run and monitor.
During the full training run, monitor:
- Training loss curve: should decrease smoothly with no spikes
- Gradient norm: should stabilize around 1.0-3.0 after warmup
- Learning rate schedule: confirm the schedule matches expectations
- Validation loss: check against expected scaling law prediction
If validation loss diverges from prediction by more than 10%, investigate before continuing. Common causes are suboptimal learning rate, data quality issues, or hardware bugs.