Skip to content

Cross LLM Comparison

Dave Graham edited this page Mar 26, 2026 · 14 revisions

Cross-LLM Comparison — Sonnet 4.0 vs Sonnet 4.6 vs Haiku 4.5

How much does the LLM generation matter for autonomous hyperparameter optimization? This page tracks cross-generation comparison experiments: the same dataset, same hardware, same codebase, same training budget — but different Claude model versions driving the optimization.

Stock Baseline Comparison — ClimbMix Complete (3 models). All models start from identical stock upstream defaults (AR=64). Haiku 4.5 wins ClimbMix (1.2953) by discovering architecture changes both Sonnets missed. Sonnet 4.0 finishes last (1.3588) — it never tried changing ASPECT_RATIO, staying at AR=64 for all 100 experiments.

Sonnet 4.0 vs 4.6 (pre-optimized): Complete (5/5 datasets). Sonnet 4.6 wins 3–2 on absolute val_bpb from pre-optimized baselines.

Cross-LLM Comparison

Sonnet Summary — All Five Datasets

Metric ClimbMix FineWeb-Edu Cosmopedia-v2 SlimPajama FineWeb-Edu-High
S4.0 baseline 1.2969 1.4088 0.9640 1.5410 1.3730
S4.6 baseline 1.3213 1.3710 0.9806 1.5312 1.3478
S4.0 best 1.2959 1.3424 0.9606 1.5259 1.3463
S4.6 best 1.2997 1.3416 0.9549 1.5267 1.3345
S4.0 improvement −0.08% −4.71% −0.35% −1.0% −1.97%
S4.6 improvement −1.63% −2.14% −2.63% −0.30% −0.99%
S4.0 keeps 1 17 4 3 20
S4.6 keeps 8 18 16 2 13
S4.0 crashes 11 2 2 0 5
S4.6 crashes 5 1 0 2 2
Winner (absolute) S4.0 S4.6 S4.6 S4.0 S4.6

Final scorecard: Sonnet 4.6 wins 3–2 on absolute val_bpb (FineWeb-Edu, Cosmopedia-v2, FineWeb-Edu-High). Sonnet 4.0 wins on ClimbMix and SlimPajama — both general text datasets where it started from pre-optimized baselines.

Note: The Sonnet runs used inconsistent baselines (S4.0 started from pre-optimized configs, S4.6 from partially-reset defaults). Future model comparisons (Haiku, Opus) will use stock upstream defaults for fair comparison — see methodology.


Completed Comparisons

1. ClimbMix

Metric Sonnet 4.0 (Mar 19) Sonnet 4.6 (Mar 22) Winner
Best val_bpb 1.2959 1.2997 Sonnet 4.0
Improvement −0.08% −1.63% Sonnet 4.6 (20×)
Keeps 1 (1.0%) 8 (6.8%) Sonnet 4.6
Crashes 11 (11.0%) 5 (4.2%) Sonnet 4.6

Sonnet 4.0 wins on absolute val_bpb (pre-optimized baseline advantage), but Sonnet 4.6 found 20× more improvement and 7× more keeps.

2. FineWeb-Edu

Metric Sonnet 4.0 (Mar 17) Sonnet 4.6 (Mar 22) Winner
Best val_bpb 1.3424 1.3416 Sonnet 4.6 (by 0.0008)
Improvement −4.71% −2.14% Sonnet 4.0 (more room)
Keeps 17 (19.3%) 18 (18.0%) Comparable
Crashes 2 (2.3%) 1 (1.0%) Sonnet 4.6

Near-identical results via completely different configs — 8 of 10 parameters differ. Proves FineWeb-Edu has multiple near-equivalent optima.

3. Cosmopedia-v2

Metric Sonnet 4.0 (Mar 20) Sonnet 4.6 (Mar 24) Winner
Best val_bpb 0.9606 0.9549 Sonnet 4.6 (by 0.006)
Improvement −0.35% −2.63% Sonnet 4.6 (7.5×)
Keeps 4 (3.9%) 16 (16.0%) Sonnet 4.6 (4×)
Crashes 2 (1.9%) 0 (0.0%) Sonnet 4.6

Sonnet 4.6's strongest showing. Discovered ASPECT_RATIO=21 (vs AR=32), breaking the AR=32 consensus from all Sonnet 4.0 runs. Zero crashes.

4. SlimPajama 🆕

Metric Sonnet 4.0 (Mar 20) Sonnet 4.6 (Mar 25) Winner
Best val_bpb 1.5259 1.5267 Sonnet 4.0 (by 0.0008)
Improvement −1.0% −0.30% Sonnet 4.0
Keeps 3 (3.0%) 2 (2.0%) Comparable
Crashes 0 (0.0%) 2 (2.0%) Sonnet 4.0

The hardest dataset to optimize. Both models find SlimPajama nearly impervious — total improvements of just 1.0% and 0.30%. Sonnet 4.6 went 62 experiments without a single keep before finding a triple-synergy combination (β1, FINAL_LR_FRAC, WARMDOWN_RATIO together). Sonnet 4.0 edges out on absolute val_bpb.

5. FineWeb-Edu-High 🆕

Metric Sonnet 4.0 (Mar 21) Sonnet 4.6 (Mar 25) Winner
Best val_bpb 1.3463 1.3345 Sonnet 4.6 (by 0.012)
Improvement −1.97% −0.99% Sonnet 4.0 (more room)
Keeps 20 (20.0%) 13 (12.9%) Sonnet 4.0
Crashes 5 (5.0%) 2 (2.0%) Sonnet 4.6

Sonnet 4.6 wins decisively on absolute val_bpb (1.3345 vs 1.3463). The signature finding: a spectacular β2 walk — 5 consecutive keeps as β2 decreased from 0.98→0.975→0.970→0.968→0.966→0.964. Sonnet 4.0 had more keeps (20 vs 13) but started from a worse baseline with more room to improve.

FineWeb-Edu-High Configuration Comparison (click to expand)
Parameter Sonnet 4.0 Sonnet 4.6 Same?
ASPECT_RATIO 32 21
MATRIX_LR 0.047 0.068
EMBEDDING_LR 0.375 0.60
SCALAR_LR 0.39 0.18
WEIGHT_DECAY 0.10 0.08
WARMDOWN_RATIO 0.48 0.75
FINAL_LR_FRAC 0.085 0.05
ADAM β1 0.66 0.45
ADAM β2 0.95 0.964
WINDOW_PATTERN SSSL SSSS
MLP_RATIO 4.25 4.0

Every single parameter differs. Yet Sonnet 4.6 achieves 0.9% better val_bpb — the largest absolute gap in any comparison.


Methodology — Stock Baseline Reset

Starting with Haiku 4.5, all model comparison runs use stock upstream defaults as their baseline. This ensures every model starts from an identical, unoptimized configuration:

# Stock upstream defaults (used for all new model comparisons)
ASPECT_RATIO = 64       # Original upstream default
EMBEDDING_LR = 0.6
MATRIX_LR = 0.04
SCALAR_LR = 0.5
WEIGHT_DECAY = 0.2
ADAM_BETAS = (0.8, 0.95)
WARMDOWN_RATIO = 0.5
FINAL_LR_FRAC = 0.0
WINDOW_PATTERN = "SSSL"

The --reset-defaults flag in run_suite.py resets train_mlx.py to these values before each dataset, preventing cross-model and cross-dataset contamination.

Why this matters: The initial Haiku run (aborted) inherited Sonnet 4.6's accumulated config (AR=21, β2=0.964), giving it a baseline (1.2966) that already beat Sonnet 4.0's best (1.2959). That invalidated the comparison. Stock defaults ensure each model is measured by its own optimization ability.

ClimbMix — Stock Baseline (3 Models Complete) ⭐

Metric Sonnet 4.0 Haiku 4.5 Winner
Stock baseline 1.4159 1.4085 ~same
Best val_bpb 1.3588 1.2953 Haiku (by 0.0635)
Δ from baseline −4.03% −8.04% Haiku (2× better)
Keeps 15 (15.0%) 10 (10.0%) S4.0
Crashes 0 (0.0%) 3 (3.0%) S4.0
First keep exp3 exp6 S4.0
AR explored Never (stayed AR=64) AR=32 (2 keeps) Haiku
Depth explored Once (catastrophic) Yes (3 keeps) Haiku
Window pattern SSSL (never changed) LLLL (1 keep) Haiku
β1 walk 0.8→0.635 (5 keeps) 0.8→0.77 (via synergy) Both
Multi-param synergy No Yes (exp90) Haiku
Final throughput 27.3K tok/sec (251 steps) 76.0K tok/sec (697 steps) Haiku (2.8×)
Final memory 26.1 GB 11.6 GB Haiku (56% less)

Full Sonnet 4.0 analysis → | Full Haiku 4.5 analysis →

The architecture gap is decisive. Haiku discovered AR=32, depth reduction, and LLLL attention — tripling throughput from ~207 to 697 steps. Sonnet 4.0 never changed architecture, staying at AR=64 with only 251 steps. More gradient steps = better optimization, regardless of how well-tuned the optimizer parameters are.

Sonnet 4.0 is a better optimizer-tuner. Higher keep rate (15% vs 10%), zero crashes, faster first keep (exp3 vs exp6), and a precise β1 walk (0.8→0.635 in 5 keeps). But it only explores one dimension of the search space.

Why didn't Sonnet 4.0 try architecture changes? It attempted one depth increase (exp75) that produced a catastrophic result (1.6795, +18.7%). This single bad experience may have permanently deterred architecture exploration — a classic negative transfer from one data point.

Remaining: 4 datasets pending (stock baseline)

Sonnet 4.0 and Haiku 4.5 ClimbMix complete. FineWeb-Edu, Cosmopedia-v2, SlimPajama, FineWeb-Edu-High next. Sonnet 4.6 stock baseline runs also planned.

Future: Opus + Sonnet 4.6 (Stock Baseline) — Planned

Same methodology: stock defaults, same 5 datasets, same hardware.


Cross-Dataset Patterns — Final Analysis (Sonnet 4.0 vs 4.6)

Absolute Performance Scorecard

Dataset S4.0 Best S4.6 Best Gap Winner
ClimbMix 1.2959 1.2997 +0.0038 S4.0
FineWeb-Edu 1.3424 1.3416 −0.0008 S4.6
Cosmopedia-v2 0.9606 0.9549 −0.0057 S4.6
SlimPajama 1.5259 1.5267 +0.0008 S4.0
FineWeb-Edu-High 1.3463 1.3345 −0.0118 S4.6

Sonnet 4.0's wins are narrow (0.0038 and 0.0008) and benefited from pre-optimized baselines. Sonnet 4.6's wins are larger (up to 0.0118 on FineWeb-Edu-High) and came despite starting from worse baselines.

Crash Rate Improvement

Dataset Sonnet 4.0 Sonnet 4.6 Reduction
ClimbMix 11.0% 4.2% 2.6× fewer
FineWeb-Edu 2.3% 1.0% 2.3× fewer
Cosmopedia-v2 1.9% 0.0% ∞ (zero crashes)
SlimPajama 0.0% 2.0% S4.0 wins
FineWeb-Edu-High 5.0% 2.0% 2.5× fewer
Total 20 / 494 (4.0%) 10 / 521 (1.9%) 2.1× fewer

Sonnet 4.6 crashes half as often overall. The sole exception is SlimPajama, where Sonnet 4.0 had zero crashes.

Optimization Depth

Dataset S4.0 params changed S4.6 params changed
ClimbMix 1 3
FineWeb-Edu 6 9
Cosmopedia-v2 4 10
SlimPajama 3 4
FineWeb-Edu-High 8 10
Average 4.4 7.2

Sonnet 4.6 consistently explores 60% more parameter dimensions and builds compositional improvements across all datasets.

Architecture Choices

Dataset S4.0 AR S4.6 AR Agreement?
ClimbMix 32 32
FineWeb-Edu 32 32
Cosmopedia-v2 32 21
SlimPajama 32 21 (inherited) ❌ (different defaults)
FineWeb-Edu-High 32 21 (inherited) ❌ (different defaults)

Sonnet 4.6's Cosmopedia-v2 AR=21 discovery propagated to subsequent runs via defaults. Neither SlimPajama nor FineWeb-Edu-High tried to change it — both explored narrower (AR=14, 16) and wider (AR=24, 26, 28) alternatives and found AR=21 near-optimal.


Key Conclusions

1. The LLM generation matters — but not always for raw performance

Sonnet 4.6 wins 3–2 on absolute val_bpb, but the margins are small on 4 of 5 datasets. The optimization landscape has natural performance floors that both models can approach. The exception is FineWeb-Edu-High, where Sonnet 4.6's β2 walk found a clearly better optimum.

2. Sonnet 4.6 is a better optimizer

By every meta-metric, Sonnet 4.6 outperforms:

  • Crashes: 1.9% vs 4.0% (2.1× fewer)
  • Parameter dimensions explored: 7.2 vs 4.4 per run (60% more)
  • Compositional optimization: Consistently builds synergistic multi-parameter improvements
  • β2 discovery: Systematic β2 walks (never attempted by Sonnet 4.0) produced keeps on 3 of 5 datasets

3. AR=32 was a false consensus

Sonnet 4.0 found AR=32 optimal on all 5 datasets. Sonnet 4.6 found AR=21 optimal on Cosmopedia-v2 and the result propagated — neither SlimPajama nor FineWeb-Edu-High reverted it. The "hardware-optimal architecture" depends on the LLM's exploration strategy, not just the hardware.

4. Multi-optima are pervasive

On FineWeb-Edu, both models find the same val_bpb via completely different configs (8/10 parameters differ). On FineWeb-Edu-High, every single parameter differs yet Sonnet 4.6 still beats Sonnet 4.0. The optimization landscape has multiple basins at similar or different depths.

5. SlimPajama is genuinely hard

Both models find SlimPajama nearly impervious to optimization (0.30–1.0% improvement, 2–3 keeps). Its 7-source diversity creates a flat optimization landscape where no parameter adjustment can meaningfully improve the model's ability to compress such varied data in 5 minutes.


Open Questions for Future Work

  1. Would AR=21 improve Sonnet 4.0's results? Sonnet 4.0 never tested AR<32 on any dataset. Running Sonnet 4.0 with AR=21 on Cosmopedia-v2 would reveal whether the AR=21 advantage is model-specific or universal.

  2. Can we combine the best insights from both models? The models found complementary strategies (e.g., low WD vs low momentum on FineWeb-Edu). A hybrid config might beat both.

  3. Is Sonnet 4.6's β2 walk transferable to Sonnet 4.0 datasets? The β2 walk was Sonnet 4.6's signature discovery. Testing β2<0.96 on Sonnet 4.0's best configs could unlock further improvements.

  4. What would a different model tier find?Partially answered. Haiku 4.5 on ClimbMix (67 exp) rediscovers AR=32 but also finds novel improvements (depth reduction, LLLL attention, UNEMBEDDING_LR) that both Sonnets missed. Different model tiers explore different parameter dimensions. Full Haiku analysis →


See individual run pages: H4.5 ClimbMix (Mar 25) | S4.6 FineWeb-Edu-High (Mar 25) | S4.6 SlimPajama (Mar 25) | S4.6 Cosmopedia-v2 (Mar 24) | S4.6 FineWeb-Edu (Mar 22) | S4.6 ClimbMix (Mar 22) | S4.0 FineWeb-Edu-High (Mar 21) | S4.0 SlimPajama (Mar 20) | S4.0 Cosmopedia-v2 (Mar 20) | S4.0 ClimbMix (Mar 19) | S4.0 FineWeb-Edu (Mar 17) | Cross-Dataset Comparison

Clone this wiki locally