Appendix C: Hyperparameter Cheat-Sheet
local graph
Appendix C: Hyperparameter Cheat-Sheet
Section titled “Appendix C: Hyperparameter Cheat-Sheet”Appendix C — Hyperparameter Cheat-Sheet
Reasonable starting values for the main training stages. These are defaults to adapt, not laws; the right value depends on model size, data, and budget. Where ranges are given, start in the middle and tune against a validation metric.
| Hyperparameter | Typical value |
|---|---|
| Optimizer | AdamW, betas (0.9, 0.95) |
| Peak learning rate | ~3e-4 (smaller for larger models) |
| LR schedule | linear warmup + cosine or WSD decay to ~10% |
| Warmup | ~0.5–2% of total steps |
| Weight decay | 0.1 |
| Gradient clip (norm) | 1.0 |
| Batch size (tokens) | large — millions/step via accumulation + DP |
| Token budget | ≥ 20 tokens/param; often far more (overtrained) |
| Precision | BF16, or FP8 with fine-grained scaling |
Table C.1 — Pretraining
| Hyperparameter | Typical value |
|---|---|
| Learning rate | ~1e-5 to 2e-5 (full); ~1e-4 to 3e-4 (LoRA) |
| Epochs | 1–3 (more overfits) |
| Loss | cross-entropy on the response only (prompt masked) |
| Data | tens of thousands of high-quality examples |
Table C.2 — Supervised fine-tuning (SFT)
| Hyperparameter | Typical value |
|---|---|
| Rank r | 8–64 |
| Alpha | ~2× rank |
| Target modules | attention (q, k, v, o) and/or FFN projections |
| Base precision | full (LoRA) or 4-bit NF4 (QLoRA) |
| Hyperparameter | Typical value |
|---|---|
| Epochs | 1-3 |
| Batch size | 32-512 sequences |
| Warmup | 0-3% of steps |
| Max length (packed) | 4K-32K |
| Loss | masked to assistant tokens (22.5) |
| Table C.2 — Supervised fine-tuning (SFT) |
| Hyperparameter | Typical value |
|---|---|
| DPO β | 0.1 (range 0.01-0.5) |
| DPO learning rate | 5e-7 to 5e-6 |
| GRPO group size | 8-64 samples |
| GRPO clip ε | 0.2 |
| KL coefficient β | 0.001-0.1 |
| Epochs | 1-2 |
| Table C.3 — Preference optimization (DPO and GRPO) |
| Setting | Creative | Reasoning / code |
|---|---|---|
| Temperature | 0.7-1.0 | 0.0-0.3 |
| Top-p | 0.9-0.95 | 0.95 or off |
| Top-k | 40-50 or off | off |
| Repetition penalty | 1.0-1.1 | 1.0 |
| Table C.4 — Inference and sampling defaults |
Use these as priors, not prescriptions Every value here is a reasonable place to start and a poor place to stop. Sweep the learning rate first — it is the single most impactful knob — and let your own loss curves and evaluations move you off these defaults.
Reference: Representative Model Configurations
A rough sense of how the configuration numbers (Section 16.6) scale with model size. These are representative shapes, not any specific model’s exact values, meant to calibrate intuition for what a configuration of a given scale looks like.
| Scale | Hidden | Layers | Heads |
|---|---|---|---|
| Small dense (~1-3 B) | ~2048 | ~24 | ~16 |
| Mid dense (~7-8 B) | ~4096 | ~32 | ~32 |
| Large dense (~70 B) | ~8192 | ~80 | ~64 |
| Frontier MoE | ~6000-7000 | ~60-80 | ~48-128 |
Table C.5 — Approximate configuration shapes by scale
Two patterns are worth internalizing. Within dense models, hidden size, depth, and head count all grow together as scale rises — the balanced aspect ratio of Section 8.7 — rather than any one ballooning alone. And the frontier MoE row breaks the pattern: its dense dimensions are comparable to a large dense model, but its capacity comes from hundreds of experts (Chapter 11) of which only a handful are active per token, which is why such a model can have ten times the parameters of the large-dense row while costing only a little more per token to run. The configuration, in other words, encodes not just the model’s size but its entire strategy for buying capacity.