File size: 5,863 Bytes
e0e1c61 6defae6 e0e1c61 6defae6 e0e1c61 6defae6 e0e1c61 6defae6 e0e1c61 7217baa e0e1c61 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | ---
license: apache-2.0
tags:
- model-merging
- model-alignment
- chat-vector
- llama-3.1
---
# merge-accuracy — does aligning a merge improve DOWNSTREAM ACCURACY?
The mergeability line of work measures merge obstruction in **nats/token**. This dataset supplies
the missing axis: **task accuracy**, on real released models, for the merge recipe practitioners
actually run — the **chat-vector recipe**
```
theta_new = theta_fork + lambda * ( theta_instruct - theta_base )
```
with `meta-llama/Llama-3.1-8B`, its official Instruct release, and **three community
continued-pretrained language forks from three independent groups** (Swallow / Japanese,
Typhoon2 / Thai, SEA-LION / Indonesian), plus **ground-truth permutation controls** and one
**cross-group direct-merge pair** (`pythia-1.4b` x `Zh-Pythia-1.4B`).
## Headline
> **Alignment did not improve downstream accuracy on a single real model — because on every
> real model there was nothing to align.** Every community fork of `Llama-3.1-8B` we tested is
> still exactly in the base model's coordinate frame, so the aligned and
> naive chat vectors are bit-identical models and the accuracy difference is 0.000 on every
> benchmark. The diagnostic said so **before** any merge was built, and a 44-second screen
> reproduces that call 37x cheaper than fitting the map. When the frame really has drifted —
> a real fork acted on by a random element of its own symmetry group — the naive chat vector
> collapses (IFEval 0.175 -> 0.110, *below* the fork it started from) and alignment restores
> it to 0.355 against an unpermuted reference of 0.375. **The mechanism is real and does reach
> accuracy; the ecosystem condition that would make it pay off did not occur in any released
> model we examined.**
Population: **4 real community forks** measured end-to-end on accuracy (3 groups, 3 target languages), **3 ground-truth controls**, one cross-group direct-merge pair, and a **10-model ecosystem screen**. Across all **13 released `Llama-3.1-8B` derivatives** examined — language forks, domain continued pretraining, instruct post-training, a safety model — **not one** had left the base model's coordinate frame.
- On **4 of 4** real community CPT forks the fitted alignment map is the **identity** (coordinate share exactly 0; every per-layer MLP and attention-head permutation comes back as the identity). Continued pretraining by a third party did **not** move these models out of the base model's frame, so the chat vector is already expressed in the right basis and aligning it is a no-op. The measured accuracy difference is **exactly zero on every benchmark** — the aligned and naive merges are bit-identical models.
- The chat-vector recipe itself **works** on 3 of 4 of these forks: it lifts instruction following well above the fork it started from, i.e. the merged model beats its own parent — the bar that matters.
- The diagnostic's registered prediction was correct on **4/4** real forks.
- On the ground-truth control (a real fork acted on by a random element of the model's own symmetry group — functionally identical, differently parameterised), the diagnostic fires (coordinate share **0.856**), the naive chat vector scores IFEval **0.110**, and aligning it first recovers **0.355** (Δ **+0.245**).
## Contents
| path | what |
|---|---|
| `RESULTS_MERGE_ACCURACY.md` | the full write-up: substrate, chance levels, every table, limitations |
| `figs/headline_diagnostic_vs_gain.png` | **headline** — pre-merge coordinate share vs realised accuracy gain from aligning |
| `figs/dose_response.png` | the diagnostic tracks real frame drift; alignment recovers what drift destroys |
| `figs/scatter_naive_vs_aligned.png` | naive vs aligned accuracy with the `y = x` diagonal and the fork-alone baseline |
| `figs/selection_experiment.png` | naive / align-everything / cheap-screen-then-align |
| `results/chatvec_summary.csv` | per model per lambda: fork alone, naive, aligned, delta, per benchmark |
| `results/all_model_accuracies.csv` | every model evaluated, every benchmark |
| `results/diagnostics.csv` | the pre-merge diagnostic for every model |
| `results/cheap_screen_vs_full.csv` | the 44-second screen against the 27-minute fit |
| `results/selection_experiment.csv` | the three-strategy comparison with measured compute |
| `results/ecosystem_screen.json` | the 44-second frame screen over 10 more released Llama-3.1-8B derivatives |
| `figs/ecosystem_drift_vs_frame.png` | parameter drift vs frame drift across the ecosystem |
| `results/crossgroup_pair.csv` | the pythia x Zh-Pythia direct merge, all mixing weights + TIES |
| `results/validation.json` | exactness of the symmetry action and of the fitted alignment map |
| `results/chatvec.jsonl`, `results/ledger.jsonl` | raw resumable ledgers |
| `code/` | everything needed to reproduce |
## Benchmarks and chance levels
Belebele (target language and English) — chance **0.250**; ARC-easy — chance **0.250**;
IFEval strict prompt-level and instruction-level — chance **~0**.
`lm-evaluation-harness` was not available, so scorers are implemented directly following the
harness / reference task definitions (`code/tasks.py`, `code/ifeval.py`). Sanity check: the
loglikelihood harness scores `EleutherAI/pythia-1.4b` at SciQ **0.846** against a published
**0.865**.
## A bug worth propagating
`mergeschool.core.alignment.apply_head_perms` permutes the query and output projections but not
`k_proj`/`v_proj`. That is exact for MHA and MQA but **not for grouped-query attention**: on
`Llama-3.1-8B` a flat head permutation changes the logits by **relative 1.115** — it destroys the
model. The group-respecting action implemented here (`code/gmap.py`) is exact to **9.4e-07**. Any
merge study that accepts a flat head permutation on a GQA model is silently corrupting its merges.
|