Upload code/make_report.py with huggingface_hub
Browse files- code/make_report.py +46 -10
code/make_report.py
CHANGED
|
@@ -384,8 +384,11 @@ if rep:
|
|
| 384 |
L.append(md_table(["substrate", "n pairs", "rung", "mean Δfloor (nats/tok)", "median Δfloor",
|
| 385 |
"BLiMP accuracy", "% of the parents' above-chance margin retained"], body))
|
| 386 |
L.append("""
|
| 387 |
-
REPAIR does help the likelihood — it
|
| 388 |
-
|
|
|
|
|
|
|
|
|
|
| 389 |
aligned merge is still many nats/token above the better parent, still above the
|
| 390 |
uniform-over-vocabulary reference at the small sizes, and still close to chance on BLiMP. Applied to
|
| 391 |
the *naive* merge it barely moves anything, which is the expected pattern: variance repair is only
|
|
@@ -488,8 +491,21 @@ if rev:
|
|
| 488 |
L.append(md_table(["anchor", "floor (anchor lang)", "floor (English)"] + rk,
|
| 489 |
[[r["lang"], fmt(r["floor_x"]), fmt(r["floor_eng"])] +
|
| 490 |
[fmt(r["rungs"][k]["delta_floor_mean"]) for k in rk] for r in rev]))
|
| 491 |
-
L.append("\nΔfloor, mean over the two languages, nats/UTF-8 byte.
|
| 492 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 493 |
|
| 494 |
L.append("\n## P0-2 · Do the pre-merge predictors predict the realised rescue?\n")
|
| 495 |
if os.path.exists(f"{R}/predictor_auroc.csv"):
|
|
@@ -652,19 +668,39 @@ L.append(md_table(["cell", "n", "status", "what was measured"], cov))
|
|
| 652 |
L.append("""
|
| 653 |
## Threats to validity, stated plainly
|
| 654 |
|
| 655 |
-
- **Likelihood ≠ accuracy.** Repeated because it is the single most load-bearing caveat here
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 656 |
- **SET 1's held-out corpus is FLORES-200 English devtest**, not a Pile validation split. It is
|
| 657 |
genuinely held out from PolyPythia training, but it is out-of-domain, so the absolute nats/token
|
| 658 |
floors are higher than a Pile-val number would be. Δfloor is a *difference* against parents
|
| 659 |
measured on the same corpus, so the comparison between rungs is unaffected.
|
|
|
|
|
|
|
|
|
|
| 660 |
- **SET 4's nats/byte is comparable across tokenizers but not free of tokenizer effects**: block
|
| 661 |
boundaries fall at different places for different tokenizers, and each block's first token is
|
| 662 |
-
unscored. With ~30k tokens per evaluation this is a sub-1% effect.
|
|
|
|
|
|
|
| 663 |
- **The alignment search is over the permutation group (residual basis, MLP hidden axis, attention
|
| 664 |
-
heads) and its orthogonal relaxation
|
| 665 |
-
is
|
| 666 |
-
bounds how far.
|
| 667 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 668 |
""")
|
| 669 |
|
| 670 |
L.append("\n## Files\n")
|
|
|
|
| 384 |
L.append(md_table(["substrate", "n pairs", "rung", "mean Δfloor (nats/tok)", "median Δfloor",
|
| 385 |
"BLiMP accuracy", "% of the parents' above-chance margin retained"], body))
|
| 386 |
L.append("""
|
| 387 |
+
REPAIR does help the likelihood — it is the best training-free merge in this report, taking a further
|
| 388 |
+
bite out of the aligned merge's Δfloor (on pythia-14m, 9.61 → 7.88 nats/token, a further 18%). **And
|
| 389 |
+
BLiMP does not follow it at all**: 0.533 → 0.527, i.e. flat, and slightly *down*. That is the
|
| 390 |
+
dissociation again, now inside a single rung comparison where the only thing that changed is a
|
| 391 |
+
likelihood-improving correction. It does **not** change the conclusion. The repaired
|
| 392 |
aligned merge is still many nats/token above the better parent, still above the
|
| 393 |
uniform-over-vocabulary reference at the small sizes, and still close to chance on BLiMP. Applied to
|
| 394 |
the *naive* merge it barely moves anything, which is the expected pattern: variance repair is only
|
|
|
|
| 491 |
L.append(md_table(["anchor", "floor (anchor lang)", "floor (English)"] + rk,
|
| 492 |
[[r["lang"], fmt(r["floor_x"]), fmt(r["floor_eng"])] +
|
| 493 |
[fmt(r["rungs"][k]["delta_floor_mean"]) for k in rk] for r in rev]))
|
| 494 |
+
L.append("\nΔfloor, mean over the two languages, nats/UTF-8 byte.\n")
|
| 495 |
+
L.append("""
|
| 496 |
+
**The failure is symmetric, and that matters more than it looks.** The tokenizer wall is *not*
|
| 497 |
+
symmetric: the English Goldfish tokenizer UNK-s 45% of Greek and 11% of Polish, while every partner
|
| 498 |
+
tokenizer handles English at under 0.1% UNK (`results/set4_tokenizer_diag.json`). So the reverse
|
| 499 |
+
direction is the clean test — anchor on the partner language and the vocabulary can represent both
|
| 500 |
+
sides. The merge still fails, by the same margin, and the M1 rungs still do nothing. Two conclusions
|
| 501 |
+
follow that the English-anchored direction alone could not support:
|
| 502 |
+
|
| 503 |
+
1. The vocabulary mismatch is a real and sufficient obstruction in the English-anchored direction,
|
| 504 |
+
but it is **not the only** one — removing it does not make the merge work.
|
| 505 |
+
2. What is left is the plain fact that the two parents were **independently initialised and
|
| 506 |
+
independently trained**. That is the same obstruction SET 1 isolates, and SET 1 already shows that
|
| 507 |
+
alignment only ever removes part of it and that the removable part shrinks with scale.
|
| 508 |
+
""")
|
| 509 |
|
| 510 |
L.append("\n## P0-2 · Do the pre-merge predictors predict the realised rescue?\n")
|
| 511 |
if os.path.exists(f"{R}/predictor_auroc.csv"):
|
|
|
|
| 668 |
L.append("""
|
| 669 |
## Threats to validity, stated plainly
|
| 670 |
|
| 671 |
+
- **Likelihood ≠ accuracy.** Repeated because it is the single most load-bearing caveat here — and
|
| 672 |
+
because this report is one of the few places where both were measured on the same merges and found
|
| 673 |
+
to dissociate.
|
| 674 |
+
- **BLiMP and MultiBLiMP are minimal-pair grammaticality benchmarks.** They are a real accuracy
|
| 675 |
+
measurement and they are not a general one. A merge that scores 0.68 on MultiBLiMP-English is not
|
| 676 |
+
thereby a usable model; agreement minimal pairs are unusually forgiving of a degraded model,
|
| 677 |
+
because the two candidates differ in one inflected token and the grammatical form is usually the
|
| 678 |
+
more frequent one. Read "retains accuracy" as "retains *this* accuracy", not as "works".
|
| 679 |
- **SET 1's held-out corpus is FLORES-200 English devtest**, not a Pile validation split. It is
|
| 680 |
genuinely held out from PolyPythia training, but it is out-of-domain, so the absolute nats/token
|
| 681 |
floors are higher than a Pile-val number would be. Δfloor is a *difference* against parents
|
| 682 |
measured on the same corpus, so the comparison between rungs is unaffected.
|
| 683 |
+
- **SET 1's `-seed{n}` repos reseed initialisation AND data order together.** The 160m
|
| 684 |
+
weight-seed/data-seed control separates them (see the Control section) but only at n=3 pairs each.
|
| 685 |
+
The main grid's naive Δfloor should be read as an init-plus-data-order number.
|
| 686 |
- **SET 4's nats/byte is comparable across tokenizers but not free of tokenizer effects**: block
|
| 687 |
boundaries fall at different places for different tokenizers, and each block's first token is
|
| 688 |
+
unscored. With ~30k tokens per evaluation this is a sub-1% effect. The much larger tokenizer effect
|
| 689 |
+
— the English tokenizer's UNK rate on partner-language text — is reported per cell and is a
|
| 690 |
+
substantive finding rather than a nuisance.
|
| 691 |
- **The alignment search is over the permutation group (residual basis, MLP hidden axis, attention
|
| 692 |
+
heads) and its orthogonal relaxation, plus embedding-row Procrustes for the cross-tokenizer case.**
|
| 693 |
+
It is not the full symmetry group, and the residual factor is fitted from a finite activation
|
| 694 |
+
sample. A better aligner could raise the M1 rungs; nothing here bounds how far. What *is* bounded
|
| 695 |
+
is the claim that the aligners already in `mergeschool.core` do the job on these substrates.
|
| 696 |
+
- **The largest SET 1 sizes carry the fewest pairs.** 14m/31m/70m are complete 36-pair grids; 160m
|
| 697 |
+
and 410m are partial. The scale trend is monotone across all five but its right-hand end is thin.
|
| 698 |
+
- **SET 4's n = 4 language pairs**, all with English as one parent and all Indo-European. Any
|
| 699 |
+
predictor claim on that substrate is descriptive, and nothing here speaks to non-Indo-European or
|
| 700 |
+
to non-English pivots.
|
| 701 |
+
- **Everything here is training-free by construction.** No claim is made about what a small amount of
|
| 702 |
+
post-merge finetuning would recover; that is the obvious next experiment and it is out of scope for
|
| 703 |
+
a training-free audit.
|
| 704 |
""")
|
| 705 |
|
| 706 |
L.append("\n## Files\n")
|