thefinalboss commited on
Commit
7a69401
·
verified ·
1 Parent(s): 8044bdc

v3_scale: banc v4.1 complet old vs broad14 — McNemar patch + bootstrap blocs, verdict

Browse files
v3_scale/code/scale/scale_bench_v4.py CHANGED
@@ -7,10 +7,27 @@ Sorties scale_bench_v4.md / .json. Env HITS, OUT, SUFFIX (smoke)."""
7
  import os, json, itertools, numpy as np
8
  from math import comb
9
  D = os.path.dirname(os.path.abspath(__file__)); HITS = os.environ.get("HITS", f"{D}/hits_v4"); OUT = os.environ.get("OUT", f"{D}/results_v4.jsonl"); SUF = os.environ.get("SUFFIX", "")
10
- WIN = ["seen", "fc2", "fresh_en", "fresh_fr", "neither_code", "test20k", "queries", "test_v3"]; FRESH = ["fc2", "fresh_en", "fresh_fr", "test20k", "queries", "test_v3"] # 6 fenêtres fraîches propres (Relay 17:10)
 
11
  def mcn(b, c):
12
  n = b + c; k = min(b, c)
13
  return 1.0 if n == 0 else min(1.0, 2 * sum(comb(n, i) for i in range(k + 1)) / 2 ** n)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  def bytehits(z):
15
  """v4.1 : chaque octet de la cible t+1 hérite de fused_hit[t] (OOV = 0) → tableau par octet + plage [début, fin) couverte."""
16
  st, ln, h = z["tgt_start"], z["tgt_len"], z["fused_hit"]; L = int(z["window_bytes"]); a = np.zeros(L, bool)
@@ -27,24 +44,25 @@ for l in open(f"{D}/registry_v4.tsv"):
27
  tag, c, lab = l.rstrip("\n").split("\t"); P = {w: f"{HITS}/{tag}__{w}.npz" for w in WIN}
28
  E.append((lab, tag, c, {w: dict(np.load(p)) for w, p in P.items()} if all(map(os.path.exists, P.values())) else None))
29
  J = {"models": {}, "pairs": []}
30
- rows = ["| modèle | corpus | " + " | ".join(WIN) + " | fresh moy. | écart seen−fresh | wall s | pic RAM Mo | scale cal |", "|---|---|" + "---|" * (len(WIN) + 4)]
31
  for lab, tag, c, h in E:
32
- if h is None: rows.append(f"| {lab} | {c} | " + " | ".join("…" for _ in WIN) + " | | en attente | | | |"); continue
33
- a = {w: 100 * float(h[w]["fused_hit"][h[w]["invocab"]].mean()) for w in WIN}; fm = float(np.mean([a[w] for w in FRESH])); rr = R.get(tag, {})
34
  ws = sum(x["eval_s"] for x in rr.values()) + (next(iter(rr.values()))["load_s"] if rr else 0); pk = max([x["peak_rss_mb"] for x in rr.values()] or [0])
35
  sc = next(iter(rr.values()))["fusion_cal"]["scale"] if rr else float("nan")
36
- J["models"][lab] = {"tag": tag, "acc_invocab": a, "fresh_mean": fm, "gap": a["seen"] - fm, "wall_s": ws, "peak_rss_mb": pk, "scale": sc, "scale_ok": 0.03 <= sc <= 0.11}
37
- rows.append(f"| {lab} | {c} | " + " | ".join(f"{a[w]:.2f}" for w in WIN) + f" | {fm:.2f} | {a['seen'] - fm:.2f} | {ws:.0f} | {pk:.0f} | {sc:.3f}{'' if 0.03 <= sc <= 0.11 else ' HORS'} |")
38
- pr = ["| A | B | fenêtre | A seul | B seul | p | signe |", "|---|---|---|---|---|---|---|"]
 
39
  for (la, ta, ca, ha), (lb, tb, cb, hb) in itertools.combinations([e for e in E if e[3] is not None], 2):
40
  for w in WIN:
41
  if not all("tgt_start" in z for z in (ha[w], hb[w])):
42
  J["pairs"].append({"A": la, "B": lb, "window": w, "status": "non_apparie"}); pr.append(f"| {la} | {lb} | {w} | – | – | – | NON APPARIÉ (positions de tokenizers différents, à relancer en v4.1) |"); continue
43
  if str(ha[w]["window_sha256"]) != str(hb[w]["window_sha256"]):
44
- pr.append(f"| {la} | {lb} | {w} | – | – | – | octets différents (corpus propre) |"); continue
45
  x, y = bytehits(ha[w]), bytehits(hb[w]); lo = max(x[1], y[1]); hi = min(x[2], y[2]); x, y = x[0][lo:hi], y[0][lo:hi]
46
- b, cc = int((x & ~y).sum()), int((~x & y).sum()); p = mcn(b, cc)
47
- J["pairs"].append({"A": la, "B": lb, "window": w, "unit": "byte", "byte_range": [int(lo), int(hi)], "A_only": b, "B_only": cc, "p": p})
48
- pr.append(f"| {la} | {lb} | {w} | {b} | {cc} | {p:.2g} | {'B>A' if cc > b else ('A>B' if b > cc else '=')}{' *' if p < 0.05 else ''} |")
49
- md = "# Banc scale v4 — fused_acc_invocab (%) — fenêtres fixes identiques (seen = corpus propre)\n\n" + "\n".join(rows) + "\n\n## McNemar exact par paires — v4.1 apparié par OCTET (même flux d'octets, plage commune ; tokenizers différents ⇒ positions non comparables). Octets d'un même patch corrélés : p indicatif (anticonservateur)\n" + "\n".join(pr) + "\n"
50
  open(f"{D}/scale_bench_v4{SUF}.md", "w").write(md); json.dump(J, open(f"{D}/scale_bench_v4{SUF}.json", "w"), indent=1); print(md)
 
7
  import os, json, itertools, numpy as np
8
  from math import comb
9
  D = os.path.dirname(os.path.abspath(__file__)); HITS = os.environ.get("HITS", f"{D}/hits_v4"); OUT = os.environ.get("OUT", f"{D}/results_v4.jsonl"); SUF = os.environ.get("SUFFIX", "")
10
+ WIN = ["seen", "fc2", "fresh_en", "fresh_fr", "neither_code", "test20k", "queries", "test_v3"]; FRESH = ["fc2", "fresh_en", "fresh_fr", "neither_code", "test20k"] # titre = définition Relay 18:22 (inclut neither_code, contaminé)
11
+ FRESH6 = ["fc2", "fresh_en", "fresh_fr", "test20k", "test_v3"] # secondaire : 5 fenêtres propres (test_v3 au lieu de neither_code) ; queries et test_v3 aussi rapportés à part
12
  def mcn(b, c):
13
  n = b + c; k = min(b, c)
14
  return 1.0 if n == 0 else min(1.0, 2 * sum(comb(n, i) for i in range(k + 1)) / 2 ** n)
15
+ def boot(x, y, blk=512, nb=2000, seed=0):
16
+ """Bootstrap par blocs (DÉCISIF, Relay 18:14) : blocs contigus de 512 octets, 2 000 rééchantillonnages, seed 0 ; Δ = acc_B − acc_A par octet."""
17
+ nbk = len(x) // blk; X = x[:nbk * blk].reshape(nbk, blk).mean(1); Y = y[:nbk * blk].reshape(nbk, blk).mean(1); d = Y - X
18
+ r = np.random.default_rng(seed); bs = d[r.integers(0, nbk, (nb, nbk))].mean(1); lo, hi = np.percentile(bs, [2.5, 97.5])
19
+ return float(d.mean()), float(lo), float(hi), float(min(1.0, 2 * min((bs <= 0).mean(), (bs >= 0).mean())))
20
+ def unit_mcn(za, zb, lo, hi):
21
+ """McNemar exact niveau PATCH (DÉCISIF) : unités = segments entre frontières de patch COMMUNES aux deux tokenizers, dans [lo, hi).
22
+ Une unité est réussie pour un modèle si toutes ses cibles (patches) dans l'unité sont des hits. Unités appariées → McNemar exact."""
23
+ def bd(z):
24
+ st, ln = z["tgt_start"], z["tgt_len"]; return st, st + ln, z["fused_hit"]
25
+ sa, ea, ha_ = bd(za); sb, eb, hb_ = bd(zb)
26
+ common = np.intersect1d(np.concatenate([sa, ea[-1:]]), np.concatenate([sb, eb[-1:]])); common = common[(common >= lo) & (common <= hi)]
27
+ def uh(s, e, h):
28
+ k = np.searchsorted(common, s, side="right") - 1; ok = (s >= common[0]) & (e <= common[-1])
29
+ u = np.ones(len(common) - 1, bool); np.logical_and.at(u, k[ok], h[ok]); return u
30
+ x, y = uh(sa, ea, ha_), uh(sb, eb, hb_); b, c = int((x & ~y).sum()), int((~x & y).sum()); return len(x), b, c, mcn(b, c)
31
  def bytehits(z):
32
  """v4.1 : chaque octet de la cible t+1 hérite de fused_hit[t] (OOV = 0) → tableau par octet + plage [début, fin) couverte."""
33
  st, ln, h = z["tgt_start"], z["tgt_len"], z["fused_hit"]; L = int(z["window_bytes"]); a = np.zeros(L, bool)
 
44
  tag, c, lab = l.rstrip("\n").split("\t"); P = {w: f"{HITS}/{tag}__{w}.npz" for w in WIN}
45
  E.append((lab, tag, c, {w: dict(np.load(p)) for w, p in P.items()} if all(map(os.path.exists, P.values())) else None))
46
  J = {"models": {}, "pairs": []}
47
+ rows = ["| modèle | corpus | " + " | ".join(WIN) + " | fresh moy. titre (fc2,en,fr,neither,test20k) | fresh moy. propre (fc2,en,fr,test20k,test_v3) | écart seen−titre | wall s | pic RAM Mo | scale cal |", "|---|---|" + "---|" * (len(WIN) + 5)]
48
  for lab, tag, c, h in E:
49
+ if h is None: rows.append(f"| {lab} | {c} | " + " | ".join("…" for _ in WIN) + " | | | en attente | | | |"); continue
50
+ a = {w: 100 * float(h[w]["fused_hit"][h[w]["invocab"]].mean()) for w in WIN}; fm = float(np.mean([a[w] for w in FRESH])); fm6 = float(np.mean([a[w] for w in FRESH6])); rr = R.get(tag, {})
51
  ws = sum(x["eval_s"] for x in rr.values()) + (next(iter(rr.values()))["load_s"] if rr else 0); pk = max([x["peak_rss_mb"] for x in rr.values()] or [0])
52
  sc = next(iter(rr.values()))["fusion_cal"]["scale"] if rr else float("nan")
53
+ J["models"][lab] = {"tag": tag, "acc_invocab": a, "fresh_mean_titre_1822": fm, "fresh_mean_propre5": fm6, "gap_propre5": a["seen"] - fm6, "gap": a["seen"] - fm, "wall_s": ws, "peak_rss_mb": pk, "scale": sc, "scale_ok": 0.03 <= sc <= 0.11}
54
+ rows.append(f"| {lab} | {c} | " + " | ".join(f"{a[w]:.2f}" for w in WIN) + f" | **{fm:.2f}** | {fm6:.2f} | **{a['seen'] - fm:.2f}** | {ws:.0f} | {pk:.0f} | {sc:.3f}{'' if 0.03 <= sc <= 0.11 else ' HORS'} |")
55
+ pr = ["| A | B | fenêtre | A seul (octets) | B seul (octets) | p (indicatif) | signe | A hits/n patches | B hits/n patches | Δ B−A % octets, IC95 bootstrap blocs 512 o |McNemar PATCH (unités à frontières communes) A seul / B seul (DÉCISIF) |", "|---|---|---|---|---|---|---|---|---|---|---|"]
56
+ def pc(z): return f"{int(z['fused_hit'].sum())}/{len(z['fused_hit'])}"
57
  for (la, ta, ca, ha), (lb, tb, cb, hb) in itertools.combinations([e for e in E if e[3] is not None], 2):
58
  for w in WIN:
59
  if not all("tgt_start" in z for z in (ha[w], hb[w])):
60
  J["pairs"].append({"A": la, "B": lb, "window": w, "status": "non_apparie"}); pr.append(f"| {la} | {lb} | {w} | – | – | – | NON APPARIÉ (positions de tokenizers différents, à relancer en v4.1) |"); continue
61
  if str(ha[w]["window_sha256"]) != str(hb[w]["window_sha256"]):
62
+ J["pairs"].append({"A": la, "B": lb, "window": w, "status": "non_comparable_octets_differents", "A_patch": pc(ha[w]), "B_patch": pc(hb[w])}); pr.append(f"| {la} | {lb} | {w} | – | – | – | NON COMPARABLE (octets différents : seen du corpus propre) | {pc(ha[w])} | {pc(hb[w])} |"); continue
63
  x, y = bytehits(ha[w]), bytehits(hb[w]); lo = max(x[1], y[1]); hi = min(x[2], y[2]); x, y = x[0][lo:hi], y[0][lo:hi]
64
+ b, cc = int((x & ~y).sum()), int((~x & y).sum()); p = mcn(b, cc); dm, dlo, dhi, pb = boot(x, y); sig = dlo > 0 or dhi < 0; nu, ub, uc, up = unit_mcn(ha[w], hb[w], lo, hi)
65
+ J["pairs"].append({"A": la, "B": lb, "window": w, "unit": "byte", "boot_delta_pct": 100 * dm, "boot_ci95_pct": [100 * dlo, 100 * dhi], "boot_p": pb, "boot_sig": bool(sig), "patch_units": nu, "patch_A_only": ub, "patch_B_only": uc, "patch_p": up, "patch_sig": bool(up < 0.05), "byte_range": [int(lo), int(hi)], "A_only": b, "B_only": cc, "p": p, "A_patch": pc(ha[w]), "B_patch": pc(hb[w])})
66
+ pr.append(f"| {la} | {lb} | {w} | {b} | {cc} | {p:.2g} | {'B>A' if cc > b else ('A>B' if b > cc else '=')}{' *' if p < 0.05 else ''} | {pc(ha[w])} | {pc(hb[w])} | {100*dm:+.2f} [{100*dlo:+.2f} ; {100*dhi:+.2f}] p={pb:.3g}{' **' if sig else ''} | {ub} / {uc} sur {nu} unités, p={up:.2g}{' **' if up < 0.05 else ''} |")
67
+ md = "# Banc scale v4 — fused_acc_invocab (%) — fenêtres fixes identiques (seen = corpus propre)\n\n" + "\n".join(rows) + "\n\n## McNemar exact par paires — v4.1 apparié par OCTET (même flux d'octets, plage commune ; tokenizers différents ⇒ positions non comparables). p McNemar octet = INDICATIF (octets d'un patch corrélés) ; tests DÉCISIFS = McNemar exact niveau patch (unités entre frontières communes) et bootstrap par blocs de 512 o (IC95 excluant 0 = **). Toutes les paires doivent être en v4.1 avant tout verdict. Moyenne titre = Relay 18:22 (fc2, fresh_en, fresh_fr, neither_code, test20k) ; neither_code contaminé (100 % broad / 90 % old) → variante propre (test_v3 au lieu de neither_code) en secondaire ; queries et test_v3 à part.\n" + "\n".join(pr) + "\n"
68
  open(f"{D}/scale_bench_v4{SUF}.md", "w").write(md); json.dump(J, open(f"{D}/scale_bench_v4{SUF}.json", "w"), indent=1); print(md)
v3_scale/reports/scale_bench_v4.json CHANGED
@@ -12,8 +12,10 @@
12
  "queries": 0.0,
13
  "test_v3": 4.117009750812568
14
  },
15
- "fresh_mean": 3.699932724384364,
16
- "gap": 94.62999229265722,
 
 
17
  "wall_s": 1576.3,
18
  "peak_rss_mb": 710.1,
19
  "scale": 0.03498957642842646,
@@ -31,8 +33,10 @@
31
  "queries": 8.02061855670103,
32
  "test_v3": 2.804232804232804
33
  },
34
- "fresh_mean": 5.066293497738523,
35
- "gap": 86.86780392346492,
 
 
36
  "wall_s": 1182.7,
37
  "peak_rss_mb": 1280.0,
38
  "scale": 0.034140001563555386,
@@ -44,56 +48,198 @@
44
  "A": "old (r\u00e9f)",
45
  "B": "broad 14 % (r\u00e9f)",
46
  "window": "seen",
47
- "status": "non_apparie"
 
 
48
  },
49
  {
50
  "A": "old (r\u00e9f)",
51
  "B": "broad 14 % (r\u00e9f)",
52
  "window": "fc2",
53
- "status": "non_apparie"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  },
55
  {
56
  "A": "old (r\u00e9f)",
57
  "B": "broad 14 % (r\u00e9f)",
58
  "window": "fresh_en",
59
- "status": "non_apparie"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  },
61
  {
62
  "A": "old (r\u00e9f)",
63
  "B": "broad 14 % (r\u00e9f)",
64
  "window": "fresh_fr",
65
- "status": "non_apparie"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  },
67
  {
68
  "A": "old (r\u00e9f)",
69
  "B": "broad 14 % (r\u00e9f)",
70
  "window": "neither_code",
71
- "status": "non_apparie"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  },
73
  {
74
  "A": "old (r\u00e9f)",
75
  "B": "broad 14 % (r\u00e9f)",
76
  "window": "test20k",
77
- "status": "non_apparie"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  },
79
  {
80
  "A": "old (r\u00e9f)",
81
  "B": "broad 14 % (r\u00e9f)",
82
  "window": "queries",
83
  "unit": "byte",
 
 
 
 
 
 
 
 
 
 
 
 
84
  "byte_range": [
85
  3,
86
  27800
87
  ],
88
  "A_only": 0,
89
  "B_only": 1417,
90
- "p": 0.0
 
 
91
  },
92
  {
93
  "A": "old (r\u00e9f)",
94
  "B": "broad 14 % (r\u00e9f)",
95
  "window": "test_v3",
96
- "status": "non_apparie"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  }
98
  ]
99
  }
 
12
  "queries": 0.0,
13
  "test_v3": 4.117009750812568
14
  },
15
+ "fresh_mean_titre_1822": 5.006772124641861,
16
+ "fresh_mean_propre5": 4.439919269261237,
17
+ "gap_propre5": 93.89000574778035,
18
+ "gap": 93.32315289239973,
19
  "wall_s": 1576.3,
20
  "peak_rss_mb": 710.1,
21
  "scale": 0.03498957642842646,
 
33
  "queries": 8.02061855670103,
34
  "test_v3": 2.804232804232804
35
  },
36
+ "fresh_mean_titre_1822": 5.448531184521665,
37
+ "fresh_mean_propre5": 4.475428485946022,
38
+ "gap_propre5": 87.45866893525742,
39
+ "gap": 86.48556623668178,
40
  "wall_s": 1182.7,
41
  "peak_rss_mb": 1280.0,
42
  "scale": 0.034140001563555386,
 
48
  "A": "old (r\u00e9f)",
49
  "B": "broad 14 % (r\u00e9f)",
50
  "window": "seen",
51
+ "status": "non_comparable_octets_differents",
52
+ "A_patch": "7848/8000",
53
+ "B_patch": "7348/8000"
54
  },
55
  {
56
  "A": "old (r\u00e9f)",
57
  "B": "broad 14 % (r\u00e9f)",
58
  "window": "fc2",
59
+ "unit": "byte",
60
+ "boot_delta_pct": -1.0033700980392157,
61
+ "boot_ci95_pct": [
62
+ -2.67367493872549,
63
+ 0.6855085784313726
64
+ ],
65
+ "boot_p": 0.251,
66
+ "boot_sig": false,
67
+ "patch_units": 1969,
68
+ "patch_A_only": 68,
69
+ "patch_B_only": 4,
70
+ "patch_p": 4.620814601991648e-16,
71
+ "patch_sig": true,
72
+ "byte_range": [
73
+ 4,
74
+ 26329
75
+ ],
76
+ "A_only": 1610,
77
+ "B_only": 1342,
78
+ "p": 8.76905537604743e-07,
79
+ "A_patch": "591/8000",
80
+ "B_patch": "575/8000"
81
  },
82
  {
83
  "A": "old (r\u00e9f)",
84
  "B": "broad 14 % (r\u00e9f)",
85
  "window": "fresh_en",
86
+ "unit": "byte",
87
+ "boot_delta_pct": 1.5625,
88
+ "boot_ci95_pct": [
89
+ 0.9122467041015625,
90
+ 2.2552490234375
91
+ ],
92
+ "boot_p": 0.0,
93
+ "boot_sig": true,
94
+ "patch_units": 2321,
95
+ "patch_A_only": 18,
96
+ "patch_B_only": 24,
97
+ "patch_p": 0.44079906734259566,
98
+ "patch_sig": false,
99
+ "byte_range": [
100
+ 4,
101
+ 32911
102
+ ],
103
+ "A_only": 641,
104
+ "B_only": 1163,
105
+ "p": 4.6458063498024814e-35,
106
+ "A_patch": "195/8000",
107
+ "B_patch": "336/8000"
108
  },
109
  {
110
  "A": "old (r\u00e9f)",
111
  "B": "broad 14 % (r\u00e9f)",
112
  "window": "fresh_fr",
113
+ "unit": "byte",
114
+ "boot_delta_pct": 1.38671875,
115
+ "boot_ci95_pct": [
116
+ 0.18740234375,
117
+ 3.18369140625
118
+ ],
119
+ "boot_p": 0.004,
120
+ "boot_sig": true,
121
+ "patch_units": 2902,
122
+ "patch_A_only": 0,
123
+ "patch_B_only": 1,
124
+ "patch_p": 1.0,
125
+ "patch_sig": false,
126
+ "byte_range": [
127
+ 5,
128
+ 25687
129
+ ],
130
+ "A_only": 25,
131
+ "B_only": 380,
132
+ "p": 1.2039434546462374e-82,
133
+ "A_patch": "9/8000",
134
+ "B_patch": "129/8000"
135
  },
136
  {
137
  "A": "old (r\u00e9f)",
138
  "B": "broad 14 % (r\u00e9f)",
139
  "window": "neither_code",
140
+ "unit": "byte",
141
+ "boot_delta_pct": 2.4102393617021276,
142
+ "boot_ci95_pct": [
143
+ 0.7223445811170213,
144
+ 4.251371343085105
145
+ ],
146
+ "boot_p": 0.004,
147
+ "boot_sig": true,
148
+ "patch_units": 1972,
149
+ "patch_A_only": 30,
150
+ "patch_B_only": 9,
151
+ "patch_p": 0.0010650196345523,
152
+ "patch_sig": true,
153
+ "byte_range": [
154
+ 4,
155
+ 24484
156
+ ],
157
+ "A_only": 747,
158
+ "B_only": 1329,
159
+ "p": 1.0216589286783532e-37,
160
+ "A_patch": "322/8000",
161
+ "B_patch": "532/8000"
162
  },
163
  {
164
  "A": "old (r\u00e9f)",
165
  "B": "broad 14 % (r\u00e9f)",
166
  "window": "test20k",
167
+ "unit": "byte",
168
+ "boot_delta_pct": 0.4294370993589744,
169
+ "boot_ci95_pct": [
170
+ 0.1252003205128205,
171
+ 0.7249098557692308
172
+ ],
173
+ "boot_p": 0.001,
174
+ "boot_sig": true,
175
+ "patch_units": 5515,
176
+ "patch_A_only": 34,
177
+ "patch_B_only": 29,
178
+ "patch_p": 0.6146550157654618,
179
+ "patch_sig": false,
180
+ "byte_range": [
181
+ 3,
182
+ 80055
183
+ ],
184
+ "A_only": 1357,
185
+ "B_only": 1691,
186
+ "p": 1.5650226256822506e-09,
187
+ "A_patch": "388/20000",
188
+ "B_patch": "506/20000"
189
  },
190
  {
191
  "A": "old (r\u00e9f)",
192
  "B": "broad 14 % (r\u00e9f)",
193
  "window": "queries",
194
  "unit": "byte",
195
+ "boot_delta_pct": 5.110677083333334,
196
+ "boot_ci95_pct": [
197
+ 4.940592447916667,
198
+ 5.291612413194444
199
+ ],
200
+ "boot_p": 0.0,
201
+ "boot_sig": true,
202
+ "patch_units": 2748,
203
+ "patch_A_only": 0,
204
+ "patch_B_only": 50,
205
+ "patch_p": 1.7763568394002505e-15,
206
+ "patch_sig": true,
207
  "byte_range": [
208
  3,
209
  27800
210
  ],
211
  "A_only": 0,
212
  "B_only": 1417,
213
+ "p": 0.0,
214
+ "A_patch": "0/7099",
215
+ "B_patch": "389/7750"
216
  },
217
  {
218
  "A": "old (r\u00e9f)",
219
  "B": "broad 14 % (r\u00e9f)",
220
  "window": "test_v3",
221
+ "unit": "byte",
222
+ "boot_delta_pct": -0.6236979166666666,
223
+ "boot_ci95_pct": [
224
+ -0.9883138020833333,
225
+ -0.2642903645833335
226
+ ],
227
+ "boot_p": 0.001,
228
+ "boot_sig": true,
229
+ "patch_units": 6141,
230
+ "patch_A_only": 54,
231
+ "patch_B_only": 37,
232
+ "patch_p": 0.09294694311794123,
233
+ "patch_sig": false,
234
+ "byte_range": [
235
+ 5,
236
+ 77091
237
+ ],
238
+ "A_only": 1883,
239
+ "B_only": 1403,
240
+ "p": 5.724741191361626e-17,
241
+ "A_patch": "532/20000",
242
+ "B_patch": "424/20000"
243
  }
244
  ]
245
  }
v3_scale/reports/scale_bench_v4.md CHANGED
@@ -1,23 +1,24 @@
1
  # Banc scale v4 — fused_acc_invocab (%) — fenêtres fixes identiques (seen = corpus propre)
2
 
3
- | modèle | corpus | seen | fc2 | fresh_en | fresh_fr | neither_code | test20k | queries | test_v3 | fresh moy. | écart seen−fresh | wall s | pic RAM Mo | scale cal |
4
- |---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5
- | old (réf) | old_local_v1 | 98.33 | 11.50 | 3.40 | 0.28 | 6.95 | 2.90 | 0.00 | 4.12 | 3.70 | 94.63 | 1576 | 710 | 0.035 |
6
- | broad 14 % (réf) | broad_local_v1 | 91.93 | 8.46 | 5.17 | 2.72 | 7.67 | 3.23 | 8.02 | 2.80 | 5.07 | 86.87 | 1183 | 1280 | 0.034 |
7
- | broad 45 % (cov b) | broad_local_v1 | … | … | … | … | … | … | … | … | | en attente | | | |
8
- | broad FULL (M8, AM 100 %) | broad_local_v1 | … | … | … | … | … | … | … | … | | en attente | | | |
9
- | broad_local_v1 cov a | broad_local_v1 | … | … | … | … | … | … | … | … | | en attente | | | |
10
- | M8 broad CM 14 % | broad_local_v1 | … | … | … | … | … | … | … | … | | en attente | | | |
11
- | corpus_v3 cov b | corpus_v3 | … | … | … | … | … | … | … | … | | en attente | | | |
 
12
 
13
- ## McNemar exact par paires — v4.1 apparié par OCTET (même flux d'octets, plage commune ; tokenizers différents ⇒ positions non comparables). Octets d'un même patch corrélés : p indicatif (anticonservateur)
14
- | A | B | fenêtre | A seul | B seul | p | signe |
15
- |---|---|---|---|---|---|---|
16
- | old (réf) | broad 14 % (réf) | seen | – | – | – | NON APPARIÉ (positions de tokenizers différents, à relancer en v4.1) |
17
- | old (réf) | broad 14 % (réf) | fc2 | – | – | – | NON APPARIÉ (positions de tokenizers différents, à relancer en v4.1) |
18
- | old (réf) | broad 14 % (réf) | fresh_en | – | – | – | NON APPARIÉ (positions de tokenizers différents, à relancer en v4.1) |
19
- | old (réf) | broad 14 % (réf) | fresh_fr | – | – | – | NON APPARIÉ (positions de tokenizers différents, à relancer en v4.1) |
20
- | old (réf) | broad 14 % (réf) | neither_code | – | – | – | NON APPARIÉ (positions de tokenizers différents, à relancer en v4.1) |
21
- | old (réf) | broad 14 % (réf) | test20k | – | – | – | NON APPARIÉ (positions de tokenizers différents, à relancer en v4.1) |
22
- | old (réf) | broad 14 % (réf) | queries | 0 | 1417 | 0 | B>A * |
23
- | old (réf) | broad 14 % (réf) | test_v3 | – | – | – | NON APPARIÉ (positions de tokenizers différents, à relancer en v4.1) |
 
1
  # Banc scale v4 — fused_acc_invocab (%) — fenêtres fixes identiques (seen = corpus propre)
2
 
3
+ | modèle | corpus | seen | fc2 | fresh_en | fresh_fr | neither_code | test20k | queries | test_v3 | fresh moy. titre (fc2,en,fr,neither,test20k) | fresh moy. propre (fc2,en,fr,test20k,test_v3) | écart seen−titre | wall s | pic RAM Mo | scale cal |
4
+ |---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5
+ | old (réf) | old_local_v1 | 98.33 | 11.50 | 3.40 | 0.28 | 6.95 | 2.90 | 0.00 | 4.12 | **5.01** | 4.44 | **93.32** | 1576 | 710 | 0.035 |
6
+ | broad 14 % (réf) | broad_local_v1 | 91.93 | 8.46 | 5.17 | 2.72 | 7.67 | 3.23 | 8.02 | 2.80 | **5.45** | 4.48 | **86.49** | 1183 | 1280 | 0.034 |
7
+ | broad 45 % (cov b) | broad_local_v1 | … | … | … | … | … | … | … | … | | | en attente | | | |
8
+ | broad FULL (M8, AM 100 %) | broad_local_v1 | … | … | … | … | … | … | … | … | | | en attente | | | |
9
+ | broad_local_v1 cov a | broad_local_v1 | … | … | … | … | … | … | … | … | | | en attente | | | |
10
+ | M8 broad CM 14 % | broad_local_v1 | … | … | … | … | … | … | … | … | | | en attente | | | |
11
+ | corpus_v3 cov b | corpus_v3 | … | … | … | … | … | … | … | … | | | en attente | | | |
12
+ | corpus_v3 M8 CM (budget broad14) | corpus_v3 | … | … | … | … | … | … | … | … | | | en attente | | | |
13
 
14
+ ## McNemar exact par paires — v4.1 apparié par OCTET (même flux d'octets, plage commune ; tokenizers différents ⇒ positions non comparables). p McNemar octet = INDICATIF (octets d'un patch corrélés) ; tests DÉCISIFS = McNemar exact niveau patch (unités entre frontières communes) et bootstrap par blocs de 512 o (IC95 excluant 0 = **). Toutes les paires doivent être en v4.1 avant tout verdict. Moyenne titre = Relay 18:22 (fc2, fresh_en, fresh_fr, neither_code, test20k) ; neither_code contaminé (100 % broad / 90 % old) → variante propre (test_v3 au lieu de neither_code) en secondaire ; queries et test_v3 à part.
15
+ | A | B | fenêtre | A seul (octets) | B seul (octets) | p (indicatif) | signe | A hits/n patches | B hits/n patches | Δ B−A % octets, IC95 bootstrap blocs 512 o |McNemar PATCH (unités à frontières communes) A seul / B seul (DÉCISIF) |
16
+ |---|---|---|---|---|---|---|---|---|---|---|
17
+ | old (réf) | broad 14 % (réf) | seen | – | – | – | NON COMPARABLE (octets différents : seen du corpus propre) | 7848/8000 | 7348/8000 |
18
+ | old (réf) | broad 14 % (réf) | fc2 | 1610 | 1342 | 8.8e-07 | A>B * | 591/8000 | 575/8000 | -1.00 [-2.67 ; +0.69] p=0.251 | 68 / 4 sur 1969 unités, p=4.6e-16 ** |
19
+ | old (réf) | broad 14 % (réf) | fresh_en | 641 | 1163 | 4.6e-35 | B>A * | 195/8000 | 336/8000 | +1.56 [+0.91 ; +2.26] p=0 ** | 18 / 24 sur 2321 unités, p=0.44 |
20
+ | old (réf) | broad 14 % (réf) | fresh_fr | 25 | 380 | 1.2e-82 | B>A * | 9/8000 | 129/8000 | +1.39 [+0.19 ; +3.18] p=0.004 ** | 0 / 1 sur 2902 unités, p=1 |
21
+ | old (réf) | broad 14 % (réf) | neither_code | 747 | 1329 | 1e-37 | B>A * | 322/8000 | 532/8000 | +2.41 [+0.72 ; +4.25] p=0.004 ** | 30 / 9 sur 1972 unités, p=0.0011 ** |
22
+ | old (réf) | broad 14 % (réf) | test20k | 1357 | 1691 | 1.6e-09 | B>A * | 388/20000 | 506/20000 | +0.43 [+0.13 ; +0.72] p=0.001 ** | 34 / 29 sur 5515 unités, p=0.61 |
23
+ | old (réf) | broad 14 % (réf) | queries | 0 | 1417 | 0 | B>A * | 0/7099 | 389/7750 | +5.11 [+4.94 ; +5.29] p=0 ** | 0 / 50 sur 2748 unités, p=1.8e-15 ** |
24
+ | old (réf) | broad 14 % (réf) | test_v3 | 1883 | 1403 | 5.7e-17 | A>B * | 532/20000 | 424/20000 | -0.62 [-0.99 ; -0.26] p=0.001 ** | 54 / 37 sur 6141 unités, p=0.093 |