Adds the union-preserving recombination operator that llm_merge lacked (E8's max,
not mean): keep each specialist LoRA intact and SELECT the right one per prompt
(MoE router: oracle, or training-free nearest-centroid over base embeddings) or
per module (max_merge = winner-take-all by delta norm). src/llm/moe.py, kind
llm_moe, reuses the cached specialists.
Result — a clean regime boundary for "merge, don't average":
- 0.5B: union wins. Routing 0.74 / worst-family 0.43 > soup 0.64 / 0.26, with no
dilution (recovers each specialist's own-family peak). E8's max > mean in real
weights, because at a weak base averaging dilutes.
- 7B (Imperial CX3, L40S, 9 min): the ordering INVERTS. Fusion wins — soup 0.87 >
routing 0.84 > max_merge 0.78. Routing is capped at the best parent per family;
fusion blends and, given a capable base, COMPOSES beyond any parent (soup lists
0.62 > spec 0.57). Selection can't synthesise better than its best component;
averaging-that-composes can.
So "merge, don't average" (E4/E8) is a weak-parent / small-model law, not
universal: union wins under dilution, fusion wins under composition. Refines E8
(its additive-landscape max>mean assumed no compositional headroom). The operator
to want is fusion-that-composes + offspring selection = the directed-sex ideal
(E10) — the natural next experiment.
Honest riders: the learned router is trivially perfect (lexically-distinct
families), and router-free max_merge is the weakest union (not input-adaptive).
+2 router unit tests (127 green). Results in results/llm_moe{,_hpc}/ (parquet
gitignored per the reproducibility contract).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
27 lines
No EOL
565 B
JSON
27 lines
No EOL
565 B
JSON
{
|
|
"experiment": "llm_moe_hpc",
|
|
"master_seed": 1,
|
|
"git_commit": null,
|
|
"python": "3.11.13",
|
|
"libraries": {
|
|
"numpy": "2.4.6",
|
|
"scipy": "1.17.1",
|
|
"pandas": "3.0.3",
|
|
"pyarrow": "24.0.0",
|
|
"torch": "2.12.1",
|
|
"transformers": "5.13.0",
|
|
"peft": "0.19.1"
|
|
},
|
|
"rows": 47,
|
|
"results_sha256": "bd91413c4cf174980c222dca5f435cb6957dee775d2f27bfb7a30dedc0f36c9f",
|
|
"layer": "2",
|
|
"tier": "llm",
|
|
"base_model": "Qwen/Qwen2.5-7B-Instruct",
|
|
"operators": [
|
|
"soup",
|
|
"ties",
|
|
"moe_oracle",
|
|
"moe_learned",
|
|
"max_merge"
|
|
]
|
|
} |