Train loss drops while eval loss climbs at step 1200: name it and the standard fixes
During an SFT run, train loss keeps dropping smoothly but eval loss bottoms out around step 1200 and starts climbing while train loss continues down. Name what this pattern is and walk through the two standard responses an engineer should take.
This is overfitting. Two responses: ship the checkpoint at the eval-loss minimum (early stopping), and reduce effective capacity or add regularization for the next run.
Imagine a student cramming for an exam by memorizing every practice question word for word. They get faster and faster on the practice set, but when the real exam shows even slightly different questions, they start failing because they never learned the underlying ideas. That gap between practice scores rising and exam scores falling is the signal that memorization has taken over from real learning. Two fixes work. First, stop them cramming the moment their practice and exam scores diverge, and use the version of them from that moment, not the over-crammed one. Second, give them fewer practice questions to obsess over, or harder questions that punish memorization, so they have to learn the ideas instead.
Detailed answer & concept explanation~8 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: naming the overfit pattern, early stopping mechanics with load_best_model_at_end, the next-run capacity and regularization levers, when more data is the deeper fix, and the leakage diagnostic to rule out first.
| Symptom | Likely cause | First action |
|---|---|---|
| Train down, eval up (this case) | Overfitting | Early stop at eval min; lower capacity next run |
| Train flat, eval flat | Optimization broken (zero LR, masked labels) | Diagnose gradient path before changing capacity |
| Train down, eval flat | Eval set too easy or leaked | Verify eval set is held out and harder than train |
| Train down then spikes, eval also spikes | Numerical instability (fp16 overflow) | Switch to bf16, add gradient clipping |
| Train down, eval down (healthy) | Healthy generalization | Continue training to schedule end |
Real products, models, and research that use this idea.
- Hugging Face Trainer's load_best_model_at_end plus metric_for_best_model='eval_loss' is the standard production fix for early stopping at the eval minimum.
- Axolotl YAML configs expose save_strategy and evaluation_strategy directly so teams can pin the best checkpoint without code changes during 2026 Llama 4 fine-tunes.
- Unsloth single-GPU recipes for Qwen 3.5 routinely default to LoRA dropout 0.05 to dampen memorization on small instruction sets.
- TRL's SFTTrainer and DPOTrainer both inherit Hugging Face Trainer's eval-checkpoint selection, so the same load_best_model_at_end pattern works across SFT and preference tuning.
- Open-source Mistral Large 3 community fine-tunes typically run for a single epoch on curated SFT sets to avoid hitting the overfit knee in the first place.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhat if early stopping picks a checkpoint that is too early and underfits?
QHow do you choose between lowering rank versus adding LoRA dropout?
QWhy might weight decay help less in LoRA settings than in full fine-tuning?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Shipping the final-step checkpoint because the training loss looks best. The model that overfit hardest is not the model you want in production; the eval-minimum checkpoint is.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.