MachineSex/results/llm_merge_hpc/README.md
Giorgio Gilestro 585264d0b4 llm_merge_hpc: the 7B firm-up makes the Fisher-Muller sign decisive
Re-ran the specialist-merge experiment at a capable base (Qwen2.5-7B-Instruct,
200 tests/family) on one L40S GPU of Imperial's CX3 HPC (8 min walltime). The
two caveats the 0.5B prototype left marginal are now resolved:

- "exceeds every parent overall" is clean: both merges 0.87 vs best specialist
  0.77 (+10 pts), and above every specialist on every family.
- dilution vanishes: at 0.5B averaging diluted the lists-specialist
  (0.43->0.26); at 7B the merge beats it (0.62>0.57). Dilution was a
  small-model artefact -- a capable base composes rather than dilutes, which
  softens E4's "merge, don't average" once the parents are strong.

The figure title is now data-driven (reports ">" for 7B, "~" for 0.5B).
Adds the hpc/ smoke job script and the llm_merge walltime trim. Results synced
to results/llm_merge_hpc/ (parquet gitignored per the reproducibility contract).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 17:32:51 +01:00

49 lines
3.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# llm_merge_hpc — recombining specialist LLMs at scale (7B, Imperial CX3; blueprint C2/C4)
**Claim tested.** The scale-up of `llm_merge`: at a *capable* base, does recombining decorrelated
specialists produce a model that **exceeds every single parent overall** *and* stays competent across
**all** families (the FisherMuller "offspring fitter than any parent" signature, E8) — the claim that
was only marginal at 0.5 B? Run on one **L40S (46 GB)** GPU node of Imperial College's CX3 HPC
(job walltime **8 min**).
**Setup.** Base model **Qwen2.5-7B-Instruct** (Apache-2.0). Same three *disjoint*, procedurally-
generated task families with an **exact-match verifier** (the "reality that says no"): `lists`,
`strings`, `arith`, deliberately hard so specialists decorrelate. One **LoRA specialist** (r=16,
α=32, 3 epochs, 800 train tasks) is fine-tuned per family, then the base, each specialist, and two
weight-space **merges**`soup` (averaged LoRA deltas) and `ties` (sign-reconciled union) — are
evaluated on a held-out mixed test set. Seed 1, **200 test tasks/family**.
### Results (accuracy)
| model | lists | strings | arith | overall | **worst family** |
|---|---|---|---|---|---|
| base | 0.46 | 0.69 | 1.00 | 0.71 | 0.46 |
| spec: lists | 0.57 | 0.74 | 1.00 | 0.77 | 0.57 |
| spec: strings | 0.32 | 0.97 | 1.00 | 0.76 | 0.32 |
| spec: arith | 0.47 | 0.80 | 0.96 | 0.74 | 0.47 |
| **merge: soup** | **0.62** | **1.00** | 1.00 | **0.87** | **0.62** |
| **merge: ties** | **0.62** | **1.00** | 0.99 | **0.87** | **0.62** |
### What holds (the 0.5 B caveats resolved)
- **"Exceeds every parent overall" — now clean.** Both merges reach **0.87 overall**, above the best
single specialist (lists, **0.77**) by a decisive 10 points, and above every specialist on every
family (lists 0.62 > 0.57; strings 1.00 > 0.97; arith ≈ 1.00). This is the strict FisherMuller
claim — offspring fitter than *any* parent — which was only marginal at 0.5 B and is now clean.
- **"Retains all specialties" — sharper than ever.** The merges are the only models competent across
**all** families: worst-family **0.62**, versus **≤ 0.57** for every specialist (strings-specialist
collapses to 0.32 on lists). The generalist assembled from specialists dominates on both axes.
- **The dilution is gone.** At 0.5 B, averaging *diluted* the lists-specialist (0.43 → 0.26). At 7 B
the merge **exceeds** the lists-specialist on lists (0.62 > 0.57). A capable base has enough headroom
that weight-space averaging composes rather than dilutes — the "merge, don't average" concern (E4)
softens once the parents are strong. Soup and ties are indistinguishable at K=3 here.
### Takeaway
**The scale-up firms up the sign the prototype left marginal.** At a capable base, recombining
decorrelated specialists yields a model that beats every parent both overall and per-family, with no
dilution — the sexual-reproduction / FisherMuller claim reproduced cleanly in real LLM weights. The
0.5 B `llm_merge` prototype de-risked the pipeline and flagged dilution as the risk; the 7B run shows
that risk is a small-model artefact. **Falsifier (not triggered):** a single specialist matching or
beating the merge overall — here the merge leads by 10 points. Provenance: L40S, torch 2.12.1 /
transformers 5.13.0 / peft 0.19.1, `manifest.json` records the results hash and library versions.
*Note: this run's `manifest.json` has `git_commit: null` because it was produced on the HPC node from
an rsync'd (non-git) working copy; the committed artefacts here are the source of truth for the figure.*