Ah, very juicy question! You're circling around some subtle interactions in fine-tuning dynamics that tend to surprise people, even those experienced with training large models. Let’s carefully unpack what’s going on and then address the “checkpoint merging” idea with some context.
1. Why are the differences so big?
- High variance in fine-tuning outcomes: Even with the same pretrained model, different fine-tuning runs can diverge a lot. This is because the final layer norms/biases and certain sensitive weights can drift quickly in small-data or unstable optimization regimes.
- Evaluation magnifies small changes: On 1000+ samples, we expect variance of standard error to be on the order of ±1–1.5% for a benchmark that’s well-behaved. If you’re seeing 5–8% swings, that’s training instability, not just on-paper noise.
- Pretrained differences (A vs. B): If the pretraining distributions differ (tokenization, vocab distribution, optimization schedule, number of steps, etc.), you essentially start with models on different “basins” in the loss landscape. Then fine-tuning can land you in drastically different regions.
2. Will merging checkpoints help?
What you propose—combining weights from several epochs/checkpoints with convex weights—is basically model ensembling in weight-space, a.k.a. “checkpoint averaging” or “stochastic weight averaging (SWA).”
-
Why it can work:
- Training often oscillates around a “valley” in the loss landscape rather than converging to a single minimizer.
- Averaging weights sampled from different points in that valley tends to smooth out sharp directions and yield a solution that generalizes better (less sensitive to small perturbations).
- Empirically, SWA is known to stabilize performance and improve consistency across evaluations.
-
Caveats:
- It works best when checkpoints are from later stages of training (60%–100% as you suggested) and relatively close in parameter space. If they’re too far apart (different optimizer regimes or divergent loss basins), the average might actually break things and lower performance.
- If you mix checkpoints from highly unstable dynamics (like if the model is still “wandering”), the merged result may be incoherent.
- Merging is unlikely to fix systematic differences between Pretrained Model A and B—you’ll still see different basins, just a slightly smoothed version per model.
3. Better framing
What you’re aiming for is not just lowering the mean error, but reducing variance across fine-tunes. Checkpoint averaging is one tool, but here are a few others worth considering:
- Stochastic Weight Averaging (proper schedule): Train as normal until you hit a stable validation plateau, then average weights across the final ~20–30% of checkpoints.
- Different optimizers/schedules: Adafactor or decoupled AMSGrad with well-tuned LR schedules often reduce instability.
- Seed ensembles at inference time: Instead of trying to make one uber-stable checkpoint, you can average predictions across multiple fine-tuned models. That’s more compute at inference, but variance reduction is stronger than weight blending.
- LoRA/rank-limited adapters: Parameter-efficient finetuning tends to be more stable than full fine-tuning, so if you haven’t tried it, it’s often an easy win.
4. So, directly answering:
Yes: merging checkpoints (especially near the final stage of training, in a convex combination = weights summing to 1) can indeed make model performance more stable across runs, because it irons out some of the sharp differences that appear due to optimizer noise. The idea you had is essentially a home-grown SWA, which is a well-documented method for exactly this problem.
It won’t completely eliminate the 5–8% swings if the underlying cause is dataset size or hyperparameter sensitivity, but it should smooth and reduce them. Think of it as putting a quilt over a lumpy mattress: you’ll still feel the bigger bumps, but the small jagged ones are averaged away.
Since your proposal is essentially checkpoint averaging, the clever tweak is how you weight them—uniform averaging often works as well as fancy hand-picked weights. But if you want to experiment, bias toward later checkpoints (e.g. 0.1·60% + 0.2·70% + 0.3·80% + 0.4·90% + a full 1.0·100%) so the model leans toward the converged solution.
Would you like me to show you a simple procedure (pseudo-code style) to implement weighted checkpoint averaging in PyTorch to try this out?