SPB Git

spb/wp31_uqo

Public

WP31: 103M pilot results (editor, GR, controller, routing, latency)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Simon-Pierre Boucher committed (Oct 30, 2026) parent a2c46f0 Browse files

46 changed files +1,542 −39

46 changed files
Unified Split
modified FAILURES.md +1 −0
@@ -13,3 +13,4 @@
13 13 | 2026-10-30 | Ranking-loss controller (D12: pairwise + listwise on top of Huber/BCE/NLL, editor-unseen labels): calibration sign accuracy fell to 45 %, captured fraction −8 %; on dev-iid the locked policy (λ=0.3, κ=0.5) edits 0.07 tokens and matches budget 0 (0.4333 vs 0.4334); λ=0 is worse (+1.3 %). | `experiments/runs/controller_v1rank_seed01_*`, `results/raw/routing_v1rank.json` | Within-state ranking is not learnable from these labels at this scale; H3 null stands. |
14 14 | 2026-10-30 | Stage A ran 6,000 steps instead of the intended 12,000 (stale config on the node, see rsync exclusion bug above); the enlarged baseline ran the 12,000-step config until step ~6,540 and was killed. | `experiments/runs/pretrain103m_seed01_20261029232706/manifest.json` (resolved_train.steps = 6000), M3U96b log | Backbone budget fixed at 98.3M tokens (D13); baseline relaunched with the same 6,000-step recipe. |
15 15 | 2026-10-30 | 103M editor pilot at lr 1e-3 collapsed to inert edits within 500 steps (val loss identical at every budget, 3.9889; trainable gradient norm 0.00 from step 160) — the same failure as the tiny w=128 lr 3e-3 run. | M3U96a `experiments/logs/editor_pilot_103m_seed1.log`, run `editor_pilot_103m_seed01_*` (killed at step ~650) | relaunched with lr 3e-4 (D14). |
16 +| 2026-10-30 | 103M dense-slot probe collapsed to inert edits at lr 1e-3 (step 280, gradient norm 0.00) and again at lr 3e-4 (val loss identical at every budget, 3.9394, at step 500). Killed; no 103M dense result. | M2U64 `experiments/logs/dense_probe_103m*_seed1.log` | The dense ablation at 103M is reported as not obtained (collapse), with the tiny-scale 5-seed result as the only dense evidence. |
modified PROGRESS.md +1 −0
@@ -19,3 +19,4 @@
19 19 | 2026-10-30 | 5/6 routing evaluation (tiny v1 editor, dev-iid, 640 items / 3,417 answer tokens) | done | `evaluation.routing` → `results/raw/routing_controller_p4_hent_seed01_20261030002015_dev_iid.json` | budget 0: 0.4334; uniform b1 0.4301 (−0.8 %), random b1 0.4305, fixed pair b1 0.4306; b8 schedules +0.6 to +2.8 %; entropy router ≥ budget 0; norm router (thr 0.2) 0.4309; learned controller (locked λ=0.3) 0.4404 (+1.6 %) and worse at every λ; greedy one-step oracle 0.4025 (b1) → 0.3666 (b8, 2.26 edits/token, −15 %); two-step oracle gain 0.034 vs one-step 0.0233 vs greedy-then-best 0.0337 (myopia regret ≈ 0) | H2 null (uniform = random = pair); H3 null (controller < no routing on dev) at this scale; oracle opportunity large | labels from a split unseen by the editor (D11); 5-seed v2 matrix |
20 20 | 2026-10-30 | 6 ranking-loss controller (D12, tiny v1 editor, editor-unseen labels) | done | `controller_v1rank.yaml` → `results/raw/routing_v1rank.json` | locked λ=0.3 κ=0.5: dev-iid loss 0.4333 vs 0.4334 (0.07 edits/token); λ=0: +1.3 % | H3 null stands | — |
21 21 | 2026-10-30 | 4 dense-writes ablation (v2 backbone, 5 seeds) | done | `p4v2_dense.yaml` → `results/analyzed/seed_matrix_v2.json` | dev-iid loss −2.5/−3.2/−3.2/−1.6 % at b=1/2/4/8 (vs sparse −2.1/−2.8/−3.0/−1.0, GR −3.6/−4.1/−3.7/−3.3); EM +2.0 pp (b1), t-CI [1.6, 2.4] | sparse local writes ≤ dense (H2 second half null; 5 seeds: −2.4/−3.1/−3.1/−1.5 %, EM +2.0 pp [1.6, 2.4]) | — |
22 +| 2026-10-30 | 8–10 pilot stages B–D + routing + latency (103M) | done | `editor_pilot_103m_lr3e4` (3000 steps, 90 min, peak 25.9 GB), `labels_103m` (491k labels, 32,768 audit states), `controller_103m`, `routing_103m_val.json`, `latency_103m_mps.json`, `eval_gr_103m_val.json` | editor −0.04/−0.06/−0.08/−0.06 % at b=1/2/4/8; GR −0.08 % (ppl 48.16 → 48.01); controller locked (λ=0.3, κ=0.5) −0.01 % with 0.61 edits/token, calib sign acc 51 %, captured 7 %; oracle b8 −3.6 % (4.3 edits/token); two-step oracle 0.0162 vs one-step 0.0088 nats; latency batch 1: 7.55 ms (b0) → 22.9 (8 single) / 26.9 (8 dense) / 11.0 (controller) ms; dense 103M probe collapsed twice | H1 not supported on web text; H3 null; dispatch overhead still dominant (sparse 3.0× vs dense 3.6× measured, analytic 1.6× vs 3.1×) | enlarged baseline eval, final audit |
modified configs/experiments/controller_103m.yaml +1 −1
@@ -2,7 +2,7 @@ name: controller_103m
2 2 seed: 1
3 3 mode: prisme
4 4 model: from_checkpoint
5 −checkpoint: EDITOR103M_CKPT
5 +checkpoint: experiments/runs/editor_pilot_103m_lr3e4_seed01_20261030021200/checkpoint
6 6 labels:
7 7 train: LABELS_DIR/labels_train.pt
8 8 calib: LABELS_DIR/labels_calib.pt
modified configs/experiments/labels_103m.yaml +1 −1
@@ -2,7 +2,7 @@ name: labels_103m
2 2 seed: 1
3 3 mode: prisme
4 4 model: from_checkpoint
5 −checkpoint: EDITOR103M_CKPT
5 +checkpoint: experiments/runs/editor_pilot_103m_lr3e4_seed01_20261030021200/checkpoint
6 6 use_policy: false
7 7 data:
8 8 kind: tokens
modified configs/experiments/locked_evaluation.yaml +17 −10
@@ -1,17 +1,23 @@
1 −# Locked evaluation of the 103M pilot: held-out token cross-entropy at forced budgets and under the controller.
2 −# Splits: val (development) now; test (LOCKED) only after protocol/preregistration.md is frozen and the manifest unsealed.
3 1 out_dir: results/raw
4 −data: {kind: tokens, dir: data/processed/fineweb_edu_300m}
5 −splits: [val]
2 +data:
3 + kind: tokens
4 + dir: data/processed/fineweb_edu_300m
5 +splits:
6 +- val
6 7 seq_len: 512
7 8 batch_size: 16
8 −n_batches: 40 # 40 x 16 x 512 = 327,680 held-out tokens
9 −budgets: [0, 1, 2, 4, 8]
9 +n_batches: 40
10 +budgets:
11 +- 0
12 +- 1
13 +- 2
14 +- 4
15 +- 8
10 16 systems:
11 17 backbone_103m:
12 18 mode: backbone_only
13 19 model: from_checkpoint
14 − checkpoint: PRETRAIN103M_CKPT
20 + checkpoint: experiments/runs/pretrain103m_seed01_20261029232706/checkpoint
15 21 controller: false
16 22 enlarged_102m:
17 23 mode: backbone_only
@@ -21,11 +27,12 @@ systems:
21 27 prisme_103m_editor:
22 28 mode: prisme
23 29 model: from_checkpoint
24 − checkpoint: EDITOR103M_CKPT
30 + checkpoint: experiments/runs/editor_pilot_103m_lr3e4_seed01_20261030021200/checkpoint
25 31 controller: false
26 32 gr_103m:
27 33 mode: global_recurrence
28 − baseline_kwargs: {ffn_w: 2560}
34 + baseline_kwargs:
35 + ffn_w: 2560
29 36 model: from_checkpoint
30 − checkpoint: GR103M_CKPT
37 + checkpoint: experiments/runs/gr_pilot_103m_seed01_20261030015117/checkpoint
31 38 controller: false
added experiments/runs/controller_103m_seed01_20261030034451/config.yaml +65 −0
@@ -0,0 +1,65 @@
1 +experiment:
2 + name: controller_103m
3 + seed: 1
4 + mode: prisme
5 + model: from_checkpoint
6 + checkpoint: experiments/runs/editor_pilot_103m_lr3e4_seed01_20261030021200/checkpoint
7 + labels:
8 + train: experiments/runs/labels_103m_seed01_20261030034314/labels_train.pt
9 + calib: experiments/runs/labels_103m_seed01_20261030034314/labels_calib.pt
10 + train:
11 + steps: 1500
12 + lr: 0.001
13 + weight_decay: 0.01
14 + alpha: 1.0
15 + beta: 0.5
16 + gamma: 0.1
17 + huber_delta: 0.1
18 + log_every: 100
19 + eval_every: 250
20 + seq_len: 512
21 + lambda_grid:
22 + - 0.0
23 + - 0.01
24 + - 0.03
25 + - 0.1
26 + - 0.3
27 + kappa_grid:
28 + - 0.0
29 + - 0.5
30 + sweep_batches: 6
31 + max_budget: 8
32 + selection_rule: max_loss_reduction_per_ops
33 + model_overrides: {}
34 +model:
35 + name: prisme_103m
36 + vocab_size: 32768
37 + d_model: 768
38 + n_layers: 12
39 + n_heads: 12
40 + n_kv_heads: 3
41 + ffn_width: 2048
42 + max_seq_len: 4096
43 + rope_theta: 10000.0
44 + norm_eps: 1.0e-05
45 + tie_embeddings: true
46 + init_std: 0.02
47 + use_workspace: true
48 + w: 256
49 + ffn_w: 768
50 + n_slots: 16
51 + n_editor_blocks: 2
52 + n_editor_heads: 4
53 + r_max: 8
54 + eta_max: 0.25
55 + clip_c: 1.0
56 + clip_eps: 1.0e-06
57 + readout_zero_init: false
58 + readout_init_std: 0.2
59 + readout_scale: 8.851566314697266
60 + controller_hidden: 0
61 + ctrl_input: h
62 + ctrl_use_entropy: true
63 + lambda_cost: 0.0
64 + kappa_risk: 0.0
65 + dense_writes: false
added experiments/runs/controller_103m_seed01_20261030034451/manifest.json +151 −0
@@ -0,0 +1,151 @@
1 +{
2 + "run_id": "controller_103m_seed01_20261030034451",
3 + "name": "controller_103m",
4 + "seed": 1,
5 + "code_commit": "unknown",
6 + "config_sha256": "cb64baa3261e25b692057f7be7ff4ff4d1fd1f0686f233f60c9906c26164e32e",
7 + "started_at": "2026-10-30T03:44:51-0400",
8 + "host": "MacStudnpierre2",
9 + "python": "3.12.13",
10 + "torch": "2.15.0",
11 + "command": "/Users/simon-pierreboucher/wp31/prisme-slm/training/train_controller.py --config configs/experiments/controller_103m.yaml --device mps",
12 + "state": "completed",
13 + "wall_seconds": 315.08,
14 + "device": "mps",
15 + "checkpoint_parent": "experiments/runs/editor_pilot_103m_lr3e4_seed01_20261030021200/checkpoint",
16 + "labels_train": "experiments/runs/labels_103m_seed01_20261030034314/labels_train.pt",
17 + "labels_calib": "experiments/runs/labels_103m_seed01_20261030034314/labels_calib.pt",
18 + "finished_at": "2026-10-30T03:50:06-0400",
19 + "eval_train": {
20 + "huber": 0.0005079921786091291,
21 + "sign_acc": 0.5165206909179687,
22 + "harm_brier": 0.23502638936042786,
23 + "harm_ece": 0.017360106110572815,
24 + "n_labels": 655360,
25 + "oracle_opportunity_per_state": 0.0076657113619148735,
26 + "regret_per_state": 0.0072254255879670385,
27 + "captured_fraction": 0.057435735988610515,
28 + "top1_match": 0.0565185546875,
29 + "n_audit_states": 40960
30 + },
31 + "eval_calib": {
32 + "huber": 0.0005022834433475509,
33 + "sign_acc": 0.5141215006510417,
34 + "harm_brier": 0.2452416201432546,
35 + "harm_ece": 0.03279714658856392,
36 + "n_labels": 491520,
37 + "oracle_opportunity_per_state": 0.008453587186522782,
38 + "regret_per_state": 0.007839534722734243,
39 + "captured_fraction": 0.07263809436631807,
40 + "top1_match": 0.055999755859375,
41 + "n_audit_states": 32768
42 + },
43 + "sweep": [
44 + {
45 + "lambda": 0.0,
46 + "kappa": 0.0,
47 + "loss": 3.8988457918167114,
48 + "edits_per_token": 4.8095703125,
49 + "extra_ops_ratio": 0.4544869214296341,
50 + "loss_reduction": 0.0015107393264770508,
51 + "reduction_per_ops": 0.0033240545662455347
52 + },
53 + {
54 + "lambda": 0.0,
55 + "kappa": 0.5,
56 + "loss": 3.8992578188578286,
57 + "edits_per_token": 2.7021891276041665,
58 + "extra_ops_ratio": 0.23505109051863352,
59 + "loss_reduction": 0.0010987122853598486,
60 + "reduction_per_ops": 0.00467435519203749
61 + },
62 + {
63 + "lambda": 0.01,
64 + "kappa": 0.0,
65 + "loss": 3.898860216140747,
66 + "edits_per_token": 4.6912841796875,
67 + "extra_ops_ratio": 0.43767033020655316,
68 + "loss_reduction": 0.0014963150024414062,
69 + "reduction_per_ops": 0.003418817541813352
70 + },
71 + {
72 + "lambda": 0.01,
73 + "kappa": 0.5,
74 + "loss": 3.8993543783823648,
75 + "edits_per_token": 2.5965576171875,
76 + "extra_ops_ratio": 0.2230608140428861,
77 + "loss_reduction": 0.0010021527608237157,
78 + "reduction_per_ops": 0.004492733361185708
79 + },
80 + {
81 + "lambda": 0.03,
82 + "kappa": 0.0,
83 + "loss": 3.8987175623575845,
84 + "edits_per_token": 4.466267903645833,
85 + "extra_ops_ratio": 0.4043350915114085,
86 + "loss_reduction": 0.0016389687856039892,
87 + "reduction_per_ops": 0.004053491324429715
88 + },
89 + {
90 + "lambda": 0.03,
91 + "kappa": 0.5,
92 + "loss": 3.8993316888809204,
93 + "edits_per_token": 2.40234375,
94 + "extra_ops_ratio": 0.20202602942784628,
95 + "loss_reduction": 0.0010248422622680664,
96 + "reduction_per_ops": 0.005072822869263435
97 + },
98 + {
99 + "lambda": 0.1,
100 + "kappa": 0.0,
101 + "loss": 3.8987818559010825,
102 + "edits_per_token": 3.6865641276041665,
103 + "extra_ops_ratio": 0.3067183345556259,
104 + "loss_reduction": 0.0015746752421059718,
105 + "reduction_per_ops": 0.00513394559339716
106 + },
107 + {
108 + "lambda": 0.1,
109 + "kappa": 0.5,
110 + "loss": 3.8996830383936563,
111 + "edits_per_token": 1.7566324869791667,
112 + "extra_ops_ratio": 0.14280162130792937,
113 + "loss_reduction": 0.0006734927495322118,
114 + "reduction_per_ops": 0.004716282233798523
115 + },
116 + {
117 + "lambda": 0.3,
118 + "kappa": 0.0,
119 + "loss": 3.8995965321858725,
120 + "edits_per_token": 1.7585856119791667,
121 + "extra_ops_ratio": 0.1424483023583889,
122 + "loss_reduction": 0.0007599989573159327,
123 + "reduction_per_ops": 0.0053352615983013555
124 + },
125 + {
126 + "lambda": 0.3,
127 + "kappa": 0.5,
128 + "loss": 3.900011897087097,
129 + "edits_per_token": 0.5972493489583334,
130 + "extra_ops_ratio": 0.048378171709676586,
131 + "loss_reduction": 0.0003446340560913086,
132 + "reduction_per_ops": 0.00712375114461746
133 + }
134 + ],
135 + "baseline_budget0": {
136 + "loss": 3.9003565311431885,
137 + "edits_per_token": 0.0,
138 + "extra_ops_ratio": 0.0
139 + },
140 + "selected": {
141 + "lambda": 0.3,
142 + "kappa": 0.5,
143 + "loss": 3.900011897087097,
144 + "edits_per_token": 0.5972493489583334,
145 + "extra_ops_ratio": 0.048378171709676586,
146 + "loss_reduction": 0.0003446340560913086,
147 + "reduction_per_ops": 0.00712375114461746
148 + },
149 + "checkpoint_sha256": "64d08e9120608983b261bd6d108eb2421da45c84ebc733fa5fb2b88780dae427",
150 + "selection_rule": "max_loss_reduction_per_ops"
151 +}
\ No newline at end of file
added experiments/runs/controller_103m_seed01_20261030034451/metrics.jsonl +23 −0
@@ -0,0 +1,23 @@
1 +{"step": 0, "loss": 0.4732295870780945, "gain": 0.03798504173755646, "harm": 0.7073167562484741, "nll": 0.8158618211746216, "t": 1.59}
2 +{"step": 100, "loss": 0.17227067053318024, "gain": 0.0041774241253733635, "harm": 0.6836851239204407, "nll": -1.7374930381774902, "t": 18.86}
3 +{"step": 200, "loss": 0.12517236173152924, "gain": 0.001965296920388937, "harm": 0.670852780342102, "nll": -2.1221930980682373, "t": 34.25}
4 +{"step": 249, "calib_huber": 0.000880393876771753, "calib_sign_acc": 0.5023295084635416, "calib_harm_brier": 0.24648866603771846, "calib_harm_ece": 0.03357856348156929, "calib_n_labels": 491520, "calib_oracle_opportunity_per_state": 0.008453587186522782, "calib_regret_per_state": 0.00804906408302486, "calib_captured_fraction": 0.047852242435357795, "calib_top1_match": 0.0699462890625, "calib_n_audit_states": 32768, "t": 46.9}
5 +{"step": 300, "loss": 0.0760500431060791, "gain": 0.0009165772935375571, "harm": 0.6585628986358643, "nll": -2.5414798259735107, "t": 55.55}
6 +{"step": 400, "loss": 0.06960448622703552, "gain": 0.0009221362415701151, "harm": 0.6586024761199951, "nll": -2.6061887741088867, "t": 72.36}
7 +{"step": 499, "calib_huber": 0.0005022834433475509, "calib_sign_acc": 0.5141215006510417, "calib_harm_brier": 0.2452416201432546, "calib_harm_ece": 0.03279714658856392, "calib_n_labels": 491520, "calib_oracle_opportunity_per_state": 0.008453587186522782, "calib_regret_per_state": 0.007839534722734243, "calib_captured_fraction": 0.07263809436631807, "calib_top1_match": 0.055999755859375, "calib_n_audit_states": 32768, "t": 93.56}
8 +{"step": 500, "loss": 0.034200459718704224, "gain": 0.00042655051220208406, "harm": 0.670921266078949, "nll": -3.016867160797119, "t": 93.76}
9 +{"step": 600, "loss": 0.04568794369697571, "gain": 0.0006184718804433942, "harm": 0.662847638130188, "nll": -2.8635432720184326, "t": 110.57}
10 +{"step": 700, "loss": -0.023632705211639404, "gain": 0.000218810499063693, "harm": 0.6303975582122803, "nll": -3.3905029296875, "t": 127.13}
11 +{"step": 749, "calib_huber": 0.0002467253361828625, "calib_sign_acc": 0.4916748046875, "calib_harm_brier": 0.24779879599809645, "calib_harm_ece": 0.045154254883527756, "calib_n_labels": 491520, "calib_oracle_opportunity_per_state": 0.008453587186522782, "calib_regret_per_state": 0.008158762648236006, "calib_captured_fraction": 0.03487567251412538, "calib_top1_match": 0.0587158203125, "calib_n_audit_states": 32768, "t": 139.56}
12 +{"step": 800, "loss": -0.007390350103378296, "gain": 0.00031520085758529603, "harm": 0.6132218837738037, "nll": -3.14316463470459, "t": 147.7}
13 +{"step": 900, "loss": -0.010009020566940308, "gain": 0.00029699975857511163, "harm": 0.6271675825119019, "nll": -3.238898277282715, "t": 164.6}
14 +{"step": 999, "calib_huber": 0.00017406620681867935, "calib_sign_acc": 0.50128173828125, "calib_harm_brier": 0.2535098448395729, "calib_harm_ece": 0.07380883395671844, "calib_n_labels": 491520, "calib_oracle_opportunity_per_state": 0.008453587186522782, "calib_regret_per_state": 0.008104458509478718, "calib_captured_fraction": 0.041299470785687964, "calib_top1_match": 0.065460205078125, "calib_n_audit_states": 32768, "t": 186.44}
15 +{"step": 1000, "loss": -0.055137813091278076, "gain": 0.00015518153668381274, "harm": 0.6113837957382202, "nll": -3.609848976135254, "t": 186.6}
16 +{"step": 1100, "loss": -0.03290015459060669, "gain": 0.00020753977878484875, "harm": 0.609285831451416, "nll": -3.3775060176849365, "t": 202.61}
17 +{"step": 1200, "loss": -0.054915547370910645, "gain": 0.0002156073460355401, "harm": 0.5586880445480347, "nll": -3.3447518348693848, "t": 219.28}
18 +{"step": 1249, "calib_huber": 0.0001583198141209626, "calib_sign_acc": 0.512738037109375, "calib_harm_brier": 0.2619521975517273, "calib_harm_ece": 0.10497063398361206, "calib_n_labels": 491520, "calib_oracle_opportunity_per_state": 0.008453587186522782, "calib_regret_per_state": 0.007955018023494631, "calib_captured_fraction": 0.05897723085212869, "calib_top1_match": 0.06988525390625, "calib_n_audit_states": 32768, "t": 231.67}
19 +{"step": 1300, "loss": -0.046492695808410645, "gain": 0.0002507793833501637, "harm": 0.5760549306869507, "nll": -3.3477094173431396, "t": 239.51}
20 +{"step": 1400, "loss": -0.10818794369697571, "gain": 0.00016302871517837048, "harm": 0.502214789390564, "nll": -3.594583511352539, "t": 255.57}
21 +{"step": 1499, "loss": -0.09765100479125977, "gain": 0.0002172768145101145, "harm": 0.4987705647945404, "nll": -3.4725356101989746, "t": 271.95}
22 +{"step": 1499, "calib_huber": 0.0001905371716323619, "calib_sign_acc": 0.5203938802083333, "calib_harm_brier": 0.2722386827071508, "calib_harm_ece": 0.1319294273853302, "calib_n_labels": 491520, "calib_oracle_opportunity_per_state": 0.008453587186522782, "calib_regret_per_state": 0.007843576604500413, "calib_captured_fraction": 0.07215996813694481, "calib_top1_match": 0.077239990234375, "calib_n_audit_states": 32768, "t": 276.65}
23 +{"event": "restored_best_calibration_checkpoint", "step": 500, "score": -0.007839534722734243, "t": 276.65}
added experiments/runs/editor_pilot_103m_lr3e4_seed01_20261030021200/config.yaml +88 −0
@@ -0,0 +1,88 @@
1 +experiment:
2 + seed: 1
3 + model: configs/prisme_103m.yaml
4 + model_overrides:
5 + readout_zero_init: false
6 + readout_init_std: 0.2
7 + ctrl_input: h
8 + ctrl_use_entropy: true
9 + init:
10 + backbone_checkpoint: experiments/runs/pretrain103m_seed01_20261029232706/checkpoint
11 + freeze_backbone: true
12 + auto_readout_scale: true
13 + data:
14 + kind: tokens
15 + train_bin: data/processed/fineweb_edu_300m/train.bin
16 + val_bin: data/processed/fineweb_edu_300m/val.bin
17 + budgets:
18 + - 0
19 + - 1
20 + - 2
21 + - 4
22 + - 8
23 + budget_probs:
24 + - 0.2
25 + - 0.2
26 + - 0.2
27 + - 0.2
28 + - 0.2
29 + budget_per: position
30 + train:
31 + batch_size: 16
32 + seq_len: 512
33 + steps: 3000
34 + lr: 0.0003
35 + warmup: 100
36 + weight_decay: 0.1
37 + grad_clip: 1.0
38 + log_every: 20
39 + eval_every: 500
40 + eval_batches: 10
41 + ckpt_every: 1000
42 + final_exact_match: false
43 + name: editor_pilot_103m_lr3e4
44 + mode: prisme
45 +model:
46 + name: prisme_103m
47 + vocab_size: 32768
48 + d_model: 768
49 + n_layers: 12
50 + n_heads: 12
51 + n_kv_heads: 3
52 + ffn_width: 2048
53 + max_seq_len: 4096
54 + rope_theta: 10000.0
55 + norm_eps: 1.0e-05
56 + tie_embeddings: true
57 + init_std: 0.02
58 + use_workspace: true
59 + w: 256
60 + ffn_w: 768
61 + n_slots: 16
62 + n_editor_blocks: 2
63 + n_editor_heads: 4
64 + r_max: 8
65 + eta_max: 0.25
66 + clip_c: 1.0
67 + clip_eps: 1.0e-06
68 + readout_zero_init: false
69 + readout_init_std: 0.2
70 + readout_scale: 1.0
71 + controller_hidden: 0
72 + ctrl_input: h
73 + ctrl_use_entropy: true
74 + lambda_cost: 0.0
75 + kappa_risk: 0.0
76 + dense_writes: false
77 +resolved_train:
78 + batch_size: 16
79 + seq_len: 512
80 + steps: 3000
81 + lr: 0.0003
82 + warmup: 100
83 + weight_decay: 0.1
84 + grad_clip: 1.0
85 + log_every: 20
86 + eval_every: 500
87 + eval_batches: 10
88 + ckpt_every: 1000
added experiments/runs/editor_pilot_103m_lr3e4_seed01_20261030021200/manifest.json +28 −0
@@ -0,0 +1,28 @@
1 +{
2 + "run_id": "editor_pilot_103m_lr3e4_seed01_20261030021200",
3 + "name": "editor_pilot_103m_lr3e4",
4 + "seed": 1,
5 + "code_commit": "unknown",
6 + "config_sha256": "34555c00957d96128cbcc8a3db444e910de6724a1bcce91f80dbbc6e5faabb26",
7 + "started_at": "2026-10-30T02:12:01-0400",
8 + "host": "MacStudnpierre2",
9 + "python": "3.12.13",
10 + "torch": "2.15.0",
11 + "command": "/Users/simon-pierreboucher/wp31/prisme-slm/training/train_editor.py --config configs/experiments/editor_pilot_103m_lr3e4.yaml --device mps",
12 + "state": "completed",
13 + "wall_seconds": 5397.54,
14 + "device": "mps",
15 + "backend": "mps",
16 + "precision": "fp32",
17 + "n_params": 102265605,
18 + "n_trainable": 1907713,
19 + "checkpoint_parent": "experiments/runs/pretrain103m_seed01_20261029232706/checkpoint",
20 + "mode": "prisme",
21 + "freeze_backbone": true,
22 + "readout_scale": 8.851566314697266,
23 + "finished_at": "2026-10-30T03:41:58-0400",
24 + "train_tokens": 24576000,
25 + "peak_memory_bytes": 25939361792,
26 + "final_exact_match": {},
27 + "metrics_file": "experiments/runs/editor_pilot_103m_lr3e4_seed01_20261030021200/metrics.jsonl"
28 +}
\ No newline at end of file
added experiments/runs/editor_pilot_103m_lr3e4_seed01_20261030021200/metrics.jsonl +160 −0
@@ -0,0 +1,160 @@
1 +{"step": 0, "loss": 3.8388280868530273, "lr": 2.9999999999999997e-06, "grad_norm": 0.16530217230319977, "tokens": 8192, "tok_per_s": 5555.570741903939, "t": 2.33}
2 +{"step": 20, "loss": 3.683028221130371, "lr": 6.299999999999999e-05, "grad_norm": 0.14000000059604645, "tokens": 172032, "tok_per_s": 5153.812067721846, "t": 34.23}
3 +{"step": 40, "loss": 4.018809795379639, "lr": 0.00012299999999999998, "grad_norm": 0.12102383375167847, "tokens": 335872, "tok_per_s": 5114.816955004463, "t": 66.52}
4 +{"step": 60, "loss": 3.8221116065979004, "lr": 0.00018299999999999998, "grad_norm": 0.09996253252029419, "tokens": 499712, "tok_per_s": 4678.3844258352765, "t": 107.67}
5 +{"step": 80, "loss": 3.7520482540130615, "lr": 0.000243, "grad_norm": 0.08119877427816391, "tokens": 663552, "tok_per_s": 4566.69780285139, "t": 146.16}
6 +{"step": 100, "loss": 3.5873820781707764, "lr": 0.0003, "grad_norm": 0.05057114362716675, "tokens": 827392, "tok_per_s": 4404.052739043535, "t": 188.72}
7 +{"step": 120, "loss": 3.880525827407837, "lr": 0.00029996831523249534, "grad_norm": 0.02119096927344799, "tokens": 991232, "tok_per_s": 4411.498032822185, "t": 225.55}
8 +{"step": 140, "loss": 3.784116744995117, "lr": 0.00029987327580293684, "grad_norm": 0.012864955700933933, "tokens": 1155072, "tok_per_s": 4424.064223711705, "t": 261.94}
9 +{"step": 160, "loss": 3.988798141479492, "lr": 0.00029971492632320935, "grad_norm": 0.015187021344900131, "tokens": 1318912, "tok_per_s": 4491.147841157171, "t": 294.52}
10 +{"step": 180, "loss": 3.9943411350250244, "lr": 0.00029949334112318624, "grad_norm": 0.012424705550074577, "tokens": 1482752, "tok_per_s": 4375.225308050471, "t": 339.75}
11 +{"step": 200, "loss": 3.7738120555877686, "lr": 0.00029920862421583855, "grad_norm": 0.015423587523400784, "tokens": 1646592, "tok_per_s": 4316.237828757673, "t": 382.34}
12 +{"step": 220, "loss": 3.86301851272583, "lr": 0.00029886090924841085, "grad_norm": 0.01458093523979187, "tokens": 1810432, "tok_per_s": 4443.7918714043135, "t": 408.26}
13 +{"step": 240, "loss": 3.718639373779297, "lr": 0.00029845035943968696, "grad_norm": 0.010044100694358349, "tokens": 1974272, "tok_per_s": 4483.892496917172, "t": 441.16}
14 +{"step": 260, "loss": 3.63783860206604, "lr": 0.000297977167503374, "grad_norm": 0.01396073866635561, "tokens": 2138112, "tok_per_s": 4543.494007181648, "t": 471.44}
15 +{"step": 280, "loss": 3.697767972946167, "lr": 0.0002974415555576423, "grad_norm": 0.014589798636734486, "tokens": 2301952, "tok_per_s": 4600.971590123155, "t": 501.17}
16 +{"step": 300, "loss": 3.991833209991455, "lr": 0.00029684377502086165, "grad_norm": 0.006617589388042688, "tokens": 2465792, "tok_per_s": 4608.253979077773, "t": 535.93}
17 +{"step": 320, "loss": 3.776200771331787, "lr": 0.0002961841064935852, "grad_norm": 0.009673132561147213, "tokens": 2629632, "tok_per_s": 4661.962361198249, "t": 564.91}
18 +{"step": 340, "loss": 3.804020404815674, "lr": 0.0002954628596268339, "grad_norm": 0.008413425646722317, "tokens": 2793472, "tok_per_s": 4621.8243908042205, "t": 605.26}
19 +{"step": 360, "loss": 3.6039321422576904, "lr": 0.00029468037297674526, "grad_norm": 0.011924357153475285, "tokens": 2957312, "tok_per_s": 4647.944307062156, "t": 637.12}
20 +{"step": 380, "loss": 3.828267812728882, "lr": 0.000293837013845654, "grad_norm": 0.012362201698124409, "tokens": 3121152, "tok_per_s": 4671.112004620043, "t": 669.04}
21 +{"step": 400, "loss": 3.7054331302642822, "lr": 0.0002929331781096783, "grad_norm": 0.013202954083681107, "tokens": 3284992, "tok_per_s": 4690.541827956888, "t": 701.2}
22 +{"step": 420, "loss": 3.8094773292541504, "lr": 0.0002919692900328947, "grad_norm": 0.013429978862404823, "tokens": 3448832, "tok_per_s": 4650.34476065565, "t": 742.48}
23 +{"step": 440, "loss": 3.832529306411743, "lr": 0.00029094580206818636, "grad_norm": 0.015276624821126461, "tokens": 3612672, "tok_per_s": 4700.278107237236, "t": 769.46}
24 +{"step": 460, "loss": 3.6833889484405518, "lr": 0.00028986319464486, "grad_norm": 0.010125985369086266, "tokens": 3776512, "tok_per_s": 4592.850904398649, "t": 823.11}
25 +{"step": 480, "loss": 3.6737911701202393, "lr": 0.0002887219759431305, "grad_norm": 0.013986553996801376, "tokens": 3940352, "tok_per_s": 4586.490897097214, "t": 859.97}
26 +{"step": 499, "val_loss_b0": 3.9889174699783325, "val_loss_b1": 3.9885329008102417, "val_loss_b2": 3.988248109817505, "val_loss_b4": 3.988071346282959, "val_loss_b8": 3.989164853096008, "t": 918.99}
27 +{"step": 500, "loss": 3.585740566253662, "lr": 0.00028752268165557917, "grad_norm": 0.015741195529699326, "tokens": 4104192, "tok_per_s": 4462.758202491632, "t": 920.51}
28 +{"step": 520, "loss": 3.7321407794952393, "lr": 0.00028626587473569746, "grad_norm": 0.009654651395976543, "tokens": 4268032, "tok_per_s": 4392.5144225691865, "t": 972.52}
29 +{"step": 540, "loss": 3.675868511199951, "lr": 0.00028495214513363427, "grad_norm": 0.012084590271115303, "tokens": 4431872, "tok_per_s": 4384.299847761102, "t": 1011.7}
30 +{"step": 560, "loss": 3.8682422637939453, "lr": 0.0002835821095192712, "grad_norm": 0.012979291379451752, "tokens": 4595712, "tok_per_s": 4417.367114475134, "t": 1041.23}
31 +{"step": 580, "loss": 3.8059096336364746, "lr": 0.00028215641099275517, "grad_norm": 0.014583375304937363, "tokens": 4759552, "tok_per_s": 4438.0271035006435, "t": 1073.3}
32 +{"step": 600, "loss": 3.8229777812957764, "lr": 0.00028067571878262454, "grad_norm": 0.017459910362958908, "tokens": 4923392, "tok_per_s": 4466.848177326197, "t": 1103.06}
33 +{"step": 620, "loss": 3.6982314586639404, "lr": 0.00027914072793167077, "grad_norm": 0.015852632001042366, "tokens": 5087232, "tok_per_s": 4492.692840303049, "t": 1133.19}
34 +{"step": 640, "loss": 3.801331043243408, "lr": 0.00027755215897068257, "grad_norm": 0.012572171166539192, "tokens": 5251072, "tok_per_s": 4504.295626018583, "t": 1166.65}
35 +{"step": 660, "loss": 3.7758383750915527, "lr": 0.0002759107575802257, "grad_norm": 0.014323781244456768, "tokens": 5414912, "tok_per_s": 4523.230886119979, "t": 1197.99}
36 +{"step": 680, "loss": 3.9480979442596436, "lr": 0.00027421729424061787, "grad_norm": 0.013456886634230614, "tokens": 5578752, "tok_per_s": 4509.814087492459, "t": 1237.88}
37 +{"step": 700, "loss": 3.779712438583374, "lr": 0.00027247256387026185, "grad_norm": 0.012655014172196388, "tokens": 5742592, "tok_per_s": 4532.351850816981, "t": 1267.88}
38 +{"step": 720, "loss": 3.822575569152832, "lr": 0.000270677385452508, "grad_norm": 0.014358540996909142, "tokens": 5906432, "tok_per_s": 4547.740722835746, "t": 1299.61}
39 +{"step": 740, "loss": 3.7792210578918457, "lr": 0.0002688326016512199, "grad_norm": 0.01548258401453495, "tokens": 6070272, "tok_per_s": 4553.915504804082, "t": 1333.83}
40 +{"step": 760, "loss": 3.806464672088623, "lr": 0.0002669390784152248, "grad_norm": 0.013577770441770554, "tokens": 6234112, "tok_per_s": 4543.631112666273, "t": 1372.91}
41 +{"step": 780, "loss": 3.8274717330932617, "lr": 0.00026499770457183376, "grad_norm": 0.013904247432947159, "tokens": 6397952, "tok_per_s": 4503.13781769418, "t": 1421.63}
42 +{"step": 800, "loss": 3.7019476890563965, "lr": 0.0002630093914096226, "grad_norm": 0.03281262144446373, "tokens": 6561792, "tok_per_s": 4502.10486864367, "t": 1458.35}
43 +{"step": 820, "loss": 3.932710647583008, "lr": 0.0002609750722506695, "grad_norm": 0.0163898766040802, "tokens": 6725632, "tok_per_s": 4502.591980769655, "t": 1494.58}
44 +{"step": 840, "loss": 3.8267409801483154, "lr": 0.00025889570201244967, "grad_norm": 0.015150759369134903, "tokens": 6889472, "tok_per_s": 4514.623144027639, "t": 1526.89}
45 +{"step": 860, "loss": 3.798384189605713, "lr": 0.00025677225675959357, "grad_norm": 0.016737058758735657, "tokens": 7053312, "tok_per_s": 4510.831425955238, "t": 1564.49}
46 +{"step": 880, "loss": 3.679598808288574, "lr": 0.0002546057332457181, "grad_norm": 0.0183124803006649, "tokens": 7217152, "tok_per_s": 4463.914533024111, "t": 1617.63}
47 +{"step": 900, "loss": 3.790926456451416, "lr": 0.00025239714844554667, "grad_norm": 0.014279105700552464, "tokens": 7380992, "tok_per_s": 4490.537276585615, "t": 1644.53}
48 +{"step": 920, "loss": 3.7000484466552734, "lr": 0.00025014753907753737, "grad_norm": 0.01636924408376217, "tokens": 7544832, "tok_per_s": 4499.325213367083, "t": 1677.73}
49 +{"step": 940, "loss": 3.832568645477295, "lr": 0.0002478579611172425, "grad_norm": 0.015563327819108963, "tokens": 7708672, "tok_per_s": 4515.3561128980455, "t": 1708.07}
50 +{"step": 960, "loss": 3.7648119926452637, "lr": 0.0002455294893016306, "grad_norm": 0.014933220110833645, "tokens": 7872512, "tok_per_s": 4532.2022562195925, "t": 1737.87}
51 +{"step": 980, "loss": 3.812920093536377, "lr": 0.00024316321662459957, "grad_norm": 0.01687745936214924, "tokens": 8036352, "tok_per_s": 4546.233485207428, "t": 1768.55}
52 +{"step": 999, "val_loss_b0": 3.9889174699783325, "val_loss_b1": 3.988364601135254, "val_loss_b2": 3.9879326105117796, "val_loss_b4": 3.987476348876953, "val_loss_b8": 3.9878592252731324, "t": 1836.47}
53 +{"step": 999, "checkpoint_sha256": "d9484ed8cfaee2f2838a7cf1e817d290aa9a8e8ba1bd415bb2d6ab7bf774f7ae", "t": 1836.88}
54 +{"step": 1000, "loss": 3.744023323059082, "lr": 0.0002407602538239216, "grad_norm": 0.01775466836988926, "tokens": 8200192, "tok_per_s": 4462.841607778254, "t": 1838.29}
55 +{"step": 1020, "loss": 3.6456146240234375, "lr": 0.0002383217288598584, "grad_norm": 0.015043514780700207, "tokens": 8364032, "tok_per_s": 4473.138341334909, "t": 1870.69}
56 +{"step": 1040, "loss": 3.8070361614227295, "lr": 0.00023584878638569206, "grad_norm": 0.017470480874180794, "tokens": 8527872, "tok_per_s": 4484.145318430601, "t": 1902.64}
57 +{"step": 1060, "loss": 3.9012932777404785, "lr": 0.00023334258721042025, "grad_norm": 0.017150765284895897, "tokens": 8691712, "tok_per_s": 4489.887152572901, "t": 1936.69}
58 +{"step": 1080, "loss": 3.713714599609375, "lr": 0.00023080430775386808, "grad_norm": 0.0152369299903512, "tokens": 8855552, "tok_per_s": 4483.223476622849, "t": 1976.12}
59 +{"step": 1100, "loss": 3.8825254440307617, "lr": 0.00022823513949447166, "grad_norm": 0.01471775397658348, "tokens": 9019392, "tok_per_s": 4461.2083640179635, "t": 2022.59}
60 +{"step": 1120, "loss": 3.8597702980041504, "lr": 0.00022563628840999367, "grad_norm": 0.020681019872426987, "tokens": 9183232, "tok_per_s": 4460.321539731326, "t": 2059.73}
61 +{"step": 1140, "loss": 3.8525748252868652, "lr": 0.00022300897441143247, "grad_norm": 0.015108371153473854, "tokens": 9347072, "tok_per_s": 4464.914655275153, "t": 2094.3}
62 +{"step": 1160, "loss": 3.6822214126586914, "lr": 0.00022035443077039114, "grad_norm": 0.021639063954353333, "tokens": 9510912, "tok_per_s": 4465.419732137452, "t": 2130.76}
63 +{"step": 1180, "loss": 3.7807776927948, "lr": 0.00021767390354017485, "grad_norm": 0.015806611627340317, "tokens": 9674752, "tok_per_s": 4457.327421713042, "t": 2171.38}
64 +{"step": 1200, "loss": 3.7414073944091797, "lr": 0.00021496865097088845, "grad_norm": 0.016911961138248444, "tokens": 9838592, "tok_per_s": 4427.218627377195, "t": 2223.15}
65 +{"step": 1220, "loss": 3.6769042015075684, "lr": 0.00021223994291880895, "grad_norm": 0.02072557620704174, "tokens": 10002432, "tok_per_s": 4443.716994735264, "t": 2251.77}
66 +{"step": 1240, "loss": 3.855714797973633, "lr": 0.00020948906025030994, "grad_norm": 0.015918290242552757, "tokens": 10166272, "tok_per_s": 4451.796183563373, "t": 2284.49}
67 +{"step": 1260, "loss": 3.812335968017578, "lr": 0.00020671729424061788, "grad_norm": 0.016744321212172508, "tokens": 10330112, "tok_per_s": 4464.24219340855, "t": 2314.82}
68 +{"step": 1280, "loss": 3.8199563026428223, "lr": 0.00020392594596768237, "grad_norm": 0.01638096384704113, "tokens": 10493952, "tok_per_s": 4477.386252961841, "t": 2344.62}
69 +{"step": 1300, "loss": 3.883105516433716, "lr": 0.00020111632570144484, "grad_norm": 0.015294700860977173, "tokens": 10657792, "tok_per_s": 4488.659379768258, "t": 2375.24}
70 +{"step": 1320, "loss": 3.7806808948516846, "lr": 0.00019828975228879288, "grad_norm": 0.01800672523677349, "tokens": 10821632, "tok_per_s": 4497.1409745956535, "t": 2407.19}
71 +{"step": 1340, "loss": 3.943575859069824, "lr": 0.00019544755253448823, "grad_norm": 0.016109060496091843, "tokens": 10985472, "tok_per_s": 4488.721913806638, "t": 2448.2}
72 +{"step": 1360, "loss": 3.810106039047241, "lr": 0.00019259106057835926, "grad_norm": 0.016049453988671303, "tokens": 11149312, "tok_per_s": 4496.089783517685, "t": 2480.63}
73 +{"step": 1380, "loss": 3.831757068634033, "lr": 0.00018972161726905055, "grad_norm": 0.01839154213666916, "tokens": 11313152, "tok_per_s": 4507.67956947905, "t": 2510.6}
74 +{"step": 1400, "loss": 3.8676252365112305, "lr": 0.00018684056953462326, "grad_norm": 0.014575948938727379, "tokens": 11476992, "tok_per_s": 4514.820483486525, "t": 2542.92}
75 +{"step": 1420, "loss": 3.9963245391845703, "lr": 0.00018394926975030145, "grad_norm": 0.018497414886951447, "tokens": 11640832, "tok_per_s": 4508.077077213495, "t": 2583.07}
76 +{"step": 1440, "loss": 3.851541757583618, "lr": 0.00018104907510366235, "grad_norm": 0.017899619415402412, "tokens": 11804672, "tok_per_s": 4518.3079856051445, "t": 2613.48}
77 +{"step": 1460, "loss": 3.8959813117980957, "lr": 0.00017814134695756664, "grad_norm": 0.017883889377117157, "tokens": 11968512, "tok_per_s": 4490.001312349696, "t": 2666.45}
78 +{"step": 1480, "loss": 3.6291708946228027, "lr": 0.00017522745021112944, "grad_norm": 0.01759996823966503, "tokens": 12132352, "tok_per_s": 4495.778668172852, "t": 2699.46}
79 +{"step": 1499, "val_loss_b0": 3.9889174699783325, "val_loss_b1": 3.9881173849105833, "val_loss_b2": 3.987528657913208, "val_loss_b4": 3.9869588375091554, "val_loss_b8": 3.9877641439437865, "t": 2762.58}
80 +{"step": 1500, "loss": 3.90535569190979, "lr": 0.00017230875265903138, "grad_norm": 0.02068295143544674, "tokens": 12296192, "tok_per_s": 4450.055997063979, "t": 2764.01}
81 +{"step": 1520, "loss": 3.7332606315612793, "lr": 0.00016938662434947037, "grad_norm": 0.020495988428592682, "tokens": 12460032, "tok_per_s": 4447.8016000180505, "t": 2802.25}
82 +{"step": 1540, "loss": 3.713611602783203, "lr": 0.0001664624369410554, "grad_norm": 0.023707536980509758, "tokens": 12623872, "tok_per_s": 4421.60151321603, "t": 2855.9}
83 +{"step": 1560, "loss": 3.7561423778533936, "lr": 0.0001635375630589446, "grad_norm": 0.024348311126232147, "tokens": 12787712, "tok_per_s": 4437.488887229454, "t": 2882.6}
84 +{"step": 1580, "loss": 3.717986583709717, "lr": 0.00016061337565052966, "grad_norm": 0.020553236827254295, "tokens": 12951552, "tok_per_s": 4443.512346135477, "t": 2915.56}
85 +{"step": 1600, "loss": 4.001625061035156, "lr": 0.00015769124734096862, "grad_norm": 0.023473521694540977, "tokens": 13115392, "tok_per_s": 4453.408975739985, "t": 2945.88}
86 +{"step": 1620, "loss": 3.767557144165039, "lr": 0.0001547725497888706, "grad_norm": 0.018059588968753815, "tokens": 13279232, "tok_per_s": 4463.92539012233, "t": 2975.64}
87 +{"step": 1640, "loss": 3.778282880783081, "lr": 0.0001518586530424334, "grad_norm": 0.01947772316634655, "tokens": 13443072, "tok_per_s": 4472.883608072359, "t": 3006.31}
88 +{"step": 1660, "loss": 3.89432430267334, "lr": 0.00014895092489633762, "grad_norm": 0.021466944366693497, "tokens": 13606912, "tok_per_s": 4479.628182152929, "t": 3038.36}
89 +{"step": 1680, "loss": 3.732147216796875, "lr": 0.0001460507302496985, "grad_norm": 0.019685208797454834, "tokens": 13770752, "tok_per_s": 4473.219439602959, "t": 3079.34}
90 +{"step": 1700, "loss": 3.5457446575164795, "lr": 0.00014315943046537674, "grad_norm": 0.021686526015400887, "tokens": 13934592, "tok_per_s": 4479.236540919507, "t": 3111.78}
91 +{"step": 1720, "loss": 3.7694344520568848, "lr": 0.00014027838273094942, "grad_norm": 0.016095783561468124, "tokens": 14098432, "tok_per_s": 4488.6670721878445, "t": 3141.75}
92 +{"step": 1740, "loss": 3.877885580062866, "lr": 0.00013740893942164073, "grad_norm": 0.02273871935904026, "tokens": 14262272, "tok_per_s": 4494.629376677128, "t": 3174.03}
93 +{"step": 1760, "loss": 3.595947265625, "lr": 0.00013455244746551177, "grad_norm": 0.02010590210556984, "tokens": 14426112, "tok_per_s": 4496.748110435041, "t": 3208.97}
94 +{"step": 1780, "loss": 3.834798574447632, "lr": 0.00013171024771120715, "grad_norm": 0.018496211618185043, "tokens": 14589952, "tok_per_s": 4497.2367868885385, "t": 3245.06}
95 +{"step": 1800, "loss": 3.7569198608398438, "lr": 0.0001288836742985552, "grad_norm": 0.017011066898703575, "tokens": 14753792, "tok_per_s": 4480.462218534476, "t": 3293.77}
96 +{"step": 1820, "loss": 3.9124388694763184, "lr": 0.00012607405403231763, "grad_norm": 0.01866631768643856, "tokens": 14917632, "tok_per_s": 4479.462464200471, "t": 3331.08}
97 +{"step": 1840, "loss": 3.813666582107544, "lr": 0.00012328270575938212, "grad_norm": 0.021668385714292526, "tokens": 15081472, "tok_per_s": 4485.040926548531, "t": 3363.47}
98 +{"step": 1860, "loss": 3.759260654449463, "lr": 0.00012051093974969008, "grad_norm": 0.02275138534605503, "tokens": 15245312, "tok_per_s": 4485.084879003477, "t": 3399.97}
99 +{"step": 1880, "loss": 3.715264320373535, "lr": 0.00011776005708119105, "grad_norm": 0.019421957433223724, "tokens": 15409152, "tok_per_s": 4490.093760354635, "t": 3432.66}
100 +{"step": 1900, "loss": 3.7311267852783203, "lr": 0.00011503134902911152, "grad_norm": 0.02526695653796196, "tokens": 15572992, "tok_per_s": 4479.445462219193, "t": 3477.4}
101 +{"step": 1920, "loss": 3.9095945358276367, "lr": 0.00011232609645982515, "grad_norm": 0.024148497730493546, "tokens": 15736832, "tok_per_s": 4471.055353422084, "t": 3520.57}
102 +{"step": 1940, "loss": 3.6274752616882324, "lr": 0.00010964556922960883, "grad_norm": 0.020813388749957085, "tokens": 15900672, "tok_per_s": 4482.81961524903, "t": 3547.88}
103 +{"step": 1960, "loss": 3.9998321533203125, "lr": 0.00010699102558856754, "grad_norm": 0.02876809798181057, "tokens": 16064512, "tok_per_s": 4485.545783655364, "t": 3582.25}
104 +{"step": 1980, "loss": 3.557504653930664, "lr": 0.00010436371159000636, "grad_norm": 0.019393693655729294, "tokens": 16228352, "tok_per_s": 4493.9490049562355, "t": 3612.01}
105 +{"step": 1999, "val_loss_b0": 3.9889174699783325, "val_loss_b1": 3.9878397941589356, "val_loss_b2": 3.9870748281478883, "val_loss_b4": 3.986360287666321, "val_loss_b8": 3.98707230091095, "t": 3666.57}
106 +{"step": 1999, "checkpoint_sha256": "61126d1f41c3d4e1c92ee1136a36663df20fa31da9ede0d2bd2fff0de7f35f58", "t": 3667.02}
107 +{"step": 2000, "loss": 3.812525749206543, "lr": 0.00010176486050552833, "grad_norm": 0.0217677503824234, "tokens": 16392192, "tok_per_s": 4467.965500930371, "t": 3669.68}
108 +{"step": 2020, "loss": 3.7536354064941406, "lr": 9.919569224613192e-05, "grad_norm": 0.024728665128350258, "tokens": 16556032, "tok_per_s": 4476.2916397518375, "t": 3699.46}
109 +{"step": 2040, "loss": 3.8425941467285156, "lr": 9.66574127895797e-05, "grad_norm": 0.020093586295843124, "tokens": 16719872, "tok_per_s": 4470.964526245769, "t": 3740.51}
110 +{"step": 2060, "loss": 3.7483816146850586, "lr": 9.415121361430792e-05, "grad_norm": 0.021629303693771362, "tokens": 16883712, "tok_per_s": 4475.814541392472, "t": 3773.06}
111 +{"step": 2080, "loss": 3.8599843978881836, "lr": 9.167827114014155e-05, "grad_norm": 0.020756013691425323, "tokens": 17047552, "tok_per_s": 4483.60948095026, "t": 3803.05}
112 +{"step": 2100, "loss": 3.764911651611328, "lr": 8.92397461760784e-05, "grad_norm": 0.02337750419974327, "tokens": 17211392, "tok_per_s": 4488.301240996396, "t": 3835.58}
113 +{"step": 2120, "loss": 4.088828086853027, "lr": 8.683678337540044e-05, "grad_norm": 0.023548651486635208, "tokens": 17375232, "tok_per_s": 4480.20498913092, "t": 3879.08}
114 +{"step": 2140, "loss": 3.833620548248291, "lr": 8.447051069836941e-05, "grad_norm": 0.0264931321144104, "tokens": 17539072, "tok_per_s": 4487.815032221786, "t": 3909.01}
115 +{"step": 2160, "loss": 3.9101006984710693, "lr": 8.214203888275743e-05, "grad_norm": 0.02647393010556698, "tokens": 17702912, "tok_per_s": 4471.573481150476, "t": 3959.84}
116 +{"step": 2180, "loss": 3.7312822341918945, "lr": 7.985246092246267e-05, "grad_norm": 0.02162903919816017, "tokens": 17866752, "tok_per_s": 4473.032397135901, "t": 3995.18}
117 +{"step": 2200, "loss": 3.8372957706451416, "lr": 7.760285155445326e-05, "grad_norm": 0.02322702668607235, "tokens": 18030592, "tok_per_s": 4476.022609599988, "t": 4029.12}
118 +{"step": 2220, "loss": 4.003998279571533, "lr": 7.53942667542819e-05, "grad_norm": 0.021999096497893333, "tokens": 18194432, "tok_per_s": 4475.795164253909, "t": 4065.93}
119 +{"step": 2240, "loss": 3.845353841781616, "lr": 7.322774324040643e-05, "grad_norm": 0.02525237947702408, "tokens": 18358272, "tok_per_s": 4450.846319413955, "t": 4125.52}
120 +{"step": 2260, "loss": 3.7047626972198486, "lr": 7.11042979875503e-05, "grad_norm": 0.022539757192134857, "tokens": 18522112, "tok_per_s": 4461.855021141051, "t": 4152.07}
121 +{"step": 2280, "loss": 3.5579464435577393, "lr": 6.902492774933048e-05, "grad_norm": 0.02275800332427025, "tokens": 18685952, "tok_per_s": 4473.976878177679, "t": 4177.44}
122 +{"step": 2300, "loss": 3.917072296142578, "lr": 6.699060859037737e-05, "grad_norm": 0.027450494468212128, "tokens": 18849792, "tok_per_s": 4475.6279215284585, "t": 4212.51}
123 +{"step": 2320, "loss": 3.77860164642334, "lr": 6.500229542816624e-05, "grad_norm": 0.02635987289249897, "tokens": 19013632, "tok_per_s": 4483.243541117967, "t": 4241.9}
124 +{"step": 2340, "loss": 3.8698670864105225, "lr": 6.306092158477523e-05, "grad_norm": 0.02103089541196823, "tokens": 19177472, "tok_per_s": 4490.565259161523, "t": 4271.47}
125 +{"step": 2360, "loss": 3.538996696472168, "lr": 6.116739834878009e-05, "grad_norm": 0.027196239680051804, "tokens": 19341312, "tok_per_s": 4495.306164625844, "t": 4303.41}
126 +{"step": 2380, "loss": 3.8050360679626465, "lr": 5.9322614547491995e-05, "grad_norm": 0.02367325685918331, "tokens": 19505152, "tok_per_s": 4500.932601813845, "t": 4334.43}
127 +{"step": 2400, "loss": 3.9583663940429688, "lr": 5.752743612973809e-05, "grad_norm": 0.024019066244363785, "tokens": 19668992, "tok_per_s": 4495.994951515232, "t": 4375.63}
128 +{"step": 2420, "loss": 3.797323226928711, "lr": 5.578270575938211e-05, "grad_norm": 0.022699503228068352, "tokens": 19832832, "tok_per_s": 4499.898642157829, "t": 4408.25}
129 +{"step": 2440, "loss": 3.8363139629364014, "lr": 5.408924241977427e-05, "grad_norm": 0.026374451816082, "tokens": 19996672, "tok_per_s": 4506.4186044389835, "t": 4438.23}
130 +{"step": 2460, "loss": 3.8300018310546875, "lr": 5.244784102931745e-05, "grad_norm": 0.024398434907197952, "tokens": 20160512, "tok_per_s": 4510.375946585783, "t": 4470.66}
131 +{"step": 2480, "loss": 3.7476959228515625, "lr": 5.085927206832921e-05, "grad_norm": 0.04752561077475548, "tokens": 20324352, "tok_per_s": 4502.40608964813, "t": 4514.96}
132 +{"step": 2499, "val_loss_b0": 3.9889174699783325, "val_loss_b1": 3.9876109838485716, "val_loss_b2": 3.9867547750473022, "val_loss_b4": 3.9860803127288817, "val_loss_b8": 3.9870404481887816, "t": 4585.73}
133 +{"step": 2500, "loss": 3.910581588745117, "lr": 4.9324281217375474e-05, "grad_norm": 0.029107971116900444, "tokens": 20488192, "tok_per_s": 4466.885087320102, "t": 4587.54}
134 +{"step": 2520, "loss": 3.935685157775879, "lr": 4.78435890072448e-05, "grad_norm": 0.02710035629570484, "tokens": 20652032, "tok_per_s": 4466.65847609691, "t": 4624.45}
135 +{"step": 2540, "loss": 3.789839267730713, "lr": 4.641789048072876e-05, "grad_norm": 0.021377671509981155, "tokens": 20815872, "tok_per_s": 4470.856416233407, "t": 4656.76}
136 +{"step": 2560, "loss": 3.72589111328125, "lr": 4.504785486636568e-05, "grad_norm": 0.026580851525068283, "tokens": 20979712, "tok_per_s": 4471.037158516677, "t": 4693.21}
137 +{"step": 2580, "loss": 3.7323179244995117, "lr": 4.373412526430252e-05, "grad_norm": 0.023492466658353806, "tokens": 21143552, "tok_per_s": 4471.1057294862485, "t": 4729.78}
138 +{"step": 2600, "loss": 3.9327902793884277, "lr": 4.247731834442082e-05, "grad_norm": 0.02387898974120617, "tokens": 21307392, "tok_per_s": 4452.449317383295, "t": 4786.4}
139 +{"step": 2620, "loss": 3.8893706798553467, "lr": 4.1278024056869486e-05, "grad_norm": 0.022287946194410324, "tokens": 21471232, "tok_per_s": 4461.553316090243, "t": 4813.35}
140 +{"step": 2640, "loss": 3.728363037109375, "lr": 4.013680535514001e-05, "grad_norm": 0.02374396100640297, "tokens": 21635072, "tok_per_s": 4472.0444321199775, "t": 4838.7}
141 +{"step": 2660, "loss": 3.68619441986084, "lr": 3.905419793181364e-05, "grad_norm": 0.0230452548712492, "tokens": 21798912, "tok_per_s": 4473.988572940419, "t": 4873.22}
142 +{"step": 2680, "loss": 3.5850837230682373, "lr": 3.803070996710526e-05, "grad_norm": 0.024549061432480812, "tokens": 21962752, "tok_per_s": 4480.588428195816, "t": 4902.61}
143 +{"step": 2700, "loss": 3.84997820854187, "lr": 3.7066821890321684e-05, "grad_norm": 0.024593722075223923, "tokens": 22126592, "tok_per_s": 4486.424080994401, "t": 4932.75}
144 +{"step": 2720, "loss": 3.8746180534362793, "lr": 3.6162986154346006e-05, "grad_norm": 0.026537152007222176, "tokens": 22290432, "tok_per_s": 4489.576178719199, "t": 4965.78}
145 +{"step": 2740, "loss": 3.584238290786743, "lr": 3.531962702325468e-05, "grad_norm": 0.0271969772875309, "tokens": 22454272, "tok_per_s": 4495.755865530468, "t": 4995.4}
146 +{"step": 2760, "loss": 3.762524127960205, "lr": 3.4537140373166085e-05, "grad_norm": 0.023005293682217598, "tokens": 22618112, "tok_per_s": 4501.789992555519, "t": 5025.1}
147 +{"step": 2780, "loss": 3.71954345703125, "lr": 3.3815893506414745e-05, "grad_norm": 0.023993074893951416, "tokens": 22781952, "tok_per_s": 4507.663435271643, "t": 5054.9}
148 +{"step": 2800, "loss": 3.8339943885803223, "lr": 3.3156224979138305e-05, "grad_norm": 0.024403758347034454, "tokens": 22945792, "tok_per_s": 4514.798911326871, "t": 5083.2}
149 +{"step": 2820, "loss": 3.7308526039123535, "lr": 3.255844444235771e-05, "grad_norm": 0.022225676104426384, "tokens": 23109632, "tok_per_s": 4521.21005386317, "t": 5112.24}
150 +{"step": 2840, "loss": 3.7879652976989746, "lr": 3.202283249662597e-05, "grad_norm": 0.023512132465839386, "tokens": 23273472, "tok_per_s": 4527.090194869152, "t": 5141.79}
151 +{"step": 2860, "loss": 3.8382761478424072, "lr": 3.154964056031306e-05, "grad_norm": 0.024715004488825798, "tokens": 23437312, "tok_per_s": 4533.258005850404, "t": 5170.93}
152 +{"step": 2880, "loss": 3.820117950439453, "lr": 3.113909075158913e-05, "grad_norm": 0.02976880595088005, "tokens": 23601152, "tok_per_s": 4540.142502210738, "t": 5199.18}
153 +{"step": 2900, "loss": 3.740880250930786, "lr": 3.0791375784161455e-05, "grad_norm": 0.02943800948560238, "tokens": 23764992, "tok_per_s": 4545.708717545187, "t": 5228.86}
154 +{"step": 2920, "loss": 3.7544302940368652, "lr": 3.0506658876813734e-05, "grad_norm": 0.026308447122573853, "tokens": 23928832, "tok_per_s": 4551.5054035111825, "t": 5258.2}
155 +{"step": 2940, "loss": 3.797105312347412, "lr": 3.0285073676790606e-05, "grad_norm": 0.024099133908748627, "tokens": 24092672, "tok_per_s": 4557.647528247589, "t": 5287.06}
156 +{"step": 2960, "loss": 3.6772618293762207, "lr": 3.0126724197063143e-05, "grad_norm": 0.024978075176477432, "tokens": 24256512, "tok_per_s": 4563.641464905187, "t": 5316.02}
157 +{"step": 2980, "loss": 3.8443057537078857, "lr": 3.0031684767504643e-05, "grad_norm": 0.02494724839925766, "tokens": 24420352, "tok_per_s": 4568.869186978655, "t": 5345.8}
158 +{"step": 2999, "loss": 3.670595645904541, "lr": 3.0000079215009746e-05, "grad_norm": 0.025034256279468536, "tokens": 24576000, "tok_per_s": 4574.156629459247, "t": 5373.65}
159 +{"step": 2999, "val_loss_b0": 3.9889174699783325, "val_loss_b1": 3.9875057220458983, "val_loss_b2": 3.9866103887557984, "val_loss_b4": 3.985898995399475, "val_loss_b8": 3.986349606513977, "t": 5397.13}
160 +{"step": 2999, "checkpoint_sha256": "1203ea2e786b258268ea56204e9676a6b900d41628d9fce32af5a01ab0181ea3", "t": 5397.54}
added experiments/runs/labels_103m_seed01_20261030034314/config.yaml +55 −0
@@ -0,0 +1,55 @@
1 +experiment:
2 + name: labels_103m
3 + seed: 1
4 + mode: prisme
5 + model: from_checkpoint
6 + checkpoint: experiments/runs/editor_pilot_103m_lr3e4_seed01_20261030021200/checkpoint
7 + use_policy: false
8 + data:
9 + kind: tokens
10 + collect:
11 + batch_size: 8
12 + seq_len: 512
13 + max_prefix: 3
14 + audit_every: 4
15 + partitions:
16 + train:
17 + bin: data/processed/fineweb_edu_300m/train.bin
18 + n_batches: 120
19 + stream_seed: 777
20 + calib:
21 + bin: data/processed/fineweb_edu_300m/val.bin
22 + n_batches: 30
23 + stream_seed: 778
24 +model:
25 + name: prisme_103m
26 + vocab_size: 32768
27 + d_model: 768
28 + n_layers: 12
29 + n_heads: 12
30 + n_kv_heads: 3
31 + ffn_width: 2048
32 + max_seq_len: 4096
33 + rope_theta: 10000.0
34 + norm_eps: 1.0e-05
35 + tie_embeddings: true
36 + init_std: 0.02
37 + use_workspace: true
38 + w: 256
39 + ffn_w: 768
40 + n_slots: 16
41 + n_editor_blocks: 2
42 + n_editor_heads: 4
43 + r_max: 8
44 + eta_max: 0.25
45 + clip_c: 1.0
46 + clip_eps: 1.0e-06
47 + readout_zero_init: false
48 + readout_init_std: 0.2
49 + readout_scale: 8.851566314697266
50 + controller_hidden: 0
51 + ctrl_input: h
52 + ctrl_use_entropy: true
53 + lambda_cost: 0.0
54 + kappa_risk: 0.0
55 + dense_writes: false
added experiments/runs/labels_103m_seed01_20261030034314/manifest.json +40 −0
@@ -0,0 +1,40 @@
1 +{
2 + "run_id": "labels_103m_seed01_20261030034314",
3 + "name": "labels_103m",
4 + "seed": 1,
5 + "code_commit": "unknown",
6 + "config_sha256": "810649993595f24664a37f2c3db5b3a114b40b2dbbda7765502e421c383bcf6c",
7 + "started_at": "2026-10-30T03:43:14-0400",
8 + "host": "MacStudnpierre2",
9 + "python": "3.12.13",
10 + "torch": "2.15.0",
11 + "command": "/Users/simon-pierreboucher/wp31/prisme-slm/training/collect_interventions.py --config configs/experiments/labels_103m.yaml --device mps",
12 + "state": "completed",
13 + "wall_seconds": 94.09,
14 + "device": "mps",
15 + "checkpoint_parent": "experiments/runs/editor_pilot_103m_lr3e4_seed01_20261030021200/checkpoint",
16 + "checkpoint_sha256": "1203ea2e786b258268ea56204e9676a6b900d41628d9fce32af5a01ab0181ea3",
17 + "finished_at": "2026-10-30T03:44:48-0400",
18 + "partitions": {
19 + "train": {
20 + "file": "experiments/runs/labels_103m_seed01_20261030034314/labels_train.pt",
21 + "n_states": 491520,
22 + "n_labels": 1966080,
23 + "mean_gain": 0.0008011759491637349,
24 + "frac_positive": 0.531177282333374,
25 + "frac_harm": 0.4687851071357727,
26 + "seconds": 74.4,
27 + "n_audit_batches": 30
28 + },
29 + "calib": {
30 + "file": "experiments/runs/labels_103m_seed01_20261030034314/labels_calib.pt",
31 + "n_states": 122880,
32 + "n_labels": 491520,
33 + "mean_gain": 0.0007764770998619497,
34 + "frac_positive": 0.5318562984466553,
35 + "frac_harm": 0.4680948853492737,
36 + "seconds": 19.7,
37 + "n_audit_batches": 8
38 + }
39 + }
40 +}
\ No newline at end of file
added experiments/runs/labels_103m_seed01_20261030034314/metrics.jsonl +0 −0
modified paper/appendix/failures.tex +6 −0
@@ -20,4 +20,10 @@
20 20 \textbf{date}: 2026-10-30; \textbf{what failed}: Killed to free nodes for the 5-seed matrix: the degraded joint-finetune reference (M4M64a) and the v1 dense-writes run on the slow m4mn node (superseded by the v2 matrix \texttt{p4v2\_dense}).; \textbf{evidence}: manifests remain in \texttt{experiments/runs/} on the nodes (state: running $\rightarrow$ killed)
21 21 \item
22 22 \textbf{date}: 2026-10-30; \textbf{what failed}: Ranking-loss controller (D12: pairwise + listwise on top of Huber/BCE/NLL, editor-unseen labels): calibration sign accuracy fell to 45 \%, captured fraction --8 \%; on dev-iid the locked policy ($\lambda$=0.3, $\kappa$=0.5) edits 0.07 tokens and matches budget 0 (0.4333 vs 0.4334); $\lambda$=0 is worse (+1.3 \%).; \textbf{evidence}: \texttt{experiments/runs/controller\_v1rank\_seed01\_*}, \texttt{results/raw/routing\_v1rank.json}; \textbf{resolution}: Within-state ranking is not learnable from these labels at this scale; H3 null stands.
23 +\item
24 + \textbf{date}: 2026-10-30; \textbf{what failed}: Stage A ran 6,000 steps instead of the intended 12,000 (stale config on the node, see rsync exclusion bug above); the enlarged baseline ran the 12,000-step config until step \textasciitilde6,540 and was killed.; \textbf{evidence}: \texttt{experiments/runs/pretrain103m\_seed01\_20261029232706/manifest.json} (resolved\_train.steps = 6000), M3U96b log; \textbf{resolution}: Backbone budget fixed at 98.3M tokens (D13); baseline relaunched with the same 6,000-step recipe.
25 +\item
26 + \textbf{date}: 2026-10-30; \textbf{what failed}: 103M editor pilot at lr 1e-3 collapsed to inert edits within 500 steps (val loss identical at every budget, 3.9889; trainable gradient norm 0.00 from step 160) --- the same failure as the tiny w=128 lr 3e-3 run.; \textbf{evidence}: M3U96a \texttt{experiments/logs/editor\_pilot\_103m\_seed1.log}, run \texttt{editor\_pilot\_103m\_seed01\_*} (killed at step \textasciitilde650); \textbf{resolution}: relaunched with lr 3e-4 (D14).
27 +\item
28 + \textbf{date}: 2026-10-30; \textbf{what failed}: 103M dense-slot probe collapsed to inert edits at lr 1e-3 (step 280, gradient norm 0.00) and again at lr 3e-4 (val loss identical at every budget, 3.9394, at step 500). Killed; no 103M dense result.; \textbf{evidence}: M2U64 \texttt{experiments/logs/dense\_probe\_103m*\_seed1.log}; \textbf{resolution}: The dense ablation at 103M is reported as not obtained (collapse), with the tiny-scale 5-seed result as the only dense evidence.
23 29 \end{itemize}
modified paper/main.log +47 −25
@@ -1,4 +1,4 @@
1 −This is pdfTeX, Version 3.141592653-2.6-1.40.29 (TeX Live 2026) (preloaded format=pdflatex 2026.3.22) 30 OCT 2026 02:28
1 +This is pdfTeX, Version 3.141592653-2.6-1.40.29 (TeX Live 2026) (preloaded format=pdflatex 2026.3.22) 30 OCT 2026 04:04
2 2 entering extended mode
3 3 restricted \write18 enabled.
4 4 %&-line parsing enabled.
@@ -1340,9 +1340,10 @@ Overfull \hbox (109.74734pt too wide) in paragraph at lines 8--15
1340 1340
1341 1341 ) [19 <../results/figures/frontier_v2.pdf>] (./tables/stats.tex)
1342 1342 (./tables/latency.tex) [20 <../results/figures/labels_analysis.pdf>]
1343 −(./sections/results_pilot.tex)) (./sections/mechanistic.tex [21])
1344 −(./sections/limitations.tex [22]) (./sections/conclusion.tex)
1345 −(./sections/reproducibility.tex)
1343 +(./sections/results_pilot.tex (./tables/pilot_ppl.tex)
1344 +(./tables/pilot_routing.tex) [21] (./tables/pilot_latency.tex)))
1345 +(./sections/mechanistic.tex [22]) (./sections/limitations.tex [23])
1346 +(./sections/conclusion.tex) (./sections/reproducibility.tex)
1346 1347 Overfull \hbox (51.18217pt too wide) in paragraph at lines 2--101
1347 1348 \T1/ptm/m/n/12 (-20) num-ber in the manuscript is pro-duced by \T1/cmtt/m/n/12
1348 1349 scripts/make_tables.py \T1/ptm/m/n/12 (-20) and \T1/cmtt/m/n/12 scripts/reprodu
@@ -1356,18 +1357,18 @@ cript_claims.py \T1/ptm/m/n/12 (-20) checks the chain. \T1/cmtt/m/n/12 REPRODUC
1356 1357 E.md
1357 1358 []
1358 1359
1359 −[23] [24] (./main.bbl [25] [26]
1360 +[24] [25] (./main.bbl [26] [27]
1360 1361 Underfull \hbox (badness 1297) in paragraph at lines 208--211
1361 1362 []\T1/ptm/b/n/12 (+20) You, Yichen, Tianyu Fu, Aosong Feng, Xing-tai Lv, Xue-fe
1362 1363 i Ning, Ning Ding, and
1363 1364 []
1364 1365
1365 −[27]) (./appendix/appendix.tex (./appendix/notation.tex
1366 +[28]) (./appendix/appendix.tex (./appendix/notation.tex
1366 1367 Overfull \hbox (12.19864pt too wide) in paragraph at lines 2--16
1367 1368 []
1368 1369 []
1369 1370
1370 −) (./appendix/proofs.tex [28]) (./appendix/params.tex [29]
1371 +) (./appendix/proofs.tex [29]) (./appendix/params.tex [30]
1371 1372 Overfull \hbox (92.32437pt too wide) detected at line 12
1372 1373 \OML/ztmcm/m/it/12 N[] \OT1/ztmcm/m/n/12 = \OML/ztmcm/m/it/12 d \OT1/ztmcm/m/n/
1373 1374 12 + 3\OML/ztmcm/m/it/12 dw \OT1/ztmcm/m/n/12 + \OML/ztmcm/m/it/12 Mw \OT1/ztmc
@@ -1476,7 +1477,7 @@ LaTeX Warning: `h' float specifier changed to `ht'.
1476 1477 ) (./appendix/prereg.tex
1477 1478 LaTeX Font Info: Font shape `T1/cmtt/bx/n' in size <12> not available
1478 1479 (Font) Font shape `T1/cmtt/m/n' tried instead on input line 1.
1479 − [30]
1480 + [31]
1480 1481 LaTeX Font Info: Trying to load font information for TS1+ptm on input line 8
1481 1482 .
1482 1483
@@ -1489,7 +1490,7 @@ Overfull \hbox (80.09856pt too wide) in paragraph at lines 10--12
1489 1490 T1/cmtt/m/n/12 data/generators/synthetic.py\T1/ptm/m/n/12 (-20) ,
1490 1491 []
1491 1492
1492 −[31]) (./appendix/runs.tex
1493 +[32]) (./appendix/runs.tex
1493 1494 Overfull \hbox (121.91187pt too wide) in paragraph at lines 1--14
1494 1495 \T1/cmtt/m/n/12 training.pretrain\T1/ptm/m/n/12 (-20) , \T1/cmtt/m/n/12 trainin
1495 1496 g.train_editor\T1/ptm/m/n/12 (-20) , \T1/cmtt/m/n/12 training.collect_intervent
@@ -1504,14 +1505,14 @@ tion.latency \T1/ptm/m/n/12 (-20) or \T1/cmtt/m/n/12 evaluation.run\T1/ptm/m/n/
1504 1505 12 (-20) ; launch scripts un-der \T1/cmtt/m/n/12 scripts/
1505 1506 []
1506 1507
1507 −[32] (./appendix/runs_index.tex [33]
1508 +[33] (./appendix/runs_index.tex [34]
1508 1509 Overfull \hbox (25.12868pt too wide) in paragraph at lines 52--54
1509 1510 []\T1/ptm/b/n/10 (-20) run_id\T1/ptm/m/n/10 (-20) : p4_tiny_backbone_v2_seed01_
1510 1511 20261029233624; \T1/ptm/b/n/10 (-20) state\T1/ptm/m/n/10 (-20) : stopped_overfi
1511 1512 tting_step9300_checkpoint_step5000_used;
1512 1513 []
1513 1514
1514 −[34])) (./appendix/results.tex (./tables/em_families.tex))
1515 +[35])) (./appendix/results.tex (./tables/em_families.tex))
1515 1516 Overfull \hbox (168.4564pt too wide) in paragraph at lines 2--16
1516 1517 \T1/ptm/m/n/12 (-20) records (\T1/cmtt/m/n/12 experiments/runs/*/em_*.json\T1/p
1517 1518 tm/m/n/12 (-20) , \T1/cmtt/m/n/12 results/raw/items_*.json\T1/ptm/m/n/12 (-20)
@@ -1549,7 +1550,7 @@ Overfull \hbox (47.44559pt too wide) in paragraph at lines 12--14
1549 1550 ;
1550 1551 []
1551 1552
1552 −[35]
1553 +[36]
1553 1554 Package microtype Info: Loading generic protrusion settings for font family
1554 1555 (microtype) `cmtt' (encoding: TS1).
1555 1556 (microtype) For optimal results, create family-specific settings.
@@ -1569,14 +1570,35 @@ run \T1/cmtt/m/n/12 p4_tiny_backbone_v2_seed01_* \T1/ptm/m/n/12 (-20) (state:
1569 1570 []
1570 1571
1571 1572
1572 −Overfull \hbox (12.01894pt too wide) in paragraph at lines 22--23
1573 +Overfull \hbox (12.01894pt too wide) in paragraph at lines 22--24
1573 1574 \T1/ptm/m/n/12 (-20) 0.4334); $\OML/ztmcm/m/it/12 ^^U$\T1/ptm/m/n/12 (-20) =0 i
1574 1575 s worse (+1.3 %).; \T1/ptm/b/n/12 (-20) ev-i-dence\T1/ptm/m/n/12 (-20) : \T1/cm
1575 1576 tt/m/n/12 experiments/runs/controller_v1rank_seed01_*\T1/ptm/m/n/12 (-20) ,
1576 1577 []
1577 1578
1578 −)) [36{/usr/local/texlive/2026/texmf-dist/fonts/enc/dvips/cm-super/cm-super-ts1
1579 −.enc}] [37] [38] [39] [40] (./main.aux)
1579 +
1580 +Overfull \hbox (146.55865pt too wide) in paragraph at lines 24--26
1581 +\T1/ptm/m/n/12 (-20) un-til step ~6,540 and was killed.; \T1/ptm/b/n/12 (-20) e
1582 +v-i-dence\T1/ptm/m/n/12 (-20) : \T1/cmtt/m/n/12 experiments/runs/pretrain103m_s
1583 +eed01_20261029232706/manifest.json
1584 + []
1585 +
1586 +
1587 +Overfull \hbox (107.55685pt too wide) in paragraph at lines 26--28
1588 +\T1/ptm/m/n/12 (-20) same fail-ure as the tiny w=128 lr 3e-3 run.; \T1/ptm/b/n/
1589 +12 (-20) ev-i-dence\T1/ptm/m/n/12 (-20) : M3U96a \T1/cmtt/m/n/12 experiments/lo
1590 +gs/editor_pilot_103m_seed1.log\T1/ptm/m/n/12 (-20) ,
1591 + []
1592 +
1593 +[37{/usr/local/texlive/2026/texmf-dist/fonts/enc/dvips/cm-super/cm-super-ts1.en
1594 +c}]
1595 +Overfull \hbox (46.17226pt too wide) in paragraph at lines 28--29
1596 +\T1/ptm/m/n/12 (-20) Killed; no 103M dense re-sult.; \T1/ptm/b/n/12 (-20) ev-i-
1597 +dence\T1/ptm/m/n/12 (-20) : M2U64 \T1/cmtt/m/n/12 experiments/logs/dense_probe_
1598 +103m*_seed1.log\T1/ptm/m/n/12 (-20) ;
1599 + []
1600 +
1601 +)) [38] [39] [40] [41] [42] [43] [44] (./main.aux)
1580 1602 ***********
1581 1603 LaTeX2e <2025-11-01>
1582 1604 L3 programming layer <2026-01-19>
@@ -1586,14 +1608,14 @@ L3 programming layer <2026-01-19>
1586 1608 LaTeX Warning: There were undefined references.
1587 1609
1588 1610 Package rerunfilecheck Info: File `main.out' has not changed.
1589 −(rerunfilecheck) Checksum: 445BE7B843FC16B6CF1F9C8E67681D49;9020.
1611 +(rerunfilecheck) Checksum: 6517FE2FB3D993CA26B075D85418F650;9020.
1590 1612 )
1591 1613 Here is how much of TeX's memory you used:
1592 − 36075 strings out of 467525
1593 − 701562 string characters out of 5418982
1594 − 1130351 words of memory out of 5000000
1595 − 63396 multiletter control sequences out of 15000+600000
1596 − 793198 words of font info for 663 fonts, out of 8000000 for 9000
1614 + 36143 strings out of 467525
1615 + 702671 string characters out of 5418982
1616 + 1149081 words of memory out of 5000000
1617 + 63439 multiletter control sequences out of 15000+600000
1618 + 793579 words of font info for 669 fonts, out of 8000000 for 9000
1597 1619 1141 hyphenation exceptions out of 8191
1598 1620 84i,13n,104p,1001b,1501s stack positions out of 10000i,1000n,20000p,200000b,200000s
1599 1621 </usr/local/texlive/2026/texmf-dist/fonts/type1/public/amsfonts/cm/cmex10.pfb
@@ -1611,10 +1633,10 @@ exlive/2026/texmf-dist/fonts/type1/urw/symbol/usyr.pfb></usr/local/texlive/2026
1611 1633 e1/urw/times/utmbi8a.pfb></usr/local/texlive/2026/texmf-dist/fonts/type1/urw/ti
1612 1634 mes/utmr8a.pfb></usr/local/texlive/2026/texmf-dist/fonts/type1/urw/times/utmri8
1613 1635 a.pfb>
1614 −Output written on main.pdf (40 pages, 434428 bytes).
1636 +Output written on main.pdf (44 pages, 442504 bytes).
1615 1637 PDF statistics:
1616 − 785 PDF objects out of 1000 (max. 8388607)
1617 − 676 compressed objects within 7 object streams
1618 − 157 named destinations out of 1000 (max. 500000)
1638 + 812 PDF objects out of 1000 (max. 8388607)
1639 + 699 compressed objects within 7 object streams
1640 + 164 named destinations out of 1000 (max. 500000)
1619 1641 143777 words of extra memory for PDF output out of 154059 (max. 10000000)
1620 1642
modified paper/main.pdf +0 −0

Binary file not shown.

modified paper/sections/results_pilot.tex +39 −1
@@ -1 +1,39 @@
1 −% filled after the 103M pilot completes
1 +\paragraph{Stage A.} The 103M backbone (Table~\ref{tab:configs}) was pretrained on \pilotbbtokens{}M tokens of
2 +FineWeb-Edu (6,000 steps of $32\times512$, cosine schedule, fp32) on one Apple M3 Ultra in \pilotbbhours{} hours
3 +(13.8k tokens/s, peak \pilotbbpeakgb{} GB, $6NP\approx\pilotbbflops\times10^{16}$ FLOPs), reaching a validation
4 +perplexity of \pilotbbppl{}. This is one token per parameter---far from compute-optimal and one-half of the
5 +budget announced in the proposal's progression (a stale configuration on the node, Appendix~\ref{app:failures});
6 +the parameter-matched plain decoder (feed-forward width 2144, 102.16M) was trained with the identical recipe
7 +(validation perplexity \pilotenppl{}, \pilotenhours{} h). Only one backbone seed was affordable.
8 +
9 +\paragraph{Stage B.} On the frozen backbone, the sparse editor (\pilotedparams{} trainable parameters with the
10 +residual-plus-entropy controller features, $s=\rms(H)=8.85$) and the global-recurrence adapter
11 +(\pilotgrparams{}) were trained for 3,000 steps of $16\times512$ tokens with the forced-budget recipe. At the
12 +learning rate that worked at the tiny scale ($10^{-3}$) the sparse editor collapsed to inert edits within 500
13 +steps (every budget identical to budget 0, gradient norm zero); at $3\times10^{-4}$ it trained (\pilotedminutes{}
14 +min, peak \pilotedpeakgb{} GB) but the effect on held-out web text is negligible: $-\pilotedgainbone$,
15 +$-\pilotedgainbtwo$, $-\pilotedgainbfour$ and $-\pilotedgainbeight\,\%$ of loss at budgets 1, 2, 4 and 8. The
16 +global adapter, which did not collapse at $10^{-3}$, gives $-\pilotgrgainbone$, $-\pilotgrgainbtwo$,
17 +$-\pilotgrgainbfour$ and $-\pilotgrgainbeight\,\%$ in \pilotgrminutes{} min. The dense sixteen-slot probe
18 +collapsed at both learning rates and yields no 103M result. On general web text, therefore, neither adapter
19 +moves a frozen 100M backbone by more than a tenth of a percent of loss with 24.6M adapter tokens---less than the
20 +run-to-run noise of pretraining itself---so H1 is not supported outside the synthetic suite, and the
21 +parameter-matched plain decoder is the relevant comparison (Table~\ref{tab:pilotppl}).
22 +\input{tables/pilot_ppl.tex}
23 +
24 +\paragraph{Stages C--D and routing.} Counterfactual labels were collected on a validation-disjoint stream of
25 +web text and a controller fitted with the tiny-scale recipe (Table~\ref{tab:pilotrouting}). The locked
26 +controller changes the validation loss by \pilotroutingctrl\,\% (\pilotroutingctrledits{} edits per token);
27 +the one-step oracle reaches \pilotroutingoracle\,\% with \pilotroutingoracleedits{} edits per token, and the
28 +best fixed schedule (round-robin, budget 1) \pilotroutinguniformone\,\%. The picture of
29 +Section~\ref{sec:results-routing} is unchanged at 103M: there is oracle opportunity (now on natural text), and
30 +the controller does not capture it.
31 +\input{tables/pilot_routing.tex}
32 +
33 +\paragraph{Latency at 103M.} Table~\ref{tab:pilotlatency} repeats the latency protocol with the 103M model on
34 +the M3 Ultra (prompt 256, 32 generated tokens, fp32). Budget 0 costs \pilotlatbzero{} ms per token at batch 1;
35 +eight single-slot edits \pilotlatseight{} ms; eight dense writes \pilotlatdeight{} ms; the controller with its
36 +locked penalty \pilotlatctrl{} ms. The sparse-versus-dense gap is now visible but remains far below the
37 +analytic ratio (3.1$\times$ more editor operations for dense writes), confirming that at this size the
38 +per-action dispatch, the slot re-keying and the bank read---not the lane arithmetic---set the cost.
39 +\input{tables/pilot_latency.tex}
modified paper/tables/numbers.tex +31 −0
@@ -38,6 +38,37 @@
38 38 \newcommand{\paramsMediumWs}{10,505,221}
39 39 \newcommand{\paramsSmallTotal}{102,134,021}
40 40 \newcommand{\paramsSmallWs}{2,631,173}
41 +\newcommand{\pilotbbflops}{5.9}
42 +\newcommand{\pilotbbhours}{2.3}
43 +\newcommand{\pilotbbpeakgb}{28}
44 +\newcommand{\pilotbbppl}{48.2}
45 +\newcommand{\pilotbbtokens}{98.3}
46 +\newcommand{\pilotedgainbeight}{0.06}
47 +\newcommand{\pilotedgainbfour}{0.08}
48 +\newcommand{\pilotedgainbone}{0.04}
49 +\newcommand{\pilotedgainbtwo}{0.06}
50 +\newcommand{\pilotedminutes}{90}
51 +\newcommand{\pilotedparams}{1,907,713}
52 +\newcommand{\pilotedpeakgb}{25.9}
53 +\newcommand{\pilotenhours}{n/a}
54 +\newcommand{\pilotenppl}{n/a}
55 +\newcommand{\pilotgrgainbeight}{0.07}
56 +\newcommand{\pilotgrgainbfour}{0.08}
57 +\newcommand{\pilotgrgainbone}{0.04}
58 +\newcommand{\pilotgrgainbtwo}{0.06}
59 +\newcommand{\pilotgrminutes}{21}
60 +\newcommand{\pilotgrparams}{2,623,488}
61 +\newcommand{\pilotgrpeakgb}{9.7}
62 +\newcommand{\pilotlatbzero}{7.6}
63 +\newcommand{\pilotlatctrl}{11.0}
64 +\newcommand{\pilotlatdeight}{26.9}
65 +\newcommand{\pilotlatseight}{22.9}
66 +\newcommand{\pilotpplgrm}{48.16}
67 +\newcommand{\pilotroutingctrl}{-0.01}
68 +\newcommand{\pilotroutingctrledits}{0.61}
69 +\newcommand{\pilotroutingoracle}{-3.6}
70 +\newcommand{\pilotroutingoracleedits}{4.28}
71 +\newcommand{\pilotroutinguniformone}{-0.02}
41 72 \newcommand{\routingbzero}{0.4334}
42 73 \newcommand{\routingctrllambda}{0.3}
43 74 \newcommand{\routingctrlledits}{0.22}
added paper/tables/pilot_latency.tex +33 −0
@@ -0,0 +1,33 @@
1 +\begin{table}[t]\centering\small
2 +\caption{103M pilot: measured decode latency per generated token on mps (fp32, prompt 256 tokens, 32 generated, three
3 +repetitions, median and p95), batch 1 and 8.}
4 +\label{tab:pilotlatency}
5 +\begin{tabular}{llrrrr}\toprule
6 +Policy & budget & batch & median ms & p95 ms & cache bytes\\\midrule
7 +budget0 & 0 & 1 & 7.55 & 8.27 & 5,898,240\\
8 +forced single & 1 & 1 & 10.20 & 11.00 & 5,898,240\\
9 +forced pair & 1 & 1 & 10.23 & 10.95 & 5,898,240\\
10 +forced single & 2 & 1 & 12.38 & 12.70 & 5,898,240\\
11 +forced pair & 2 & 1 & 11.51 & 12.13 & 5,898,240\\
12 +forced single & 4 & 1 & 15.87 & 54.16 & 5,898,240\\
13 +forced pair & 4 & 1 & 15.46 & 27.41 & 5,898,240\\
14 +forced single & 8 & 1 & 22.88 & 80.61 & 5,898,240\\
15 +forced pair & 8 & 1 & 23.29 & 24.80 & 5,898,240\\
16 +controller & 8 & 1 & 11.01 & 27.54 & 5,898,240\\
17 +dense forced & 1 & 1 & 10.65 & 17.74 & 5,898,240\\
18 +dense forced & 4 & 1 & 17.85 & 65.12 & 5,898,240\\
19 +dense forced & 8 & 1 & 26.91 & 27.86 & 5,898,240\\
20 +budget0 & 0 & 8 & 10.27 & 18.75 & 47,185,920\\
21 +forced single & 1 & 8 & 13.08 & 23.51 & 47,185,920\\
22 +forced pair & 1 & 8 & 13.04 & 57.55 & 47,185,920\\
23 +forced single & 2 & 8 & 15.26 & 16.93 & 47,185,920\\
24 +forced pair & 2 & 8 & 15.20 & 16.37 & 47,185,920\\
25 +forced single & 4 & 8 & 18.81 & 20.15 & 47,185,920\\
26 +forced pair & 4 & 8 & 20.04 & 21.58 & 47,185,920\\
27 +forced single & 8 & 8 & 28.97 & 29.76 & 47,185,920\\
28 +forced pair & 8 & 8 & 29.06 & 33.15 & 47,185,920\\
29 +controller & 8 & 8 & 32.67 & 77.22 & 47,185,920\\
30 +dense forced & 1 & 8 & 13.03 & 26.24 & 47,185,920\\
31 +dense forced & 4 & 8 & 21.36 & 88.63 & 47,185,920\\
32 +dense forced & 8 & 8 & 32.10 & 34.51 & 47,185,920\\
33 +\bottomrule\end{tabular}\end{table}
added paper/tables/pilot_ppl.tex +12 −0
@@ -0,0 +1,12 @@
1 +\begin{table}[t]\centering\small
2 +\caption{103M pilot: held-out cross-entropy (nats/token) and perplexity on 327,680 FineWeb-Edu validation tokens
3 +(40 $\times$ 16 $\times$ 512) under forced random budgets and, for PRISME, under the locked controller.}
4 +\label{tab:pilotppl}
5 +\begin{tabular}{llrr}\toprule
6 +System & policy & loss & ppl\\\midrule
7 +gr 103m & forced b0 & 3.8746 & 48.16\\
8 +gr 103m & forced b1 & 3.8731 & 48.09\\
9 +gr 103m & forced b2 & 3.8722 & 48.05\\
10 +gr 103m & forced b4 & 3.8714 & 48.01\\
11 +gr 103m & forced b8 & 3.8718 & 48.03\\
12 +\bottomrule\end{tabular}\end{table}
added paper/tables/pilot_routing.tex +34 −0
@@ -0,0 +1,34 @@
1 +\begin{table}[t]\centering\small
2 +\caption{103M pilot: routing comparison on validation text (20 $\times$ 8 $\times$ 512 tokens). Oracles are diagnostic.}
3 +\label{tab:pilotrouting}
4 +\begin{tabular}{llrrr}\toprule
5 +Policy & setting & loss & edits/token & extra ops\\\midrule
6 +budget0 & & 3.9889 & 0.00 & 0.000\\
7 +random forced & budget=1 & 3.9875 & 1.00 & 0.091\\
8 +uniform & budget=1 & 3.9881 & 1.00 & 0.081\\
9 +fixed pair & budget=1 & 3.9875 & 1.00 & 0.102\\
10 +random forced & budget=2 & 3.9866 & 2.00 & 0.183\\
11 +uniform & budget=2 & 3.9875 & 2.00 & 0.162\\
12 +fixed pair & budget=2 & 3.9866 & 2.00 & 0.203\\
13 +random forced & budget=4 & 3.9859 & 4.00 & 0.365\\
14 +uniform & budget=4 & 3.9865 & 4.00 & 0.324\\
15 +fixed pair & budget=4 & 3.9858 & 4.00 & 0.406\\
16 +random forced & budget=8 & 3.9864 & 8.00 & 0.731\\
17 +uniform & budget=8 & 3.9858 & 8.00 & 0.648\\
18 +fixed pair & budget=8 & 3.9887 & 8.00 & 0.813\\
19 +entropy & threshold=1.0, budget=8 & 3.9861 & 7.41 & 0.652\\
20 +entropy & threshold=2.0, budget=8 & 3.9865 & 6.78 & 0.597\\
21 +entropy & threshold=4.0, budget=8 & 3.9870 & 4.45 & 0.391\\
22 +norm & threshold=0.05, budget=8 & 3.9872 & 1.65 & 0.145\\
23 +norm & threshold=0.1, budget=8 & 3.9876 & 1.00 & 0.088\\
24 +norm & threshold=0.2, budget=8 & 3.9876 & 1.00 & 0.088\\
25 +controller locked & lam=0.3, kap=0.5, budget=8 & 3.9886 & 0.61 & 0.050\\
26 +controller & lam=0.0, kap=0.5, budget=8 & 3.9879 & 3.04 & 0.266\\
27 +controller & lam=0.03, kap=0.5, budget=8 & 3.9879 & 2.69 & 0.228\\
28 +controller & lam=0.1, kap=0.5, budget=8 & 3.9881 & 1.98 & 0.161\\
29 +controller & lam=0.3, kap=0.5, budget=8 & 3.9886 & 0.61 & 0.050\\
30 +oracle1 greedy (diag.) & budget=1 & 3.8905 & 0.57 & 0.057\\
31 +oracle1 greedy (diag.) & budget=2 & 3.8828 & 1.12 & 0.113\\
32 +oracle1 greedy (diag.) & budget=4 & 3.8687 & 2.21 & 0.222\\
33 +oracle1 greedy (diag.) & budget=8 & 3.8445 & 4.28 & 0.429\\
34 +\bottomrule\end{tabular}\end{table}
modified results/claim_registry.csv +6 −0
@@ -14,3 +14,9 @@ Fixed schedules: random = uniform = fixed pair (H2 null),loss at budget 1,see nu
14 14 Two-step oracle vs one-step: myopia regret small,gain nats,see numbers.tex oracletwostep;oracleonestep,synthetic dev-iid v1 editor (1 batch),controller_v1ctrl_seed01,results/raw/routing_v1ctrl.json,evaluation/routing.py,complete
15 15 Dispatch overhead dominates at tiny scale; dense not slower than sparse,median ms/token batch 1,see paper/tables/latency.tex,laptop MPS tiny model,p4_editor_v1_Ustd02_seed01,results/raw/latency_p4_editor_v1_Ustd02_seed01_20261029235050_mps.json,evaluation/latency.py,complete
16 16 Miniature end-to-end pipeline runs on CPU,wall seconds,56,mini configs,mini_backbone_seed01;mini_editor_seed01;labels_mini_seed01;controller_mini_seed01,results/raw/routing_mini.json,scripts/reproduce_pilot.sh,complete
17 +103M backbone pretrained on 98.3M tokens (ppl 48.2),val loss/ppl,3.8746 / 48.16,FineWeb-Edu val,pretrain103m_seed01_20261029232706,experiments/runs/pretrain103m_seed01_20261029232706/manifest.json,training/pretrain.py,complete
18 +103M sparse editor (lr 3e-4) changes held-out loss by less than 0.1% at any budget,val loss relative change,see numbers.tex piloted*,FineWeb-Edu val (training-time eval),editor_pilot_103m_lr3e4_seed01_20261030021200,experiments/runs/editor_pilot_103m_lr3e4_seed01_20261030021200/metrics.jsonl,training/train_editor.py,complete
19 +103M sparse editor at lr 1e-3 collapsed to inert edits,val loss by budget,identical 3.9889,FineWeb-Edu val,editor_pilot_103m_seed01_20261030015139,experiments/runs/editor_pilot_103m_seed01_20261030015139/metrics.jsonl,,stopped-run-used
20 +103M global-recurrence adapter changes held-out loss by less than 0.1%,val ppl by budget,48.16 -> 48.01,FineWeb-Edu val,gr_pilot_103m_seed01_20261030015117,results/raw/eval_gr_103m_val.json,evaluation/run.py,complete
21 +103M controller: oracle opportunity exists (-3.6% at b8) but the controller captures none (-0.01%),val loss relative change,see numbers.tex pilotrouting*,FineWeb-Edu val,controller_103m_seed01,results/raw/routing_103m_val.json,evaluation/routing.py,complete
22 +103M latency: 8 sparse edits 3.0x budget-0 median latency; dense 3.6x; controller 1.5x,median ms/token batch 1,7.55 / 22.9 / 26.9 / 11.0,M3 Ultra MPS fp32,controller_103m_seed01,results/raw/latency_103m_mps.json,evaluation/latency.py,complete
modified results/figures/frontier_v2.pdf +0 −0

Binary file not shown.

modified results/figures/labels_analysis.pdf +0 −0

Binary file not shown.

added results/figures/latency_103m_mps.pdf +0 −0

Binary file not shown.

added results/figures/latency_103m_mps.png +0 −0

Binary file not shown.

modified results/figures/latency_p4_editor_v1_Ustd02_seed01_20261029235050_mps.pdf +0 −0

Binary file not shown.

modified results/figures/learnability_bootstrap.pdf +0 −0

Binary file not shown.

modified results/figures/learnability_v2.pdf +0 −0

Binary file not shown.

modified results/figures/pretrain_curves.pdf +0 −0

Binary file not shown.

added results/figures/routing_103m_val.pdf +0 −0

Binary file not shown.

added results/figures/routing_103m_val.png +0 −0

Binary file not shown.

modified results/figures/routing_controller_p4_hent_seed01_20261030002015_dev_iid.pdf +0 −0

Binary file not shown.

modified results/figures/routing_mini.pdf +0 −0

Binary file not shown.

modified results/figures/routing_v1ctrl.pdf +0 −0

Binary file not shown.

modified results/figures/routing_v1rank.pdf +0 −0

Binary file not shown.

modified results/figures/routing_v2s1.pdf +0 −0

Binary file not shown.

modified results/figures/routing_v2s2.pdf +0 −0

Binary file not shown.

modified results/figures/routing_v2s3.pdf +0 −0

Binary file not shown.

modified results/figures/routing_v2s4.pdf +0 −0

Binary file not shown.

modified results/figures/routing_v2s5.pdf +0 −0

Binary file not shown.

added results/raw/eval_gr_103m_val.json +40 −0
@@ -0,0 +1,40 @@
1 +{
2 + "system": "gr_103m",
3 + "split": "val",
4 + "checkpoint": "experiments/runs/gr_pilot_103m_seed01_20261030015117/checkpoint",
5 + "checkpoint_sha256": "1e3e5cdd103672376ad23bbfaafc50bcc68b937d808fae74308285a54564938a",
6 + "config_sha256": "a3f0c8dc75a01e38b6eb8a9d199aa2e29f574b887bdd0e62092e2f550e7a6373",
7 + "code_commit": "unknown",
8 + "device": "mps",
9 + "precision": "fp32",
10 + "evaluated_at": "2026-10-30T03:43:14-0400",
11 + "data_sha256": "d8753bdfa9609fce56a7ec2da7c108666185d021e3f921721e4d2241e1d4fe54",
12 + "perplexity": {
13 + "forced_b0": {
14 + "loss": 3.8746298491954803,
15 + "ppl": 48.16486672694994,
16 + "n_tokens": 327680
17 + },
18 + "forced_b1": {
19 + "loss": 3.873138165473938,
20 + "ppl": 48.09307353898038,
21 + "n_tokens": 327680
22 + },
23 + "forced_b2": {
24 + "loss": 3.8722472012043,
25 + "ppl": 48.050243411729866,
26 + "n_tokens": 327680
27 + },
28 + "forced_b4": {
29 + "loss": 3.8714304685592653,
30 + "ppl": 48.01101523098215,
31 + "n_tokens": 327680
32 + },
33 + "forced_b8": {
34 + "loss": 3.871782386302948,
35 + "ppl": 48.02791413247139,
36 + "n_tokens": 327680
37 + }
38 + },
39 + "seconds": 45.8
40 +}
\ No newline at end of file
added results/raw/latency_103m_mps.json +302 −0
@@ -0,0 +1,302 @@
1 +{
2 + "config": "configs/experiments/latency_103m.yaml",
3 + "checkpoint_sha256": "64d08e9120608983b261bd6d108eb2421da45c84ebc733fa5fb2b88780dae427",
4 + "device": "mps",
5 + "torch": "2.15.0",
6 + "precision": "fp32",
7 + "prompt_len": 256,
8 + "n_new": 32,
9 + "code_commit": "unknown",
10 + "peak_memory_bytes": 3273342976,
11 + "analytic_ops_per_token": {
12 + "budget0": 209622528,
13 + "4_k1": 339414528,
14 + "4_k2": 355540480,
15 + "8_k2": 435656192,
16 + "8_dense": 887182848
17 + },
18 + "records": [
19 + {
20 + "policy": "budget0",
21 + "batch": 1,
22 + "budget": 0,
23 + "median_ms": 7.554021023679525,
24 + "p95_ms": 8.273145940620452,
25 + "mean_ms": 7.569623681774829,
26 + "n": 96,
27 + "cache_bytes": 5898240
28 + },
29 + {
30 + "policy": "forced_single",
31 + "batch": 1,
32 + "budget": 1,
33 + "forced_k": 1,
34 + "median_ms": 10.197187482845038,
35 + "p95_ms": 10.996218799846247,
36 + "mean_ms": 10.16590669072078,
37 + "n": 96,
38 + "cache_bytes": 5898240
39 + },
40 + {
41 + "policy": "forced_pair",
42 + "batch": 1,
43 + "budget": 1,
44 + "forced_k": 2,
45 + "median_ms": 10.232354514300823,
46 + "p95_ms": 10.949291929136962,
47 + "mean_ms": 10.210288580613755,
48 + "n": 96,
49 + "cache_bytes": 5898240
50 + },
51 + {
52 + "policy": "forced_single",
53 + "batch": 1,
54 + "budget": 2,
55 + "forced_k": 1,
56 + "median_ms": 12.383270543068647,
57 + "p95_ms": 12.69960420904681,
58 + "mean_ms": 11.684006077606076,
59 + "n": 96,
60 + "cache_bytes": 5898240
61 + },
62 + {
63 + "policy": "forced_pair",
64 + "batch": 1,
65 + "budget": 2,
66 + "forced_k": 2,
67 + "median_ms": 11.509437521453947,
68 + "p95_ms": 12.131708004744723,
69 + "mean_ms": 11.05400784460168,
70 + "n": 96,
71 + "cache_bytes": 5898240
72 + },
73 + {
74 + "policy": "forced_single",
75 + "batch": 1,
76 + "budget": 4,
77 + "forced_k": 1,
78 + "median_ms": 15.866020519752055,
79 + "p95_ms": 54.16153179248795,
80 + "mean_ms": 19.282480483525433,
81 + "n": 96,
82 + "cache_bytes": 5898240
83 + },
84 + {
85 + "policy": "forced_pair",
86 + "batch": 1,
87 + "budget": 4,
88 + "forced_k": 2,
89 + "median_ms": 15.460958005860448,
90 + "p95_ms": 27.407583547756076,
91 + "mean_ms": 16.31527776650425,
92 + "n": 96,
93 + "cache_bytes": 5898240
94 + },
95 + {
96 + "policy": "forced_single",
97 + "batch": 1,
98 + "budget": 8,
99 + "forced_k": 1,
100 + "median_ms": 22.882541525177658,
101 + "p95_ms": 80.60674997977912,
102 + "mean_ms": 28.589312497691328,
103 + "n": 96,
104 + "cache_bytes": 5898240
105 + },
106 + {
107 + "policy": "forced_pair",
108 + "batch": 1,
109 + "budget": 8,
110 + "forced_k": 2,
111 + "median_ms": 23.291583522222936,
112 + "p95_ms": 24.80255250702612,
113 + "mean_ms": 23.393341953730367,
114 + "n": 96,
115 + "cache_bytes": 5898240
116 + },
117 + {
118 + "policy": "controller",
119 + "batch": 1,
120 + "budget": 8,
121 + "median_ms": 11.006999993696809,
122 + "p95_ms": 27.535593806533143,
123 + "mean_ms": 12.026253437700992,
124 + "n": 96,
125 + "cache_bytes": 5898240
126 + },
127 + {
128 + "policy": "dense_forced",
129 + "batch": 1,
130 + "budget": 1,
131 + "forced_k": 1,
132 + "median_ms": 10.64931252039969,
133 + "p95_ms": 17.744635028066114,
134 + "mean_ms": 11.291276908499034,
135 + "n": 96,
136 + "cache_bytes": 5898240
137 + },
138 + {
139 + "policy": "dense_forced",
140 + "batch": 1,
141 + "budget": 4,
142 + "forced_k": 1,
143 + "median_ms": 17.851791460998356,
144 + "p95_ms": 65.12488526641391,
145 + "mean_ms": 22.8273315927557,
146 + "n": 96,
147 + "cache_bytes": 5898240
148 + },
149 + {
150 + "policy": "dense_forced",
151 + "batch": 1,
152 + "budget": 8,
153 + "forced_k": 1,
154 + "median_ms": 26.906583516392857,
155 + "p95_ms": 27.862822695169598,
156 + "mean_ms": 27.034480945682542,
157 + "n": 96,
158 + "cache_bytes": 5898240
159 + },
160 + {
161 + "policy": "budget0",
162 + "batch": 8,
163 + "budget": 0,
164 + "median_ms": 10.26502053719014,
165 + "p95_ms": 18.752072588540614,
166 + "mean_ms": 10.654087217214206,
167 + "n": 96,
168 + "cache_bytes": 47185920
169 + },
170 + {
171 + "policy": "forced_single",
172 + "batch": 8,
173 + "budget": 1,
174 + "forced_k": 1,
175 + "median_ms": 13.082749966997653,
176 + "p95_ms": 23.506614292273298,
177 + "mean_ms": 13.859784298498804,
178 + "n": 96,
179 + "cache_bytes": 47185920
180 + },
181 + {
182 + "policy": "forced_pair",
183 + "batch": 8,
184 + "budget": 1,
185 + "forced_k": 2,
186 + "median_ms": 13.039500452578068,
187 + "p95_ms": 57.54836479900405,
188 + "mean_ms": 17.062923668466585,
189 + "n": 96,
190 + "cache_bytes": 47185920
191 + },
192 + {
193 + "policy": "forced_single",
194 + "batch": 8,
195 + "budget": 2,
196 + "forced_k": 1,
197 + "median_ms": 15.261041990015656,
198 + "p95_ms": 16.932114987866953,
199 + "mean_ms": 16.069337232086884,
200 + "n": 96,
201 + "cache_bytes": 47185920
202 + },
203 + {
204 + "policy": "forced_pair",
205 + "batch": 8,
206 + "budget": 2,
207 + "forced_k": 2,
208 + "median_ms": 15.204499941319227,
209 + "p95_ms": 16.368166747270152,
210 + "mean_ms": 14.876095493188283,
211 + "n": 96,
212 + "cache_bytes": 47185920
213 + },
214 + {
215 + "policy": "forced_single",
216 + "batch": 8,
217 + "budget": 4,
218 + "forced_k": 1,
219 + "median_ms": 18.81216699257493,
220 + "p95_ms": 20.145801798207685,
221 + "mean_ms": 18.852500479018392,
222 + "n": 96,
223 + "cache_bytes": 47185920
224 + },
225 + {
226 + "policy": "forced_pair",
227 + "batch": 8,
228 + "budget": 4,
229 + "forced_k": 2,
230 + "median_ms": 20.03912499640137,
231 + "p95_ms": 21.57740603433922,
232 + "mean_ms": 19.88851258768894,
233 + "n": 96,
234 + "cache_bytes": 47185920
235 + },
236 + {
237 + "policy": "forced_single",
238 + "batch": 8,
239 + "budget": 8,
240 + "forced_k": 1,
241 + "median_ms": 28.970604529604316,
242 + "p95_ms": 29.755865019978955,
243 + "mean_ms": 28.583446644915966,
244 + "n": 96,
245 + "cache_bytes": 47185920
246 + },
247 + {
248 + "policy": "forced_pair",
249 + "batch": 8,
250 + "budget": 8,
251 + "forced_k": 2,
252 + "median_ms": 29.06233351677656,
253 + "p95_ms": 33.15305270371027,
254 + "mean_ms": 28.535953611329507,
255 + "n": 96,
256 + "cache_bytes": 47185920
257 + },
258 + {
259 + "policy": "controller",
260 + "batch": 8,
261 + "budget": 8,
262 + "median_ms": 32.673625042662024,
263 + "p95_ms": 77.21810429939069,
264 + "mean_ms": 30.23307767701529,
265 + "n": 96,
266 + "cache_bytes": 47185920
267 + },
268 + {
269 + "policy": "dense_forced",
270 + "batch": 8,
271 + "budget": 1,
272 + "forced_k": 1,
273 + "median_ms": 13.034250470809639,
274 + "p95_ms": 26.244479202432558,
275 + "mean_ms": 14.254568138615772,
276 + "n": 96,
277 + "cache_bytes": 47185920
278 + },
279 + {
280 + "policy": "dense_forced",
281 + "batch": 8,
282 + "budget": 4,
283 + "forced_k": 1,
284 + "median_ms": 21.35618799366057,
285 + "p95_ms": 88.62939599202946,
286 + "mean_ms": 26.533539952652063,
287 + "n": 96,
288 + "cache_bytes": 47185920
289 + },
290 + {
291 + "policy": "dense_forced",
292 + "batch": 8,
293 + "budget": 8,
294 + "forced_k": 1,
295 + "median_ms": 32.09874941967428,
296 + "p95_ms": 34.511145524447784,
297 + "mean_ms": 32.247447521513095,
298 + "n": 96,
299 + "cache_bytes": 47185920
300 + }
301 + ]
302 +}
\ No newline at end of file
added results/raw/routing_103m_val.json +262 −0
@@ -0,0 +1,262 @@
1 +{
2 + "config": "configs/experiments/routing_103m.yaml",
3 + "checkpoint": "experiments/runs/controller_103m_seed01_20261030034451/checkpoint",
4 + "checkpoint_sha256": "64d08e9120608983b261bd6d108eb2421da45c84ebc733fa5fb2b88780dae427",
5 + "split": "val",
6 + "code_commit": "unknown",
7 + "device": "mps",
8 + "seconds": 214.7,
9 + "records": [
10 + {
11 + "policy": "budget0",
12 + "loss": 3.988917422294617,
13 + "edits_per_token": 0.0,
14 + "extra_ops_ratio": 0.0,
15 + "n_tokens": 81920
16 + },
17 + {
18 + "policy": "random_forced",
19 + "budget": 1,
20 + "loss": 3.9874816298484803,
21 + "edits_per_token": 1.0,
22 + "extra_ops_ratio": 0.09125293754041194,
23 + "n_tokens": 81920
24 + },
25 + {
26 + "policy": "uniform",
27 + "budget": 1,
28 + "loss": 3.988114631175995,
29 + "edits_per_token": 1.0,
30 + "extra_ops_ratio": 0.0810016319155693,
31 + "n_tokens": 81920
32 + },
33 + {
34 + "policy": "fixed_pair",
35 + "budget": 1,
36 + "loss": 3.9875080823898315,
37 + "edits_per_token": 1.0,
38 + "extra_ops_ratio": 0.10161040723323822,
39 + "n_tokens": 81920
40 + },
41 + {
42 + "policy": "random_forced",
43 + "budget": 2,
44 + "loss": 3.986599826812744,
45 + "edits_per_token": 2.0,
46 + "extra_ops_ratio": 0.18254537209868432,
47 + "n_tokens": 81920
48 + },
49 + {
50 + "policy": "uniform",
51 + "budget": 2,
52 + "loss": 3.9874621868133544,
53 + "edits_per_token": 2.0,
54 + "extra_ops_ratio": 0.1620032638311386,
55 + "n_tokens": 81920
56 + },
57 + {
58 + "policy": "fixed_pair",
59 + "budget": 2,
60 + "loss": 3.986551058292389,
61 + "edits_per_token": 2.0,
62 + "extra_ops_ratio": 0.20322081446647644,
63 + "n_tokens": 81920
64 + },
65 + {
66 + "policy": "random_forced",
67 + "budget": 4,
68 + "loss": 3.9859113812446596,
69 + "edits_per_token": 4.0,
70 + "extra_ops_ratio": 0.3652265787124634,
71 + "n_tokens": 81920
72 + },
73 + {
74 + "policy": "uniform",
75 + "budget": 4,
76 + "loss": 3.98651465177536,
77 + "edits_per_token": 4.0,
78 + "extra_ops_ratio": 0.3240065276622772,
79 + "n_tokens": 81920
80 + },
81 + {
82 + "policy": "fixed_pair",
83 + "budget": 4,
84 + "loss": 3.9858184456825256,
85 + "edits_per_token": 4.0,
86 + "extra_ops_ratio": 0.4064416289329529,
87 + "n_tokens": 81920
88 + },
89 + {
90 + "policy": "random_forced",
91 + "budget": 8,
92 + "loss": 3.9863768219947815,
93 + "edits_per_token": 8.0,
94 + "extra_ops_ratio": 0.7305014580488205,
95 + "n_tokens": 81920
96 + },
97 + {
98 + "policy": "uniform",
99 + "budget": 8,
100 + "loss": 3.9858006834983826,
101 + "edits_per_token": 8.0,
102 + "extra_ops_ratio": 0.6480130553245544,
103 + "n_tokens": 81920
104 + },
105 + {
106 + "policy": "fixed_pair",
107 + "budget": 8,
108 + "loss": 3.9886863827705383,
109 + "edits_per_token": 8.0,
110 + "extra_ops_ratio": 0.8128832578659058,
111 + "n_tokens": 81920
112 + },
113 + {
114 + "policy": "entropy",
115 + "threshold": 1.0,
116 + "budget": 8,
117 + "loss": 3.986129975318909,
118 + "edits_per_token": 7.41322021484375,
119 + "extra_ops_ratio": 0.6520211786031723,
120 + "n_tokens": 81920
121 + },
122 + {
123 + "policy": "entropy",
124 + "threshold": 2.0,
125 + "budget": 8,
126 + "loss": 3.986458885669708,
127 + "edits_per_token": 6.782666015625,
128 + "extra_ops_ratio": 0.5965691864490509,
129 + "n_tokens": 81920
130 + },
131 + {
132 + "policy": "entropy",
133 + "threshold": 4.0,
134 + "budget": 8,
135 + "loss": 3.9870473384857177,
136 + "edits_per_token": 4.45064697265625,
137 + "extra_ops_ratio": 0.3914341315627098,
138 + "n_tokens": 81920
139 + },
140 + {
141 + "policy": "norm",
142 + "threshold": 0.05,
143 + "budget": 8,
144 + "loss": 3.987158489227295,
145 + "edits_per_token": 1.64981689453125,
146 + "extra_ops_ratio": 0.14528941884636878,
147 + "n_tokens": 81920
148 + },
149 + {
150 + "policy": "norm",
151 + "threshold": 0.1,
152 + "budget": 8,
153 + "loss": 3.9875789999961855,
154 + "edits_per_token": 1.00203857421875,
155 + "extra_ops_ratio": 0.08833706304430962,
156 + "n_tokens": 81920
157 + },
158 + {
159 + "policy": "norm",
160 + "threshold": 0.2,
161 + "budget": 8,
162 + "loss": 3.987588274478912,
163 + "edits_per_token": 1.0,
164 + "extra_ops_ratio": 0.0881563350558281,
165 + "n_tokens": 81920
166 + },
167 + {
168 + "policy": "controller_locked",
169 + "lam": 0.3,
170 + "kap": 0.5,
171 + "budget": 8,
172 + "loss": 3.988595390319824,
173 + "edits_per_token": 0.61395263671875,
174 + "extra_ops_ratio": 0.04973116461187601,
175 + "n_tokens": 81920
176 + },
177 + {
178 + "policy": "controller",
179 + "lam": 0.0,
180 + "kap": 0.5,
181 + "budget": 8,
182 + "loss": 3.987903368473053,
183 + "edits_per_token": 3.03917236328125,
184 + "extra_ops_ratio": 0.26631725803017614,
185 + "n_tokens": 81920
186 + },
187 + {
188 + "policy": "controller",
189 + "lam": 0.03,
190 + "kap": 0.5,
191 + "budget": 8,
192 + "loss": 3.9879065990447997,
193 + "edits_per_token": 2.6948974609375,
194 + "extra_ops_ratio": 0.22800378128886223,
195 + "n_tokens": 81920
196 + },
197 + {
198 + "policy": "controller",
199 + "lam": 0.1,
200 + "kap": 0.5,
201 + "budget": 8,
202 + "loss": 3.9881483793258665,
203 + "edits_per_token": 1.97513427734375,
204 + "extra_ops_ratio": 0.16089022792875768,
205 + "n_tokens": 81920
206 + },
207 + {
208 + "policy": "controller",
209 + "lam": 0.3,
210 + "kap": 0.5,
211 + "budget": 8,
212 + "loss": 3.988595390319824,
213 + "edits_per_token": 0.61395263671875,
214 + "extra_ops_ratio": 0.04973116461187601,
215 + "n_tokens": 81920
216 + },
217 + {
218 + "policy": "oracle1_greedy",
219 + "budget": 1,
220 + "diagnostic": true,
221 + "loss": 3.8904590606689453,
222 + "edits_per_token": 0.5654296875,
223 + "extra_ops_ratio": 0.056877437978982925,
224 + "n_tokens": 8192
225 + },
226 + {
227 + "policy": "oracle1_greedy",
228 + "budget": 2,
229 + "diagnostic": true,
230 + "loss": 3.8827518224716187,
231 + "edits_per_token": 1.1217041015625,
232 + "extra_ops_ratio": 0.11277931556105614,
233 + "n_tokens": 8192
234 + },
235 + {
236 + "policy": "oracle1_greedy",
237 + "budget": 4,
238 + "diagnostic": true,
239 + "loss": 3.8686580657958984,
240 + "edits_per_token": 2.21142578125,
241 + "extra_ops_ratio": 0.22216549515724182,
242 + "n_tokens": 8192
243 + },
244 + {
245 + "policy": "oracle1_greedy",
246 + "budget": 8,
247 + "diagnostic": true,
248 + "loss": 3.844477653503418,
249 + "edits_per_token": 4.278076171875,
250 + "extra_ops_ratio": 0.42921778559684753,
251 + "n_tokens": 8192
252 + },
253 + {
254 + "policy": "oracle_two_step",
255 + "diagnostic": true,
256 + "one_step_gain": 0.00875546969473362,
257 + "two_step_gain": 0.016163207590579987,
258 + "greedy_then_best_gain": 0.016161995008587837,
259 + "n_tokens": 4096
260 + }
261 + ]
262 +}
\ No newline at end of file
modified scripts/make_results_tables.py +99 −1
@@ -2,7 +2,7 @@
2 2 experiments/runs (local copies), results/raw/*.json and results/analyzed/*.json. Every number is traceable to a run id."""
3 3 from __future__ import annotations
4 4
5 −import glob, json, math
5 +import glob, json, math, re
6 6 from collections import defaultdict
7 7 from pathlib import Path
8 8
@@ -316,3 +316,101 @@ System & budget & """ + " & ".join(fams) + r""" & transitions ($+$/$-$)\\\midrul
316 316 _old_make_all2 = make_all
317 317 def make_all(macro): # noqa: F811
318 318 _old_make_all2(macro); table_em_families(macro)
319 +
320 +
321 +def table_pilot(macro):
322 + """103M pilot: Stage A/B manifests, held-out perplexity by policy (evaluation.run), routing and latency at 103M."""
323 + import math
324 + rows = []
325 + def man(prefix):
326 + ms = sorted(glob.glob(f"{RUNS}/{prefix}_seed*/manifest.json"))
327 + return json.load(open(ms[-1])) if ms else None
328 + pre = man("pretrain103m"); en = man("pretrain_enlarged102m"); ed = man("editor_pilot_103m_lr3e4"); gr = man("gr_pilot_103m")
329 + if pre:
330 + macro("pilotbbtokens", f"{pre['train_tokens']/1e6:.1f}"); macro("pilotbbhours", f"{pre['wall_seconds']/3600:.1f}"); macro("pilotbbppl", f"{math.exp(pre['final_val_loss']):.1f}")
331 + macro("pilotbbpeakgb", f"{pre['peak_memory_bytes']/1e9:.0f}"); macro("pilotbbflops", f"{pre['estimated_train_flops']/1e16:.1f}")
332 + if en and en.get("state") == "completed":
333 + macro("pilotenppl", f"{math.exp(en['final_val_loss']):.1f}"); macro("pilotenhours", f"{en['wall_seconds']/3600:.1f}")
334 + else:
335 + macro("pilotenppl", "n/a"); macro("pilotenhours", "n/a")
336 + for m, tag in [(ed, "piloted"), (gr, "pilotgr")]:
337 + if m:
338 + fv = _final_val(f"{RUNS}/{m['run_id']}")
339 + b0 = fv.get("val_loss_b0");
340 + for b in (1, 2, 4, 8):
341 + macro(f"{tag}gainb{ {1:'one',2:'two',4:'four',8:'eight'}[b] }", f"{100*(1 - fv.get(f'val_loss_b{b}', b0)/b0):.2f}" if b0 else "n/a")
342 + macro(f"{tag}minutes", f"{m['wall_seconds']/60:.0f}"); macro(f"{tag}peakgb", f"{m['peak_memory_bytes']/1e9:.1f}"); macro(f"{tag}params", f"{m['n_trainable']:,}")
343 + else:
344 + for bn in ("one", "two", "four", "eight"):
345 + macro(f"{tag}gainb{bn}", "n/a")
346 + macro(f"{tag}minutes", "n/a"); macro(f"{tag}peakgb", "n/a"); macro(f"{tag}params", "n/a")
347 + # perplexity table from evaluation.run outputs
348 + evs = sorted(glob.glob("results/raw/eval_*_val.json"))
349 + if evs:
350 + head = r"""\begin{table}[t]\centering\small
351 +\caption{103M pilot: held-out cross-entropy (nats/token) and perplexity on 327,680 FineWeb-Edu validation tokens
352 +(40 $\times$ 16 $\times$ 512) under forced random budgets and, for PRISME, under the locked controller.}
353 +\label{tab:pilotppl}
354 +\begin{tabular}{llrr}\toprule
355 +System & policy & loss & ppl\\\midrule
356 +"""
357 + body = ""
358 + for f in evs:
359 + d = json.load(open(f))
360 + for pol, r in d.get("perplexity", {}).items():
361 + body += f"{d['system'].replace('_', ' ')} & {pol.replace('_', ' ')} & {r['loss']:.4f} & {r['ppl']:.2f}\\\\\n"
362 + if pol == "forced_b0":
363 + macro("pilotppl" + re.sub(r"[^a-z]", "", d["system"]), f"{r['ppl']:.2f}")
364 + (OUT / "pilot_ppl.tex").write_text(head + body + r"\bottomrule\end{tabular}\end{table}" + "\n")
365 + rt = Path("results/raw/routing_103m_val.json")
366 + if rt.exists():
367 + d = json.load(open(rt)); recs = d["records"]
368 + def pick(pol, **kw):
369 + for r in recs:
370 + if r["policy"] == pol and all(r.get(k) == v for k, v in kw.items()):
371 + return r
372 + b0 = pick("budget0"); ctl = pick("controller_locked"); ora = pick("oracle1_greedy", budget=8); uni1 = pick("uniform", budget=1)
373 + if b0 and ctl:
374 + macro("pilotroutingctrl", f"{100*(ctl['loss']/b0['loss']-1):+.2f}"); macro("pilotroutingctrledits", f"{ctl['edits_per_token']:.2f}")
375 + if b0 and ora:
376 + macro("pilotroutingoracle", f"{100*(ora['loss']/b0['loss']-1):+.1f}"); macro("pilotroutingoracleedits", f"{ora['edits_per_token']:.2f}")
377 + if b0 and uni1:
378 + macro("pilotroutinguniformone", f"{100*(uni1['loss']/b0['loss']-1):+.2f}")
379 + head = r"""\begin{table}[t]\centering\small
380 +\caption{103M pilot: routing comparison on validation text (20 $\times$ 8 $\times$ 512 tokens). Oracles are diagnostic.}
381 +\label{tab:pilotrouting}
382 +\begin{tabular}{llrrr}\toprule
383 +Policy & setting & loss & edits/token & extra ops\\\midrule
384 +"""
385 + body = ""
386 + for r in recs:
387 + if r["policy"] == "oracle_two_step":
388 + continue
389 + setting = ", ".join(f"{k}={v}" for k, v in r.items() if k in ("budget", "threshold", "lam", "kap") and v is not None)
390 + body += f"{r['policy'].replace('_', ' ')}{' (diag.)' if r.get('diagnostic') else ''} & {setting} & {r['loss']:.4f} & {r['edits_per_token']:.2f} & {r['extra_ops_ratio']:.3f}\\\\\n"
391 + (OUT / "pilot_routing.tex").write_text(head + body + r"\bottomrule\end{tabular}\end{table}" + "\n")
392 + lt = Path("results/raw/latency_103m_mps.json")
393 + if lt.exists():
394 + d = json.load(open(lt))
395 + head = r"""\begin{table}[t]\centering\small
396 +\caption{103M pilot: measured decode latency per generated token on %s (fp32, prompt %d tokens, %d generated, three
397 +repetitions, median and p95), batch 1 and 8.}
398 +\label{tab:pilotlatency}
399 +\begin{tabular}{llrrrr}\toprule
400 +Policy & budget & batch & median ms & p95 ms & cache bytes\\\midrule
401 +""" % (d["device"], d["prompt_len"], d["n_new"])
402 + body = ""
403 + for r in d["records"]:
404 + body += f"{r['policy'].replace('_', ' ')} & {r['budget']} & {r['batch']} & {r['median_ms']:.2f} & {r['p95_ms']:.2f} & {r['cache_bytes']:,}\\\\\n"
405 + (OUT / "pilot_latency.tex").write_text(head + body + r"\bottomrule\end{tabular}\end{table}" + "\n")
406 + b0 = [r for r in d["records"] if r["policy"] == "budget0" and r["batch"] == 1]; s8 = [r for r in d["records"] if r["policy"] == "forced_single" and r["budget"] == 8 and r["batch"] == 1]
407 + d8 = [r for r in d["records"] if r["policy"] == "dense_forced" and r["budget"] == 8 and r["batch"] == 1]; c = [r for r in d["records"] if r["policy"] == "controller" and r["batch"] == 1]
408 + if b0: macro("pilotlatbzero", f"{b0[0]['median_ms']:.1f}")
409 + if s8: macro("pilotlatseight", f"{s8[0]['median_ms']:.1f}")
410 + if d8: macro("pilotlatdeight", f"{d8[0]['median_ms']:.1f}")
411 + if c: macro("pilotlatctrl", f"{c[0]['median_ms']:.1f}")
412 +
413 +
414 +_old_make_all3 = make_all
415 +def make_all(macro): # noqa: F811
416 + _old_make_all3(macro); table_pilot(macro)
319 417
Menu

Theme