BurnyCoder commited on
Commit
419a44e
·
verified ·
1 Parent(s): e5ec33d

Publish the measured hybrid flatness and the protocol for primary checkpoints

Browse files
Files changed (34) hide show
  1. README.md +21 -2
  2. logs/flatness-statistics-release.log +99 -0
  3. logs/flatness-statistics-render.log +1 -0
  4. logs/stories-hybrid-s23-always-r01-20261125T162919301106Z.jsonl +0 -0
  5. logs/study-20261125T162200Z-hybrid-confirmation.log +0 -0
  6. logs/study-20261125T162200Z-hybrid-stderr.log +70 -0
  7. publication.json +132 -67
  8. research/README.md +22 -3
  9. research/docs/figures/curves.png +2 -2
  10. research/docs/hub/archive.md +21 -2
  11. research/docs/runbook.md +4 -0
  12. research/docs/study.json +0 -0
  13. research/reports/experiments/experiments.md +1 -0
  14. research/reports/experiments/learnings.md +2 -0
  15. research/reports/experiments/stories-hybrid-s23-always-r01/experiment.md +11 -0
  16. research/reports/experiments/stories-hybrid-s23-always-r01/learnings.md +5 -0
  17. research/reports/flatness.md +20 -0
  18. research/reports/paper.pdf +0 -0
  19. research/reports/planned-runs.md +4 -0
  20. research/reports/progress.md +1 -1
  21. research/reports/summary.md +1 -1
  22. research/results/stories-hybrid-s23-always-r01/config.json +21 -0
  23. research/results/stories-hybrid-s23-always-r01/events.jsonl +0 -0
  24. research/results/stories-hybrid-s23-always-r01/state.json +4 -0
  25. research/src/thirdloss/checkpoint_flatness.py +108 -0
  26. research/src/thirdloss/cli.py +10 -4
  27. research/src/thirdloss/flatness_stats.py +39 -0
  28. research/src/thirdloss/flatness_tables.py +110 -0
  29. research/src/thirdloss/readme_comparisons.py +30 -1
  30. research/src/thirdloss/report_paper.py +14 -0
  31. research/src/thirdloss/report_records.py +10 -1
  32. research/src/thirdloss/reporting.py +2 -0
  33. research/src/thirdloss/study.py +15 -10
  34. research/tests/test_flatness.py +40 -0
README.md CHANGED
@@ -18,11 +18,11 @@ Does penalizing changes in loss curvature improve next-token prediction? The stu
18
  | TinyStories pretraining · dev | one development pilot seed | 0.000045 lower | 0.000338 lower | 65.7% slower |
19
  | Pythia-410M adapters · dev | one development pilot seed | 0.000300 higher | 0.000273 higher | 88.6% slower |
20
 
21
- **Adaptive vs fixed-ramp hybrid** · 3/8 paired seeds. Adaptive development NLL was 0.000204 lower. It retained 0.0542 less directional width after the switch. More width is better for the registered geometry test. Whether more width improves prediction is unknown.
22
 
23
  Both primary test decisions are pending. Each stage requires eight paired test seeds and superiority over both baselines under Holm correction.
24
 
25
- [Side-by-side scores, accuracy, speed, memory and width](#side-by-side-comparisons) · [Live explorer](https://huggingface.co/spaces/BurnyCoder/thirdloss-explorer) · [Paired tests and intervals](https://huggingface.co/BurnyCoder/thirdloss-study/blob/main/research/reports/summary.md)
26
 
27
  ## Side-by-side comparisons
28
 
@@ -65,6 +65,25 @@ Awaiting paired test results (0 of 8 full-horizon training triplets).
65
 
66
  The equal-time row uses the last available fixed-window development score at or before the fastest run’s finish time in each seed. Full-split NLL uses every development target. Training speed includes regularizer probes. Adapter derivatives use CPU float64 with one GPU reserved. [Timing definitions and checkpoint lags](https://huggingface.co/BurnyCoder/thirdloss-study/blob/main/research/reports/summary.md)
67
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  ### TinyStories hybrid schedules
69
 
70
  **Adaptive vs fixed ramp · 3/8 paired seeds · 16,777,216 targets per run.** Both arms resume the same trace-trained checkpoint. Width change is final width minus width at the switch. A larger change means more width retained at the fixed loss tolerance. For two negative changes, the one closer to zero lost less width.
 
18
  | TinyStories pretraining · dev | one development pilot seed | 0.000045 lower | 0.000338 lower | 65.7% slower |
19
  | Pythia-410M adapters · dev | one development pilot seed | 0.000300 higher | 0.000273 higher | 88.6% slower |
20
 
21
+ **Adaptive vs fixed-ramp hybrid** · 3/8 paired seeds. Adaptive development NLL was 0.000204 lower. It retained 0.0542 less directional width after the switch. Median final widths were 13.157 (adaptive) and 13.215 (fixed). More width is better for the registered geometry test. Whether more width improves prediction is unknown.
22
 
23
  Both primary test decisions are pending. Each stage requires eight paired test seeds and superiority over both baselines under Holm correction.
24
 
25
+ [Side-by-side scores, accuracy, speed and memory](#side-by-side-comparisons) · [Flatness statistics](#flatness-of-the-trained-checkpoints) · [Live explorer](https://huggingface.co/spaces/BurnyCoder/thirdloss-explorer) · [Paired tests and intervals](https://huggingface.co/BurnyCoder/thirdloss-study/blob/main/research/reports/summary.md)
26
 
27
  ## Side-by-side comparisons
28
 
 
65
 
66
  The equal-time row uses the last available fixed-window development score at or before the fastest run’s finish time in each seed. Full-split NLL uses every development target. Training speed includes regularizer probes. Adapter derivatives use CPU float64 with one GPU reserved. [Timing definitions and checkpoint lags](https://huggingface.co/BurnyCoder/thirdloss-study/blob/main/research/reports/summary.md)
67
 
68
+ ### Flatness of the trained checkpoints
69
+
70
+ How far can the weights move before next-token loss rises by 0.1 nats on eight fixed training windows? We add the crossing distances on both sides of each of 16 unit directions, then take their median. **Wider is flatter** in these coordinates. Establishing a local minimum would also require a stationarity test. [Flat-minima paper](https://people.idsia.ch/~juergen/fm/node1.html) · [Coordinate dependence](https://proceedings.mlr.press/v70/dinh17b/dinh17b.pdf#page=2)
71
+
72
+ **TinyStories hybrids** · Each row names the completed seeds. Switch and final widths are medians over those seeds. The final seed range shows the smallest and largest seed widths. The middle 50% column gives the medians of the within-seed directional quartiles. Spread has no preferred direction. A ray at the search limit supplies a lower bound.
73
+
74
+ | Hybrid arm | Seeds | Switch width<br>↑ Wider is flatter | Final width<br>↑ Wider is flatter | Final seed range | Middle 50% of final directions | Rays at limit / tested |
75
+ | --- | --- | --- | --- | --- | --- | --- |
76
+ | Curvature-dependent hybrid | 21, 22, 23 | 15.143 | 13.157 | 13.048–13.215 | 12.984–13.368 | 0/96 |
77
+ | Fixed late hybrid | 21, 22, 23 | 15.143 | 13.215 | 13.103–13.268 | 13.036–13.411 | 0/96 |
78
+ | Hessian trace | 21, 22, 23 | 15.143 | 13.154 | 13.046–13.215 | 12.984–13.366 | 0/96 |
79
+ | Stronger trace | 21, 22, 23 | 15.143 | 13.175 | 13.069–13.233 | 13.002–13.387 | 0/96 |
80
+ | Cross-seed replay | 22 | 15.403 | 13.218 | One seed | 12.987–13.496 | 0/32 |
81
+ | Always-on hybrid | 21, 22 | 15.357 | 13.281 | 13.229–13.334 | 13.091–13.472 | 0/64 |
82
+
83
+ Matched finite-width and Hessian measurements for the primary AdamW, trace and third-order checkpoints are pending.
84
+
85
+ For the primary comparison, TinyStories uses all weights and Pythia uses the LoRA factors. Compare widths within each model. The link gives every run, directional bracket and Hessian probe. [Flatness statistics and raw files](https://huggingface.co/BurnyCoder/thirdloss-study/blob/main/research/reports/flatness.md) · [Secondary measurement design](https://huggingface.co/BurnyCoder/thirdloss-study/blob/main/research/reports/amendments/checkpoint-flatness.md)
86
+
87
  ### TinyStories hybrid schedules
88
 
89
  **Adaptive vs fixed ramp · 3/8 paired seeds · 16,777,216 targets per run.** Both arms resume the same trace-trained checkpoint. Width change is final width minus width at the switch. A larger change means more width retained at the fixed loss tolerance. For two negative changes, the one closer to zero lost less width.
logs/flatness-statistics-release.log ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ findfont: Failed to find font weight semibold for DejaVu Sans, now using 700.
2
+
3
+ Processing Files (0 / 0) : | | 0.00B / 0.00B
4
+
5
+ New Data Upload : | | 0.00B / 0.00B 
6
+
7
+
8
+ : 44%|####3 | 131kB / 299kB 
9
+
10
+
11
+ : 44%|####3 | 131kB / 299kB 
12
+ Processing Files (0 / 1) : 44%|####3 | 131kB / 299kB, ???B/s
13
+
14
+
15
+ : 44%|####3 | 131kB / 299kB 
16
+
17
+
18
+ : 44%|####3 | 131kB / 299kB 
19
+
20
+
21
+ : 44%|####3 | 131kB / 299kB 
22
+
23
+
24
+ : 44%|####3 | 131kB / 299kB 
25
+
26
+
27
+ : 44%|####3 | 131kB / 299kB 
28
+
29
+
30
+ : 44%|####3 | 131kB / 299kB 
31
+
32
+
33
+ : 44%|####3 | 131kB / 299kB 
34
+
35
+
36
+ : 100%|##########| 299kB / 299kB 
37
+ Processing Files (1 / 1) : 100%|##########| 299kB / 299kB, 28.3kB/s
38
+
39
+ New Data Upload : 100%|##########| 167kB / 167kB, 16.3kB/s 
40
+
41
+
42
+ : 100%|##########| 299kB / 299kB 
43
+
44
+
45
+ : 100%|##########| 299kB / 299kB 
46
+
47
+
48
+ : 100%|##########| 299kB / 299kB 
49
+
50
+
51
+ : 100%|##########| 299kB / 299kB 
52
+
53
+
54
+ : 100%|##########| 299kB / 299kB 
55
+
56
+
57
+ : 100%|##########| 299kB / 299kB 
58
+
59
+
60
+ : 100%|##########| 299kB / 299kB 
61
+
62
+
63
+ : 100%|##########| 299kB / 299kB 
64
+
65
+
66
+
67
+ Validating : | 0% 
68
+
69
+
70
+
71
+ Validating : | 0% 
72
+
73
+
74
+ : 100%|##########| 299kB / 299kB 
75
+
76
+
77
+
78
+ Validating : | 0% 
79
+
80
+
81
+ : 100%|##########| 299kB / 299kB 
82
+
83
+
84
+
85
+ Validating : ##########| 100% 
86
+
87
+
88
+ : 100%|##########| 299kB / 299kB 
89
+
90
+
91
+
92
+ Validating : ##########| 100% 
93
+ Processing Files (1 / 1) : 100%|##########| 299kB / 299kB, 25.4kB/s
94
+
95
+ New Data Upload : 100%|##########| 167kB / 167kB, 14.6kB/s
96
+
97
+ Validating : ##########| 100%
98
+
99
+ : 100%|##########| 299kB / 299kB
logs/flatness-statistics-render.log ADDED
@@ -0,0 +1 @@
 
 
1
+ findfont: Failed to find font weight semibold for DejaVu Sans, now using 700.
logs/stories-hybrid-s23-always-r01-20261125T162919301106Z.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
logs/study-20261125T162200Z-hybrid-confirmation.log CHANGED
The diff for this file is too large to render. See raw diff
 
logs/study-20261125T162200Z-hybrid-stderr.log CHANGED
@@ -798,3 +798,73 @@ findfont: Failed to find font weight semibold for DejaVu Sans, now using 700.
798
 
799
 
800
 
801
  : 100%|##########| 162kB / 162kB
 
 
 
 
802
  : 27%|##7 | 176kB / 651kB 
 
 
803
  : 27%|##7 | 176kB / 651kB 
 
 
804
  : 27%|##7 | 176kB / 651kB 
 
 
805
  : 100%|##########| 162kB / 162kB 
 
 
806
  : 100%|##########| 298kB / 298kB 
 
 
807
  : 100%|##########| 162kB / 162kB 
 
 
808
  : 27%|##7 | 176kB / 651kB 
 
 
809
  : 27%|##7 | 176kB / 651kB 
 
 
810
  : 100%|##########| 298kB / 298kB 
 
 
811
  : 100%|##########| 162kB / 162kB 
 
 
 
812
  : 100%|##########| 651kB / 651kB 
 
 
813
  : 100%|##########| 298kB / 298kB 
 
 
814
  : 100%|##########| 162kB / 162kB 
 
 
815
  : 100%|##########| 651kB / 651kB 
 
 
816
  : 100%|##########| 651kB / 651kB 
 
 
817
  : 100%|##########| 651kB / 651kB 
 
 
818
  : 100%|##########| 162kB / 162kB 
 
 
819
  : 100%|##########| 298kB / 298kB 
 
 
820
  : 100%|##########| 298kB / 298kB 
 
 
 
 
 
 
 
 
821
  : 100%|##########| 651kB / 651kB 
 
 
 
 
 
822
  : 100%|##########| 651kB / 651kB 
 
 
 
 
 
823
  : 100%|##########| 651kB / 651kB 
 
 
 
 
 
824
  : 100%|##########| 162kB / 162kB 
 
 
 
 
 
 
825
  : 100%|##########| 162kB / 162kB
 
798
 
799
 
800
 
801
  : 100%|##########| 162kB / 162kB
802
+
803
+
804
+
805
+
806
  : 27%|##7 | 176kB / 651kB 
807
+
808
+
809
  : 27%|##7 | 176kB / 651kB 
810
+
811
+
812
  : 27%|##7 | 176kB / 651kB 
813
+
814
+
815
  : 100%|##########| 162kB / 162kB 
816
+
817
+
818
  : 100%|##########| 298kB / 298kB 
819
+
820
+
821
  : 100%|##########| 162kB / 162kB 
822
+
823
+
824
  : 27%|##7 | 176kB / 651kB 
825
+
826
+
827
  : 27%|##7 | 176kB / 651kB 
828
+
829
+
830
  : 100%|##########| 298kB / 298kB 
831
+
832
+
833
  : 100%|##########| 162kB / 162kB 
834
+
835
+
836
+
837
  : 100%|##########| 651kB / 651kB 
838
+
839
+
840
  : 100%|##########| 298kB / 298kB 
841
+
842
+
843
  : 100%|##########| 162kB / 162kB 
844
+
845
+
846
  : 100%|##########| 651kB / 651kB 
847
+
848
+
849
  : 100%|##########| 651kB / 651kB 
850
+
851
+
852
  : 100%|##########| 651kB / 651kB 
853
+
854
+
855
  : 100%|##########| 162kB / 162kB 
856
+
857
+
858
  : 100%|##########| 298kB / 298kB 
859
+
860
+
861
  : 100%|##########| 298kB / 298kB 
862
+
863
+
864
+
865
+
866
+
867
+
868
+
869
+
870
  : 100%|##########| 651kB / 651kB 
871
+
872
+
873
+
874
+
875
+
876
  : 100%|##########| 651kB / 651kB 
877
+
878
+
879
+
880
+
881
+
882
  : 100%|##########| 651kB / 651kB 
883
+
884
+
885
+
886
+
887
+
888
  : 100%|##########| 162kB / 162kB 
889
+
890
+
891
+
892
+
893
+
894
+
895
  : 100%|##########| 162kB / 162kB
publication.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "collection": "BurnyCoder/third-derivatives-in-language-model-training-6b067fb7d5ae3eca49ebb378",
3
- "git_revision": "80b7dbbdea6bc793e06d675cb833b193d233784b",
4
  "repositories": {
5
  "BurnyCoder/thirdloss-arxiv-abstracts-2024": {
6
  "files": {
@@ -71,9 +71,9 @@
71
  "size": 63324
72
  },
73
  "figures/curves.png": {
74
- "git_blob": "78320ae79b4de1dfb619b425dfc1221fb7d4bebc",
75
- "sha256": "670de59d3ffd7346c45d0357f7f3077e6e0961e240e29e8cdcf55816415cf4e6",
76
- "size": 298132
77
  },
78
  "figures/hybrid_width.png": {
79
  "git_blob": "ca22402781a45551e8a09dba91aa142c8e546686",
@@ -91,12 +91,12 @@
91
  "size": 9426
92
  },
93
  "study.json": {
94
- "git_blob": "c0ec3843eeba54394ea32167c649fc6dadb03252",
95
- "sha256": "6e2addebe4658d288a418863a1f0fe1454ce788673215c7b18cc1cf607a9a800",
96
- "size": 2374581
97
  }
98
  },
99
- "revision": "4682cbe6626766ea3301575a6e5b6c1726a00a91",
100
  "type": "space"
101
  },
102
  "BurnyCoder/thirdloss-pythia-410m-adapters": {
@@ -1384,9 +1384,9 @@
1384
  "BurnyCoder/thirdloss-study": {
1385
  "files": {
1386
  "README.md": {
1387
- "git_blob": "353ad8e01d6fc573b4cab4b6d4a91f185ccea24d",
1388
- "sha256": "be087f897703b309a4c9b733731a966644fcdcaa56576ff80c16aa7debc4a8f5",
1389
- "size": 14476
1390
  },
1391
  "logs/abstracts-control-s00-initial-r00-20261125T083205378751Z.jsonl": {
1392
  "git_blob": "7afe7d20a699dfd5a611daca6298f2fa091c694c",
@@ -1488,6 +1488,16 @@
1488
  "sha256": "1c73007c107dd521eed1fea4cd5cde00d25fca4863773228d18e29582eae50dd",
1489
  "size": 7536
1490
  },
 
 
 
 
 
 
 
 
 
 
1491
  "logs/hybrid-acceptance-after-release-recovery.log": {
1492
  "git_blob": "ebc1e2b4c8e3f73dd0be49d41f58b0346cc1ac24",
1493
  "sha256": "caf0a0c1cf35f6902dc455d76545f82d302019198497abedcff33456443ad331",
@@ -1713,6 +1723,11 @@
1713
  "sha256": "ba8375ec11a2601401130261a0737b69481ce2c0058a632e48297e99fe6c1166",
1714
  "size": 299647
1715
  },
 
 
 
 
 
1716
  "logs/stories-hybrid-s23-late-r01-20261125T161151415908Z.jsonl": {
1717
  "git_blob": "7f694eeccaef3cb6c0a5df0bd167e66c697a3508",
1718
  "sha256": "0c17d371a4f967be26fface328f84af4b11ce2161c3254f29f011c7a7b3a7d4e",
@@ -1839,14 +1854,14 @@
1839
  "size": 298981
1840
  },
1841
  "logs/study-20261125T162200Z-hybrid-confirmation.log": {
1842
- "git_blob": "77a4513f94d355dce5847ed81faa87f3c369ead2",
1843
- "sha256": "ad8e9889cfb4a5040a3c59e172178d1e870757ea9942e2cde638c6333c5de6d0",
1844
- "size": 513529
1845
  },
1846
  "logs/study-20261125T162200Z-hybrid-stderr.log": {
1847
- "git_blob": "8bd00561bf7a50bd3a1ba527d8d5141c9da71bcf",
1848
- "sha256": "0177e8d2cae89eed86c28edee92f45c8b184b0e2cf10136c3eaed98c65756c65",
1849
- "size": 47394
1850
  },
1851
  "logs/transient-outage-recovery.log": {
1852
  "git_blob": "e442d6a630c2557f3608a8db31739af52ecfba2f",
@@ -1919,9 +1934,9 @@
1919
  "size": 786
1920
  },
1921
  "research/README.md": {
1922
- "git_blob": "97e252c326710752bef2ba2d24a7a7716b3636fd",
1923
- "sha256": "5b8e4cf6488e2e178de134b540bb29f9913706c3df63179f47d92dd0691ddf85",
1924
- "size": 28220
1925
  },
1926
  "research/docs/data.md": {
1927
  "git_blob": "1d0a74102cee4ed06b783085ca2ce823c6bf3a42",
@@ -1944,9 +1959,9 @@
1944
  "size": 63324
1945
  },
1946
  "research/docs/figures/curves.png": {
1947
- "git_blob": "78320ae79b4de1dfb619b425dfc1221fb7d4bebc",
1948
- "sha256": "670de59d3ffd7346c45d0357f7f3077e6e0961e240e29e8cdcf55816415cf4e6",
1949
- "size": 298132
1950
  },
1951
  "research/docs/figures/hybrid_width.png": {
1952
  "git_blob": "ca22402781a45551e8a09dba91aa142c8e546686",
@@ -1974,9 +1989,9 @@
1974
  "size": 1583
1975
  },
1976
  "research/docs/hub/archive.md": {
1977
- "git_blob": "353ad8e01d6fc573b4cab4b6d4a91f185ccea24d",
1978
- "sha256": "be087f897703b309a4c9b733731a966644fcdcaa56576ff80c16aa7debc4a8f5",
1979
- "size": 14476
1980
  },
1981
  "research/docs/hub/space.md": {
1982
  "git_blob": "156f128287f1772dc3f22b423fbfb268f53b0136",
@@ -1994,14 +2009,14 @@
1994
  "size": 9722
1995
  },
1996
  "research/docs/runbook.md": {
1997
- "git_blob": "76247b9147dee26dea4c78f0ae5884149c4053fe",
1998
- "sha256": "d6432066f7679cbf07c71ef602b580297acfed7d0748b81df60c79919c216a91",
1999
- "size": 8150
2000
  },
2001
  "research/docs/study.json": {
2002
- "git_blob": "c0ec3843eeba54394ea32167c649fc6dadb03252",
2003
- "sha256": "6e2addebe4658d288a418863a1f0fe1454ce788673215c7b18cc1cf607a9a800",
2004
- "size": 2374581
2005
  },
2006
  "research/docs/third-derivative-penalty.md": {
2007
  "git_blob": "ef2f9eaf958073e25771c60e97a4ce10b2a1b687",
@@ -2134,14 +2149,14 @@
2134
  "size": 231
2135
  },
2136
  "research/reports/experiments/experiments.md": {
2137
- "git_blob": "7b172a700fc52fad6ace53d6da50bfa36ac7427a",
2138
- "sha256": "34edbdc00265b9ef34c16e29b73e4fdaab64fb64f800e6b0f00d27fec42a33a6",
2139
- "size": 8142
2140
  },
2141
  "research/reports/experiments/learnings.md": {
2142
- "git_blob": "4eb484e6728a7b793d8085f778a9b4b68ffdfa70",
2143
- "sha256": "fbf89e313216a5d301bed1221f90b3a8a20dc12c2f4fc19d54ac1b5d291bb203",
2144
- "size": 10978
2145
  },
2146
  "research/reports/experiments/stories-branch-s21-trunk-r01/experiment.md": {
2147
  "git_blob": "89dd0c1f4c4edd8fc49122a9b2f2076d744f9d27",
@@ -2313,6 +2328,16 @@
2313
  "sha256": "897bb832a68259c2071020451676b65942eb1f6eb86906c4f914d9c4d0ceaad5",
2314
  "size": 239
2315
  },
 
 
 
 
 
 
 
 
 
 
2316
  "research/reports/experiments/stories-hybrid-s23-late-r01/experiment.md": {
2317
  "git_blob": "f9baf26b8c22d00021f06c4ef80f91eda0d79f68",
2318
  "sha256": "c28d00bafafce72df091c83bac6afb107cbbe395bac90c84ecbcedfd131a1782",
@@ -2443,6 +2468,11 @@
2443
  "sha256": "15c41a3c246321a34f5bded221d9c447f5066340d94a604a957ce1439b0a212f",
2444
  "size": 236
2445
  },
 
 
 
 
 
2446
  "research/reports/hybrid/preregistration.md": {
2447
  "git_blob": "0729e47d30933f401253bf21feac164c0217f7b4",
2448
  "sha256": "ee367dea7be8b4dea20e364c45b5203f0613c172e015260fd3470ec1b96f5ea9",
@@ -2459,9 +2489,9 @@
2459
  "size": 7290
2460
  },
2461
  "research/reports/paper.pdf": {
2462
- "git_blob": "ac9fac3813d6806b5797ea4294d540d0e163851b",
2463
- "sha256": "3ba668763cacc49b8ee80acd80c91f47c5c6b18515c266a3f33512e424077513",
2464
- "size": 651174
2465
  },
2466
  "research/reports/plan.md": {
2467
  "git_blob": "d15ec7b2f2324e3aedb389d2fd95208a31978596",
@@ -2469,9 +2499,9 @@
2469
  "size": 8376
2470
  },
2471
  "research/reports/planned-runs.md": {
2472
- "git_blob": "d7435aa254c867979fd9a3edc26367af6809eb55",
2473
- "sha256": "23f3b3db66996723511d0e0572518c4a7f8d15c0131b71b70bd91d041731f1ad",
2474
- "size": 2440
2475
  },
2476
  "research/reports/preregistration.md": {
2477
  "git_blob": "3411a501f8cb3f3be0d31b70ee410094dae5dd95",
@@ -2479,8 +2509,8 @@
2479
  "size": 5234
2480
  },
2481
  "research/reports/progress.md": {
2482
- "git_blob": "5468d519cd3013ddfc36696fbcffa9550c1c528e",
2483
- "sha256": "7adc8e5351b57ef20bd474a10a544478e0fba315d8f5f544765e0f1021f330bf",
2484
  "size": 2289
2485
  },
2486
  "research/reports/reviews/adapter-verification.md": {
@@ -2504,8 +2534,8 @@
2504
  "size": 1740
2505
  },
2506
  "research/reports/summary.md": {
2507
- "git_blob": "2696df59c88bea2341cfd812d5c4b18fbcecd531",
2508
- "sha256": "1bb48a69c8d345cbe9e29c51d5827defa15152b89e0610903e4b8422303a0dac",
2509
  "size": 4222
2510
  },
2511
  "research/results/abstracts-control-s00-initial-r00/config.json": {
@@ -3533,6 +3563,21 @@
3533
  "sha256": "e406e39b78d6ca8de037d25d184988c5dc1666f74d71a7b1b87b1846179edf13",
3534
  "size": 3762
3535
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3536
  "research/results/stories-hybrid-s23-late-r01/config.json": {
3537
  "git_blob": "b4ac20b62628bc70833cb299c8328b1741c16c4e",
3538
  "sha256": "8c5f344e258a1d58cc794b3873dd39b5cb7ef029058358804b814834c32a307e",
@@ -3948,10 +3993,15 @@
3948
  "sha256": "a3c6fed1e4c506513f521823a59ff21174010552948dc09094649412176b14d9",
3949
  "size": 9767
3950
  },
 
 
 
 
 
3951
  "research/src/thirdloss/cli.py": {
3952
- "git_blob": "a3b3e960f5705c22d2f519034bbf8c338909f52a",
3953
- "sha256": "5729736c62a35b893dff9839f7e235d04002006a81b2a9f09ca89888271e1622",
3954
- "size": 7175
3955
  },
3956
  "research/src/thirdloss/data.py": {
3957
  "git_blob": "9b06438a0bce64f8d491cd65156ebe8aa04e8916",
@@ -3963,6 +4013,16 @@
3963
  "sha256": "3484e9ff0337448c3c2dc068c20a4d48d8d02726fbe33a5df947df267d4a7307",
3964
  "size": 4522
3965
  },
 
 
 
 
 
 
 
 
 
 
3966
  "research/src/thirdloss/hub_archive.py": {
3967
  "git_blob": "9a24c6c6f0f3f6e06fa43c775b47a5a03c1d12f6",
3968
  "sha256": "928d4a2bf9fb55094604ab1b1b070dd8c9ed62e8dc7336dd303e6b4d24ce13c9",
@@ -4019,9 +4079,9 @@
4019
  "size": 11879
4020
  },
4021
  "research/src/thirdloss/readme_comparisons.py": {
4022
- "git_blob": "56257d3d0605357957a088c3f820a5cc94b4f7a6",
4023
- "sha256": "353344b424625052e19301714b2b94bcfcf766b8a34ce7e40ffee8440d74abae",
4024
- "size": 19443
4025
  },
4026
  "research/src/thirdloss/records.py": {
4027
  "git_blob": "a800de00d42944f13a89d8d2f91ce9b2103bbd45",
@@ -4039,24 +4099,24 @@
4039
  "size": 10129
4040
  },
4041
  "research/src/thirdloss/report_paper.py": {
4042
- "git_blob": "e892bfa4df31b981f6d7b1deff249ad8f5fab66c",
4043
- "sha256": "cf6c6b91435461816ec7a17747dcb1e7ac10053e39866e8b57154602f643f892",
4044
- "size": 33672
4045
  },
4046
  "research/src/thirdloss/report_records.py": {
4047
- "git_blob": "2d8a9c6ec55e68db2e67d03dafd77d14e2608bc7",
4048
- "sha256": "8c7b10fe4b513fac752e8b3d581ecb034e8b8fd618a839830d968edb1294bc28",
4049
- "size": 13925
4050
  },
4051
  "research/src/thirdloss/reporting.py": {
4052
- "git_blob": "b1008d0f0117894548fad2ddbb5498e7e21809fa",
4053
- "sha256": "0a356d46ca776acb3dfa4e71a9fcb7c7c08d33775e51e378da649b5d4fb58eef",
4054
- "size": 21439
4055
  },
4056
  "research/src/thirdloss/study.py": {
4057
- "git_blob": "f614c1a8d70f4e8b5b2738d6e26633b0e9ee6f98",
4058
- "sha256": "5c50ceb57f85202e1c4c5a128e90c8166a0a0cf7e9a96c024160524ca8a2f2d6",
4059
- "size": 12180
4060
  },
4061
  "research/src/thirdloss/train.py": {
4062
  "git_blob": "3c16d7419d10d1709d4a168ad7765909fbef77a6",
@@ -4093,6 +4153,11 @@
4093
  "sha256": "46075bbd8d3b229367ac5ebfc7068552d2e4711c901967e7f28e315cd738c92f",
4094
  "size": 16607
4095
  },
 
 
 
 
 
4096
  "research/tests/test_hub_archive.py": {
4097
  "git_blob": "4c8dc24e6eb5f0aa7fc5e63be56ba0efa3ad4ec4",
4098
  "sha256": "8482210735ca590533b325c5473d7b4483063c01efe16e8d97cd41e737466df4",
@@ -4173,5 +4238,5 @@
4173
  "type": "dataset"
4174
  }
4175
  },
4176
- "verified_at": "2026-11-25T16:29:12+00:00"
4177
  }
 
1
  {
2
  "collection": "BurnyCoder/third-derivatives-in-language-model-training-6b067fb7d5ae3eca49ebb378",
3
+ "git_revision": "24dd4f047835f2fee6fa4f9f861e62098ccba704",
4
  "repositories": {
5
  "BurnyCoder/thirdloss-arxiv-abstracts-2024": {
6
  "files": {
 
71
  "size": 63324
72
  },
73
  "figures/curves.png": {
74
+ "git_blob": "e09b74ea4fda7716e11759509fd17472b0fab9bc",
75
+ "sha256": "71a940709aef0d4ccaa56e44157b00462cdc6577d5341300cd5cc782a32d747f",
76
+ "size": 298560
77
  },
78
  "figures/hybrid_width.png": {
79
  "git_blob": "ca22402781a45551e8a09dba91aa142c8e546686",
 
91
  "size": 9426
92
  },
93
  "study.json": {
94
+ "git_blob": "4934960d29c24a259964c8d3ec50af7660aa61b4",
95
+ "sha256": "64f3b88527beacc9ff852eea47b6aa891d7db84217b774092b6537fc5eb2a99b",
96
+ "size": 2479444
97
  }
98
  },
99
+ "revision": "96fe47249cb3fdd88445ba5df6a7c7b48d71b6b7",
100
  "type": "space"
101
  },
102
  "BurnyCoder/thirdloss-pythia-410m-adapters": {
 
1384
  "BurnyCoder/thirdloss-study": {
1385
  "files": {
1386
  "README.md": {
1387
+ "git_blob": "abb8c1abe2b5be5734ab8a06752b65fbe7b0f066",
1388
+ "sha256": "7f11e9892179cdca9b86baf6e9d7aeab6b87a4338a4877e24c1a959eea23684e",
1389
+ "size": 16818
1390
  },
1391
  "logs/abstracts-control-s00-initial-r00-20261125T083205378751Z.jsonl": {
1392
  "git_blob": "7afe7d20a699dfd5a611daca6298f2fa091c694c",
 
1488
  "sha256": "1c73007c107dd521eed1fea4cd5cde00d25fca4863773228d18e29582eae50dd",
1489
  "size": 7536
1490
  },
1491
+ "logs/flatness-statistics-release.log": {
1492
+ "git_blob": "2c365d0debe01e9d61910ea96d495e7ce92210ec",
1493
+ "sha256": "9f59fe5d2cb44ce6a055e62750c48b18d69edb456c6583e696eb9adcbb59e260",
1494
+ "size": 3008
1495
+ },
1496
+ "logs/flatness-statistics-render.log": {
1497
+ "git_blob": "37bbb4bdbd164007d9e8e84ddbdb5e73b2a11e1d",
1498
+ "sha256": "2ae7e37a0d60013de1b3d6870314f24554d6f4af83d0ce06b372b1eed3a9b1c6",
1499
+ "size": 79
1500
+ },
1501
  "logs/hybrid-acceptance-after-release-recovery.log": {
1502
  "git_blob": "ebc1e2b4c8e3f73dd0be49d41f58b0346cc1ac24",
1503
  "sha256": "caf0a0c1cf35f6902dc455d76545f82d302019198497abedcff33456443ad331",
 
1723
  "sha256": "ba8375ec11a2601401130261a0737b69481ce2c0058a632e48297e99fe6c1166",
1724
  "size": 299647
1725
  },
1726
+ "logs/stories-hybrid-s23-always-r01-20261125T162919301106Z.jsonl": {
1727
+ "git_blob": "519f15502b1b7737603207abf9a14925a07e685b",
1728
+ "sha256": "b50ebec99759bb07a33d6d35c6d1d004cc75d2f1ca0d9212f987cb41bda2ce1a",
1729
+ "size": 232853
1730
+ },
1731
  "logs/stories-hybrid-s23-late-r01-20261125T161151415908Z.jsonl": {
1732
  "git_blob": "7f694eeccaef3cb6c0a5df0bd167e66c697a3508",
1733
  "sha256": "0c17d371a4f967be26fface328f84af4b11ce2161c3254f29f011c7a7b3a7d4e",
 
1854
  "size": 298981
1855
  },
1856
  "logs/study-20261125T162200Z-hybrid-confirmation.log": {
1857
+ "git_blob": "fa54880afe0f18268f65fd14619e52ddab02ae3c",
1858
+ "sha256": "b0cd6d1e153968380f032c47b83c6bc79ea276fe92140dfc178cc8a790503896",
1859
+ "size": 746382
1860
  },
1861
  "logs/study-20261125T162200Z-hybrid-stderr.log": {
1862
+ "git_blob": "c496508cca128ee67b6e0c8ef1d14da869a78c60",
1863
+ "sha256": "be6368c3191866e0432221bf189b4bc57851ca2a7943f2b33a603f23ef78d099",
1864
+ "size": 50538
1865
  },
1866
  "logs/transient-outage-recovery.log": {
1867
  "git_blob": "e442d6a630c2557f3608a8db31739af52ecfba2f",
 
1934
  "size": 786
1935
  },
1936
  "research/README.md": {
1937
+ "git_blob": "32312bfe5237a8962881c7a5c1d7edebb02917e5",
1938
+ "sha256": "9e2dac8376164928b917801dc23faa792efd188382f1c290b1378c1c1c53d33e",
1939
+ "size": 30424
1940
  },
1941
  "research/docs/data.md": {
1942
  "git_blob": "1d0a74102cee4ed06b783085ca2ce823c6bf3a42",
 
1959
  "size": 63324
1960
  },
1961
  "research/docs/figures/curves.png": {
1962
+ "git_blob": "e09b74ea4fda7716e11759509fd17472b0fab9bc",
1963
+ "sha256": "71a940709aef0d4ccaa56e44157b00462cdc6577d5341300cd5cc782a32d747f",
1964
+ "size": 298560
1965
  },
1966
  "research/docs/figures/hybrid_width.png": {
1967
  "git_blob": "ca22402781a45551e8a09dba91aa142c8e546686",
 
1989
  "size": 1583
1990
  },
1991
  "research/docs/hub/archive.md": {
1992
+ "git_blob": "abb8c1abe2b5be5734ab8a06752b65fbe7b0f066",
1993
+ "sha256": "7f11e9892179cdca9b86baf6e9d7aeab6b87a4338a4877e24c1a959eea23684e",
1994
+ "size": 16818
1995
  },
1996
  "research/docs/hub/space.md": {
1997
  "git_blob": "156f128287f1772dc3f22b423fbfb268f53b0136",
 
2009
  "size": 9722
2010
  },
2011
  "research/docs/runbook.md": {
2012
+ "git_blob": "8eba3ba417f5afe4f2e988e3a84b3f419e49228c",
2013
+ "sha256": "830d2a91819b7af6c003ad3c9de767ff269726626f8d9393a45678a548f261da",
2014
+ "size": 8770
2015
  },
2016
  "research/docs/study.json": {
2017
+ "git_blob": "4934960d29c24a259964c8d3ec50af7660aa61b4",
2018
+ "sha256": "64f3b88527beacc9ff852eea47b6aa891d7db84217b774092b6537fc5eb2a99b",
2019
+ "size": 2479444
2020
  },
2021
  "research/docs/third-derivative-penalty.md": {
2022
  "git_blob": "ef2f9eaf958073e25771c60e97a4ce10b2a1b687",
 
2149
  "size": 231
2150
  },
2151
  "research/reports/experiments/experiments.md": {
2152
+ "git_blob": "30ceba45f5d7169cfbe61cb136e660953ac341a4",
2153
+ "sha256": "edc12303200395d6ef89bd117ad0b90c7b35fd2a449c1d86b30356ee480f2aaf",
2154
+ "size": 8324
2155
  },
2156
  "research/reports/experiments/learnings.md": {
2157
+ "git_blob": "f5ba2ba5bc57ad53ad46cb4812202d8b2e7fbef6",
2158
+ "sha256": "8a5244505377b865520701d0d861543a0fc20205c1d456c48c3595d9b2dc2214",
2159
+ "size": 11235
2160
  },
2161
  "research/reports/experiments/stories-branch-s21-trunk-r01/experiment.md": {
2162
  "git_blob": "89dd0c1f4c4edd8fc49122a9b2f2076d744f9d27",
 
2328
  "sha256": "897bb832a68259c2071020451676b65942eb1f6eb86906c4f914d9c4d0ceaad5",
2329
  "size": 239
2330
  },
2331
+ "research/reports/experiments/stories-hybrid-s23-always-r01/experiment.md": {
2332
+ "git_blob": "e2135815da44d432da481f3906200b750b245b54",
2333
+ "sha256": "b8618d03570ec1f7fda341ec2a4bd63109bbf26531f9f94d04fe58f069c965a5",
2334
+ "size": 732
2335
+ },
2336
+ "research/reports/experiments/stories-hybrid-s23-always-r01/learnings.md": {
2337
+ "git_blob": "906035924ee5319b04731e7b43157a04ac69b423",
2338
+ "sha256": "0b90302f32c3b68d62211db74858d9757438a964339f43a8046a363b7491eef7",
2339
+ "size": 236
2340
+ },
2341
  "research/reports/experiments/stories-hybrid-s23-late-r01/experiment.md": {
2342
  "git_blob": "f9baf26b8c22d00021f06c4ef80f91eda0d79f68",
2343
  "sha256": "c28d00bafafce72df091c83bac6afb107cbbe395bac90c84ecbcedfd131a1782",
 
2468
  "sha256": "15c41a3c246321a34f5bded221d9c447f5066340d94a604a957ce1439b0a212f",
2469
  "size": 236
2470
  },
2471
+ "research/reports/flatness.md": {
2472
+ "git_blob": "7cce4a367335bd1b7f9d4026e1e089a06718b9ea",
2473
+ "sha256": "daabfbd09a7223429f77bac184f4b93fdc2c75feda39e18d47269d83438ab9f3",
2474
+ "size": 1461
2475
+ },
2476
  "research/reports/hybrid/preregistration.md": {
2477
  "git_blob": "0729e47d30933f401253bf21feac164c0217f7b4",
2478
  "sha256": "ee367dea7be8b4dea20e364c45b5203f0613c172e015260fd3470ec1b96f5ea9",
 
2489
  "size": 7290
2490
  },
2491
  "research/reports/paper.pdf": {
2492
+ "git_blob": "8169f84ad780653f8e6bd8832980decb3fa52e37",
2493
+ "sha256": "a9d8d5119992be8e5a4ae98a1dffbe95feaadd2a0362e6efce6bb91faea08e18",
2494
+ "size": 654170
2495
  },
2496
  "research/reports/plan.md": {
2497
  "git_blob": "d15ec7b2f2324e3aedb389d2fd95208a31978596",
 
2499
  "size": 8376
2500
  },
2501
  "research/reports/planned-runs.md": {
2502
+ "git_blob": "0384622ea612424eb7ff96cf1221542561310aa2",
2503
+ "sha256": "3beee743e90034cf859ae089548738826571c5d401142302a50018f134a8bef9",
2504
+ "size": 2942
2505
  },
2506
  "research/reports/preregistration.md": {
2507
  "git_blob": "3411a501f8cb3f3be0d31b70ee410094dae5dd95",
 
2509
  "size": 5234
2510
  },
2511
  "research/reports/progress.md": {
2512
+ "git_blob": "7461cdab37e998dd6f0997650a0bf0bcd7ff950a",
2513
+ "sha256": "0fe59428f6404bf2a1bf9a3dd05ba84bd47520f966c16f6158adf59659058030",
2514
  "size": 2289
2515
  },
2516
  "research/reports/reviews/adapter-verification.md": {
 
2534
  "size": 1740
2535
  },
2536
  "research/reports/summary.md": {
2537
+ "git_blob": "4a7bc843694892621453a031c404ec01d0b8d142",
2538
+ "sha256": "10cf7554100641b6c14b01352d8aab56424a0ff2746914358cd898e9204fef2b",
2539
  "size": 4222
2540
  },
2541
  "research/results/abstracts-control-s00-initial-r00/config.json": {
 
3563
  "sha256": "e406e39b78d6ca8de037d25d184988c5dc1666f74d71a7b1b87b1846179edf13",
3564
  "size": 3762
3565
  },
3566
+ "research/results/stories-hybrid-s23-always-r01/config.json": {
3567
+ "git_blob": "d96780398e0ae877171dc0f99aeee7e9ac7c4e54",
3568
+ "sha256": "d8fe1880a7a3d91a3eb60228d2a3e58f65afe1e521ed39a91598cd127e61dc8f",
3569
+ "size": 540
3570
+ },
3571
+ "research/results/stories-hybrid-s23-always-r01/events.jsonl": {
3572
+ "git_blob": "d39fa6575991e678e4c675dd9b9a240697c2bc14",
3573
+ "sha256": "a8f7c19081e64b8155f1ff2825069e6b62008e790e364ead6b16b51ffcc966ba",
3574
+ "size": 218670
3575
+ },
3576
+ "research/results/stories-hybrid-s23-always-r01/state.json": {
3577
+ "git_blob": "61a5eb894aee290a4a4bbc58f808853b1727914a",
3578
+ "sha256": "7a1c71c2f4ddd75e67723dbb3dc93d512a5fae4376170330ba6020a672f30c50",
3579
+ "size": 71
3580
+ },
3581
  "research/results/stories-hybrid-s23-late-r01/config.json": {
3582
  "git_blob": "b4ac20b62628bc70833cb299c8328b1741c16c4e",
3583
  "sha256": "8c5f344e258a1d58cc794b3873dd39b5cb7ef029058358804b814834c32a307e",
 
3993
  "sha256": "a3c6fed1e4c506513f521823a59ff21174010552948dc09094649412176b14d9",
3994
  "size": 9767
3995
  },
3996
+ "research/src/thirdloss/checkpoint_flatness.py": {
3997
+ "git_blob": "e983ebbf16c8059a2f793572432db6dfcea3d8bf",
3998
+ "sha256": "6309ce5832b4d6818cf629c8d4d3a6ba53efb8a3dc30bf96d792caa12d35007e",
3999
+ "size": 6022
4000
+ },
4001
  "research/src/thirdloss/cli.py": {
4002
+ "git_blob": "34cc6eced796b43f30098c099d8793feabf0cf5b",
4003
+ "sha256": "d565ffe0786ac64130dd0424ca4ec481c1c623517986ad5fa06b062c52235ca6",
4004
+ "size": 7519
4005
  },
4006
  "research/src/thirdloss/data.py": {
4007
  "git_blob": "9b06438a0bce64f8d491cd65156ebe8aa04e8916",
 
4013
  "sha256": "3484e9ff0337448c3c2dc068c20a4d48d8d02726fbe33a5df947df267d4a7307",
4014
  "size": 4522
4015
  },
4016
+ "research/src/thirdloss/flatness_stats.py": {
4017
+ "git_blob": "0069e0f952944d0f654ff50452806bd4cea46666",
4018
+ "sha256": "496cd383749c625c1dd144140fbd5a2c8f9b6434abdad0eaa807e70bdfbb4d1e",
4019
+ "size": 1671
4020
+ },
4021
+ "research/src/thirdloss/flatness_tables.py": {
4022
+ "git_blob": "394de00d7f372bf13a65c719da7aa7a4bd7e28f2",
4023
+ "sha256": "004becde1c9f1fd973168f73c28546b2e947e6e4c5e2f8c2c36f5e6bf9292c67",
4024
+ "size": 6080
4025
+ },
4026
  "research/src/thirdloss/hub_archive.py": {
4027
  "git_blob": "9a24c6c6f0f3f6e06fa43c775b47a5a03c1d12f6",
4028
  "sha256": "928d4a2bf9fb55094604ab1b1b070dd8c9ed62e8dc7336dd303e6b4d24ce13c9",
 
4079
  "size": 11879
4080
  },
4081
  "research/src/thirdloss/readme_comparisons.py": {
4082
+ "git_blob": "5eb8cbe7f97614e9d51884ac2f3bf7469465467a",
4083
+ "sha256": "0f809cc7f64294eea36134a02cde998207188f4260e9a75423c6d92765a7bdae",
4084
+ "size": 21971
4085
  },
4086
  "research/src/thirdloss/records.py": {
4087
  "git_blob": "a800de00d42944f13a89d8d2f91ce9b2103bbd45",
 
4099
  "size": 10129
4100
  },
4101
  "research/src/thirdloss/report_paper.py": {
4102
+ "git_blob": "18bb353ecd39bcab4b206df072794d482c4ac822",
4103
+ "sha256": "f611c0035f097b4f5e611a11e309b854fdc94d0481ef04b35d804218a5165f78",
4104
+ "size": 34900
4105
  },
4106
  "research/src/thirdloss/report_records.py": {
4107
+ "git_blob": "bc616f783fbb2266b820cf3a25e173d6c2bb0561",
4108
+ "sha256": "e1751c3597ff420a44e354e05fe90d9b73662ea27f5e65a8997a94cca6008c87",
4109
+ "size": 14551
4110
  },
4111
  "research/src/thirdloss/reporting.py": {
4112
+ "git_blob": "206d59a27fae7713677392a8e9d32769a7437239",
4113
+ "sha256": "68ff0fca6554c91c0a77318e2ada25ea821a725f4b683775a89bf787101586bc",
4114
+ "size": 21553
4115
  },
4116
  "research/src/thirdloss/study.py": {
4117
+ "git_blob": "d3ef0cf8d4b40e1ce0f6996eedb8ee24415a86ab",
4118
+ "sha256": "d5b1782a1a2ece89c5c0f11256a235dd3d004c2b536b4a4c2366111e6e981e19",
4119
+ "size": 12406
4120
  },
4121
  "research/src/thirdloss/train.py": {
4122
  "git_blob": "3c16d7419d10d1709d4a168ad7765909fbef77a6",
 
4153
  "sha256": "46075bbd8d3b229367ac5ebfc7068552d2e4711c901967e7f28e315cd738c92f",
4154
  "size": 16607
4155
  },
4156
+ "research/tests/test_flatness.py": {
4157
+ "git_blob": "199cdb9adbfc7975c963b72b82640b8251b3facb",
4158
+ "sha256": "31df67a8ebcde21eeba0c42d9cb03eca88b30a4e2bcad0cfe9117d19e579778f",
4159
+ "size": 2166
4160
+ },
4161
  "research/tests/test_hub_archive.py": {
4162
  "git_blob": "4c8dc24e6eb5f0aa7fc5e63be56ba0efa3ad4ec4",
4163
  "sha256": "8482210735ca590533b325c5473d7b4483063c01efe16e8d97cd41e737466df4",
 
4238
  "type": "dataset"
4239
  }
4240
  },
4241
+ "verified_at": "2026-11-25T16:32:59+00:00"
4242
  }
research/README.md CHANGED
@@ -15,11 +15,11 @@ The research background includes flat minima, Hessian measurements and third der
15
  | TinyStories pretraining · dev | one development pilot seed | 0.000045 lower | 0.000338 lower | 65.7% slower |
16
  | Pythia-410M adapters · dev | one development pilot seed | 0.000300 higher | 0.000273 higher | 88.6% slower |
17
 
18
- **Adaptive vs fixed-ramp hybrid** · 3/8 paired seeds. Adaptive development NLL was 0.000204 lower. It retained 0.0542 less directional width after the switch. More width is better for the registered geometry test. Whether more width improves prediction is unknown.
19
 
20
  Both primary test decisions are pending. Each stage requires eight paired test seeds and superiority over both baselines under Holm correction.
21
 
22
- [Side-by-side scores, accuracy, speed, memory and width](#side-by-side-comparisons) · [Live explorer](https://huggingface.co/spaces/BurnyCoder/thirdloss-explorer) · [Paired tests and intervals](reports/summary.md)
23
 
24
  <!-- READOUT:END -->
25
 
@@ -108,6 +108,25 @@ Awaiting paired test results (0 of 8 full-horizon training triplets).
108
 
109
  The equal-time row uses the last available fixed-window development score at or before the fastest run’s finish time in each seed. Full-split NLL uses every development target. Training speed includes regularizer probes. Adapter derivatives use CPU float64 with one GPU reserved. [Timing definitions and checkpoint lags](reports/summary.md)
110
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  ### TinyStories hybrid schedules
112
 
113
  **Adaptive vs fixed ramp · 3/8 paired seeds · 16,777,216 targets per run.** Both arms resume the same trace-trained checkpoint. Width change is final width minus width at the switch. A larger change means more width retained at the fixed loss tolerance. For two negative changes, the one closer to zero lost less width.
@@ -191,7 +210,7 @@ Each panel shows the first saved prompt and full continuations from the lowest m
191
 
192
  [Explore the results](https://burnycoder.github.io/llm-training-with-penalizing-rapid-changes-of-curvature-of-its-loss-with-derivative-of-hessian/) · [Hugging Face explorer](https://huggingface.co/spaces/BurnyCoder/thirdloss-explorer) · [Hugging Face collection](https://huggingface.co/collections/BurnyCoder/third-derivatives-in-language-model-training-6b067fb7d5ae3eca49ebb378) · [Paper](reports/paper.pdf) · [Run ledger](reports/experiments/experiments.md)
193
 
194
- Recorded 41 runs, including 40 with a completed summary.
195
 
196
  TinyStories hybrid follow-up: 15 of 48 full runs and 3 of 8 shared checkpoints complete. Geometric decision: awaiting eight paired width measurements. [Width measurements, scores and controls](reports/hybrid/results.md)
197
 
 
15
  | TinyStories pretraining · dev | one development pilot seed | 0.000045 lower | 0.000338 lower | 65.7% slower |
16
  | Pythia-410M adapters · dev | one development pilot seed | 0.000300 higher | 0.000273 higher | 88.6% slower |
17
 
18
+ **Adaptive vs fixed-ramp hybrid** · 3/8 paired seeds. Adaptive development NLL was 0.000204 lower. It retained 0.0542 less directional width after the switch. Median final widths were 13.157 (adaptive) and 13.215 (fixed). More width is better for the registered geometry test. Whether more width improves prediction is unknown.
19
 
20
  Both primary test decisions are pending. Each stage requires eight paired test seeds and superiority over both baselines under Holm correction.
21
 
22
+ [Side-by-side scores, accuracy, speed and memory](#side-by-side-comparisons) · [Flatness statistics](#flatness-of-the-trained-checkpoints) · [Live explorer](https://huggingface.co/spaces/BurnyCoder/thirdloss-explorer) · [Paired tests and intervals](reports/summary.md)
23
 
24
  <!-- READOUT:END -->
25
 
 
108
 
109
  The equal-time row uses the last available fixed-window development score at or before the fastest run’s finish time in each seed. Full-split NLL uses every development target. Training speed includes regularizer probes. Adapter derivatives use CPU float64 with one GPU reserved. [Timing definitions and checkpoint lags](reports/summary.md)
110
 
111
+ ### Flatness of the trained checkpoints
112
+
113
+ How far can the weights move before next-token loss rises by 0.1 nats on eight fixed training windows? We add the crossing distances on both sides of each of 16 unit directions, then take their median. **Wider is flatter** in these coordinates. Establishing a local minimum would also require a stationarity test. [Flat-minima paper](https://people.idsia.ch/~juergen/fm/node1.html) · [Coordinate dependence](https://proceedings.mlr.press/v70/dinh17b/dinh17b.pdf#page=2)
114
+
115
+ **TinyStories hybrids** · Each row names the completed seeds. Switch and final widths are medians over those seeds. The final seed range shows the smallest and largest seed widths. The middle 50% column gives the medians of the within-seed directional quartiles. Spread has no preferred direction. A ray at the search limit supplies a lower bound.
116
+
117
+ | Hybrid arm | Seeds | Switch width<br>↑ Wider is flatter | Final width<br>↑ Wider is flatter | Final seed range | Middle 50% of final directions | Rays at limit / tested |
118
+ | --- | --- | --- | --- | --- | --- | --- |
119
+ | Curvature-dependent hybrid | 21, 22, 23 | 15.143 | 13.157 | 13.048–13.215 | 12.984–13.368 | 0/96 |
120
+ | Fixed late hybrid | 21, 22, 23 | 15.143 | 13.215 | 13.103–13.268 | 13.036–13.411 | 0/96 |
121
+ | Hessian trace | 21, 22, 23 | 15.143 | 13.154 | 13.046–13.215 | 12.984–13.366 | 0/96 |
122
+ | Stronger trace | 21, 22, 23 | 15.143 | 13.175 | 13.069–13.233 | 13.002–13.387 | 0/96 |
123
+ | Cross-seed replay | 22 | 15.403 | 13.218 | One seed | 12.987–13.496 | 0/32 |
124
+ | Always-on hybrid | 21, 22 | 15.357 | 13.281 | 13.229–13.334 | 13.091–13.472 | 0/64 |
125
+
126
+ Matched finite-width and Hessian measurements for the primary AdamW, trace and third-order checkpoints are pending.
127
+
128
+ For the primary comparison, TinyStories uses all weights and Pythia uses the LoRA factors. Compare widths within each model. The link gives every run, directional bracket and Hessian probe. [Flatness statistics and raw files](reports/flatness.md) · [Secondary measurement design](reports/amendments/checkpoint-flatness.md)
129
+
130
  ### TinyStories hybrid schedules
131
 
132
  **Adaptive vs fixed ramp · 3/8 paired seeds · 16,777,216 targets per run.** Both arms resume the same trace-trained checkpoint. Width change is final width minus width at the switch. A larger change means more width retained at the fixed loss tolerance. For two negative changes, the one closer to zero lost less width.
 
210
 
211
  [Explore the results](https://burnycoder.github.io/llm-training-with-penalizing-rapid-changes-of-curvature-of-its-loss-with-derivative-of-hessian/) · [Hugging Face explorer](https://huggingface.co/spaces/BurnyCoder/thirdloss-explorer) · [Hugging Face collection](https://huggingface.co/collections/BurnyCoder/third-derivatives-in-language-model-training-6b067fb7d5ae3eca49ebb378) · [Paper](reports/paper.pdf) · [Run ledger](reports/experiments/experiments.md)
212
 
213
+ Recorded 42 runs, including 40 with a completed summary.
214
 
215
  TinyStories hybrid follow-up: 15 of 48 full runs and 3 of 8 shared checkpoints complete. Geometric decision: awaiting eight paired width measurements. [Width measurements, scores and controls](reports/hybrid/results.md)
216
 
research/docs/figures/curves.png CHANGED

Git LFS Details

  • SHA256: 670de59d3ffd7346c45d0357f7f3077e6e0961e240e29e8cdcf55816415cf4e6
  • Pointer size: 131 Bytes
  • Size of remote file: 298 kB

Git LFS Details

  • SHA256: 71a940709aef0d4ccaa56e44157b00462cdc6577d5341300cd5cc782a32d747f
  • Pointer size: 131 Bytes
  • Size of remote file: 299 kB
research/docs/hub/archive.md CHANGED
@@ -18,11 +18,11 @@ Does penalizing changes in loss curvature improve next-token prediction? The stu
18
  | TinyStories pretraining · dev | one development pilot seed | 0.000045 lower | 0.000338 lower | 65.7% slower |
19
  | Pythia-410M adapters · dev | one development pilot seed | 0.000300 higher | 0.000273 higher | 88.6% slower |
20
 
21
- **Adaptive vs fixed-ramp hybrid** · 3/8 paired seeds. Adaptive development NLL was 0.000204 lower. It retained 0.0542 less directional width after the switch. More width is better for the registered geometry test. Whether more width improves prediction is unknown.
22
 
23
  Both primary test decisions are pending. Each stage requires eight paired test seeds and superiority over both baselines under Holm correction.
24
 
25
- [Side-by-side scores, accuracy, speed, memory and width](#side-by-side-comparisons) · [Live explorer](https://huggingface.co/spaces/BurnyCoder/thirdloss-explorer) · [Paired tests and intervals](https://huggingface.co/BurnyCoder/thirdloss-study/blob/main/research/reports/summary.md)
26
 
27
  ## Side-by-side comparisons
28
 
@@ -65,6 +65,25 @@ Awaiting paired test results (0 of 8 full-horizon training triplets).
65
 
66
  The equal-time row uses the last available fixed-window development score at or before the fastest run’s finish time in each seed. Full-split NLL uses every development target. Training speed includes regularizer probes. Adapter derivatives use CPU float64 with one GPU reserved. [Timing definitions and checkpoint lags](https://huggingface.co/BurnyCoder/thirdloss-study/blob/main/research/reports/summary.md)
67
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  ### TinyStories hybrid schedules
69
 
70
  **Adaptive vs fixed ramp · 3/8 paired seeds · 16,777,216 targets per run.** Both arms resume the same trace-trained checkpoint. Width change is final width minus width at the switch. A larger change means more width retained at the fixed loss tolerance. For two negative changes, the one closer to zero lost less width.
 
18
  | TinyStories pretraining · dev | one development pilot seed | 0.000045 lower | 0.000338 lower | 65.7% slower |
19
  | Pythia-410M adapters · dev | one development pilot seed | 0.000300 higher | 0.000273 higher | 88.6% slower |
20
 
21
+ **Adaptive vs fixed-ramp hybrid** · 3/8 paired seeds. Adaptive development NLL was 0.000204 lower. It retained 0.0542 less directional width after the switch. Median final widths were 13.157 (adaptive) and 13.215 (fixed). More width is better for the registered geometry test. Whether more width improves prediction is unknown.
22
 
23
  Both primary test decisions are pending. Each stage requires eight paired test seeds and superiority over both baselines under Holm correction.
24
 
25
+ [Side-by-side scores, accuracy, speed and memory](#side-by-side-comparisons) · [Flatness statistics](#flatness-of-the-trained-checkpoints) · [Live explorer](https://huggingface.co/spaces/BurnyCoder/thirdloss-explorer) · [Paired tests and intervals](https://huggingface.co/BurnyCoder/thirdloss-study/blob/main/research/reports/summary.md)
26
 
27
  ## Side-by-side comparisons
28
 
 
65
 
66
  The equal-time row uses the last available fixed-window development score at or before the fastest run’s finish time in each seed. Full-split NLL uses every development target. Training speed includes regularizer probes. Adapter derivatives use CPU float64 with one GPU reserved. [Timing definitions and checkpoint lags](https://huggingface.co/BurnyCoder/thirdloss-study/blob/main/research/reports/summary.md)
67
 
68
+ ### Flatness of the trained checkpoints
69
+
70
+ How far can the weights move before next-token loss rises by 0.1 nats on eight fixed training windows? We add the crossing distances on both sides of each of 16 unit directions, then take their median. **Wider is flatter** in these coordinates. Establishing a local minimum would also require a stationarity test. [Flat-minima paper](https://people.idsia.ch/~juergen/fm/node1.html) · [Coordinate dependence](https://proceedings.mlr.press/v70/dinh17b/dinh17b.pdf#page=2)
71
+
72
+ **TinyStories hybrids** · Each row names the completed seeds. Switch and final widths are medians over those seeds. The final seed range shows the smallest and largest seed widths. The middle 50% column gives the medians of the within-seed directional quartiles. Spread has no preferred direction. A ray at the search limit supplies a lower bound.
73
+
74
+ | Hybrid arm | Seeds | Switch width<br>↑ Wider is flatter | Final width<br>↑ Wider is flatter | Final seed range | Middle 50% of final directions | Rays at limit / tested |
75
+ | --- | --- | --- | --- | --- | --- | --- |
76
+ | Curvature-dependent hybrid | 21, 22, 23 | 15.143 | 13.157 | 13.048–13.215 | 12.984–13.368 | 0/96 |
77
+ | Fixed late hybrid | 21, 22, 23 | 15.143 | 13.215 | 13.103–13.268 | 13.036–13.411 | 0/96 |
78
+ | Hessian trace | 21, 22, 23 | 15.143 | 13.154 | 13.046–13.215 | 12.984–13.366 | 0/96 |
79
+ | Stronger trace | 21, 22, 23 | 15.143 | 13.175 | 13.069–13.233 | 13.002–13.387 | 0/96 |
80
+ | Cross-seed replay | 22 | 15.403 | 13.218 | One seed | 12.987–13.496 | 0/32 |
81
+ | Always-on hybrid | 21, 22 | 15.357 | 13.281 | 13.229–13.334 | 13.091–13.472 | 0/64 |
82
+
83
+ Matched finite-width and Hessian measurements for the primary AdamW, trace and third-order checkpoints are pending.
84
+
85
+ For the primary comparison, TinyStories uses all weights and Pythia uses the LoRA factors. Compare widths within each model. The link gives every run, directional bracket and Hessian probe. [Flatness statistics and raw files](https://huggingface.co/BurnyCoder/thirdloss-study/blob/main/research/reports/flatness.md) · [Secondary measurement design](https://huggingface.co/BurnyCoder/thirdloss-study/blob/main/research/reports/amendments/checkpoint-flatness.md)
86
+
87
  ### TinyStories hybrid schedules
88
 
89
  **Adaptive vs fixed ramp · 3/8 paired seeds · 16,777,216 targets per run.** Both arms resume the same trace-trained checkpoint. Width change is final width minus width at the switch. A larger change means more width retained at the fixed loss tolerance. For two negative changes, the one closer to zero lost less width.
research/docs/runbook.md CHANGED
@@ -54,3 +54,7 @@ After an operating-system restart, rerun the same study command in the project d
54
  Run `uv run thirdloss audit-hub` at the Git revision in `publication.json` to verify every published object against its Git blob or large-file digest, including all tracked files. The archive uses committed bytes so Windows checkout line endings and local configuration cannot change the mirrored source. [Public verification receipt](https://huggingface.co/BurnyCoder/thirdloss-study/blob/main/publication.json)
55
 
56
  With `study --publish`, the local trainer sends active loss, accuracy, probe estimates, calibration progress and examples to the public explorer about every two minutes. GitHub Pages and the Hugging Face Space read that feed between full releases. The local dashboard reads the training records directly. [Public live feed](https://huggingface.co/BurnyCoder/thirdloss-study/resolve/main/live.json)
 
 
 
 
 
54
  Run `uv run thirdloss audit-hub` at the Git revision in `publication.json` to verify every published object against its Git blob or large-file digest, including all tracked files. The archive uses committed bytes so Windows checkout line endings and local configuration cannot change the mirrored source. [Public verification receipt](https://huggingface.co/BurnyCoder/thirdloss-study/blob/main/publication.json)
55
 
56
  With `study --publish`, the local trainer sends active loss, accuracy, probe estimates, calibration progress and examples to the public explorer about every two minutes. GitHub Pages and the Hugging Face Space read that feed between full releases. The local dashboard reads the training records directly. [Public live feed](https://huggingface.co/BurnyCoder/thirdloss-study/resolve/main/live.json)
57
+
58
+ ## Checkpoint flatness
59
+
60
+ Run `uv run --locked thirdloss flatness --stage both --phase pilot --publish` to measure the selected models and fitted pilot controls. Use `--phase confirm` for the eight-seed checkpoints. Each call checks the training stream and exported weights, resumes from saved measurements and publishes each newly measured checkpoint. Schedule this command between timed training runs on the same GPU. Run `uv run --locked thirdloss report` to rebuild the statistics from the saved measurements. [Design](../reports/amendments/checkpoint-flatness.md) · [Results and raw probes](../reports/flatness.md)
research/docs/study.json CHANGED
The diff for this file is too large to render. See raw diff
 
research/reports/experiments/experiments.md CHANGED
@@ -34,6 +34,7 @@ NLL is negative log-likelihood in nats per target token. A smaller value assigns
34
  | [stories-hybrid-s22-strong-r01](./stories-hybrid-s22-strong-r01/experiment.md) | TinyStories | Stronger trace | hybrid | 22 | 0.010 | 16,777,216 | 2.5464 | — | 60,263 | complete |
35
  | [stories-hybrid-s22-trace-r01](./stories-hybrid-s22-trace-r01/experiment.md) | TinyStories | Hessian trace | hybrid | 22 | 0.010 | 16,777,216 | 2.5463 | — | 61,689 | complete |
36
  | [stories-hybrid-s23-adaptive-r01](./stories-hybrid-s23-adaptive-r01/experiment.md) | TinyStories | Curvature-dependent hybrid | hybrid | 23 | 0.010 | 16,777,216 | 2.5423 | — | 37,872 | complete |
 
37
  | [stories-hybrid-s23-late-r01](./stories-hybrid-s23-late-r01/experiment.md) | TinyStories | Fixed late hybrid | hybrid | 23 | 0.010 | 16,777,216 | 2.5425 | — | 40,662 | complete |
38
  | [stories-hybrid-s23-strong-r01](./stories-hybrid-s23-strong-r01/experiment.md) | TinyStories | Stronger trace | hybrid | 23 | 0.010 | 16,777,216 | 2.5424 | — | 60,806 | complete |
39
  | [stories-hybrid-s23-trace-r01](./stories-hybrid-s23-trace-r01/experiment.md) | TinyStories | Hessian trace | hybrid | 23 | 0.010 | 16,777,216 | 2.5423 | — | 59,471 | complete |
 
34
  | [stories-hybrid-s22-strong-r01](./stories-hybrid-s22-strong-r01/experiment.md) | TinyStories | Stronger trace | hybrid | 22 | 0.010 | 16,777,216 | 2.5464 | — | 60,263 | complete |
35
  | [stories-hybrid-s22-trace-r01](./stories-hybrid-s22-trace-r01/experiment.md) | TinyStories | Hessian trace | hybrid | 22 | 0.010 | 16,777,216 | 2.5463 | — | 61,689 | complete |
36
  | [stories-hybrid-s23-adaptive-r01](./stories-hybrid-s23-adaptive-r01/experiment.md) | TinyStories | Curvature-dependent hybrid | hybrid | 23 | 0.010 | 16,777,216 | 2.5423 | — | 37,872 | complete |
37
+ | [stories-hybrid-s23-always-r01](./stories-hybrid-s23-always-r01/experiment.md) | TinyStories | Always-on hybrid | hybrid | 23 | 0.010 | 5,718,016 | 3.0052 | — | — | training |
38
  | [stories-hybrid-s23-late-r01](./stories-hybrid-s23-late-r01/experiment.md) | TinyStories | Fixed late hybrid | hybrid | 23 | 0.010 | 16,777,216 | 2.5425 | — | 40,662 | complete |
39
  | [stories-hybrid-s23-strong-r01](./stories-hybrid-s23-strong-r01/experiment.md) | TinyStories | Stronger trace | hybrid | 23 | 0.010 | 16,777,216 | 2.5424 | — | 60,806 | complete |
40
  | [stories-hybrid-s23-trace-r01](./stories-hybrid-s23-trace-r01/experiment.md) | TinyStories | Hessian trace | hybrid | 23 | 0.010 | 16,777,216 | 2.5423 | — | 59,471 | complete |
research/reports/experiments/learnings.md CHANGED
@@ -62,6 +62,8 @@ Independent random signs include mixed weight derivatives in the expected penalt
62
 
63
  - [stories-hybrid-s23-adaptive-r01](./stories-hybrid-s23-adaptive-r01/experiment.md) — Development NLL changed by -0.1848 nats per target token from 8,912,896 to 16,777,216 training targets. Attribution to the regularizer uses matched comparisons across seeds.
64
 
 
 
65
  - [stories-hybrid-s23-late-r01](./stories-hybrid-s23-late-r01/experiment.md) — Development NLL changed by -0.1847 nats per target token from 8,912,896 to 16,777,216 training targets. Attribution to the regularizer uses matched comparisons across seeds.
66
 
67
  - [stories-hybrid-s23-strong-r01](./stories-hybrid-s23-strong-r01/experiment.md) — Development NLL changed by -0.1847 nats per target token from 8,912,896 to 16,777,216 training targets. Attribution to the regularizer uses matched comparisons across seeds.
 
62
 
63
  - [stories-hybrid-s23-adaptive-r01](./stories-hybrid-s23-adaptive-r01/experiment.md) — Development NLL changed by -0.1848 nats per target token from 8,912,896 to 16,777,216 training targets. Attribution to the regularizer uses matched comparisons across seeds.
64
 
65
+ - [stories-hybrid-s23-always-r01](./stories-hybrid-s23-always-r01/experiment.md) — Development NLL changed by -3.0038 nats per target token from 524,288 to 5,242,880 training targets. Attribution to the regularizer uses matched comparisons across seeds.
66
+
67
  - [stories-hybrid-s23-late-r01](./stories-hybrid-s23-late-r01/experiment.md) — Development NLL changed by -0.1847 nats per target token from 8,912,896 to 16,777,216 training targets. Attribution to the regularizer uses matched comparisons across seeds.
68
 
69
  - [stories-hybrid-s23-strong-r01](./stories-hybrid-s23-strong-r01/experiment.md) — Development NLL changed by -0.1847 nats per target token from 8,912,896 to 16,777,216 training targets. Attribution to the regularizer uses matched comparisons across seeds.
research/reports/experiments/stories-hybrid-s23-always-r01/experiment.md ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # TinyStories · Always-on hybrid
2
+
3
+ Run `stories-hybrid-s23-always-r01` · [raw records](../../../results/stories-hybrid-s23-always-r01/) · [registered design](../../preregistration.md)
4
+
5
+ | Stage | Method | Phase | Seed | Ratio | Train tokens | Dev NLL | Test NLL | Tokens/s | Status |
6
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
7
+ | TinyStories | Always-on hybrid | hybrid | 23 | 0.010 | 5,718,016 | 3.0052 | — | — | training |
8
+
9
+ Training time is 193.0 seconds. Peak allocated GPU memory is — MiB. Development token accuracy is 0.4076. Test token accuracy is —.
10
+
11
+ [Design and hyperparameter rationale](../../planned-runs.md) · [Saved configuration](../../../results/stories-hybrid-s23-always-r01/config.json)
research/reports/experiments/stories-hybrid-s23-always-r01/learnings.md ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ # Run learnings
2
+
3
+ Development NLL changed by -3.0038 nats per target token from 524,288 to 5,242,880 training targets. Attribution to the regularizer uses matched comparisons across seeds.
4
+
5
+ [Experiment and source records](experiment.md)
research/reports/flatness.md ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Flatness at saved checkpoints
2
+
3
+ Widths are measured in each model’s trainable coordinates. A larger width is flatter at the specified training-loss tolerance. A smaller RMS curvature means less local bending. Opposite curvature signs can cancel in the normalized trace. [Measurement design](amendments/checkpoint-flatness.md)
4
+
5
+ ## Registered TinyStories hybrids
6
+
7
+ | Hybrid arm | Seeds | Switch width<br>↑ Wider is flatter | Final width<br>↑ Wider is flatter | Final seed range | Middle 50% of final directions | Rays at limit / tested |
8
+ | --- | --- | --- | --- | --- | --- | --- |
9
+ | Curvature-dependent hybrid | 21, 22, 23 | 15.143 | 13.157 | 13.048–13.215 | 12.984–13.368 | 0/96 |
10
+ | Fixed late hybrid | 21, 22, 23 | 15.143 | 13.215 | 13.103–13.268 | 13.036–13.411 | 0/96 |
11
+ | Hessian trace | 21, 22, 23 | 15.143 | 13.154 | 13.046–13.215 | 12.984–13.366 | 0/96 |
12
+ | Stronger trace | 21, 22, 23 | 15.143 | 13.175 | 13.069–13.233 | 13.002–13.387 | 0/96 |
13
+ | Cross-seed replay | 22 | 15.403 | 13.218 | One seed | 12.987–13.496 | 0/32 |
14
+ | Always-on hybrid | 21, 22 | 15.357 | 13.281 | 13.229–13.334 | 13.091–13.472 | 0/64 |
15
+
16
+ The seed range and directional spread describe variability. The rays at the limit give measurement coverage. Compare matching seeds for differences between arms. [Every crossing and paired comparison](hybrid/results.md)
17
+
18
+ ## Secondary checkpoint measurements
19
+
20
+ Awaiting the first saved primary-checkpoint measurement.
research/reports/paper.pdf CHANGED
Binary files a/research/reports/paper.pdf and b/research/reports/paper.pdf differ
 
research/reports/planned-runs.md CHANGED
@@ -19,3 +19,7 @@ Evaluate seed-paired final test predictions only when the stage has all planned
19
  ## Registered hybrid follow-up
20
 
21
  The six TinyStories arms share eight paired seeds. Five branch from a common trace-trained checkpoint and one uses both penalties from initialization. Directional width is measured at three token counts. The curvature rule, replay donors, cap, stronger-trace calibration and decision threshold were fixed before follow-up outcomes. [Hybrid run matrix and decision rule](hybrid/preregistration.md) · [Research question](plan.md#curvature-dependent-penalty-weight)
 
 
 
 
 
19
  ## Registered hybrid follow-up
20
 
21
  The six TinyStories arms share eight paired seeds. Five branch from a common trace-trained checkpoint and one uses both penalties from initialization. Directional width is measured at three token counts. The curvature rule, replay donors, cap, stronger-trace calibration and decision threshold were fixed before follow-up outcomes. [Hybrid run matrix and decision rule](hybrid/preregistration.md) · [Research question](plan.md#curvature-dependent-penalty-weight)
22
+
23
+ ## Secondary flatness measurements
24
+
25
+ Measure the saved AdamW, Hessian-trace and third-order checkpoints at the selected pilot horizon and the full confirmatory horizon in each stage. Include the three fitted pilot controls. Each evaluation records training-window perturbation widths and Hessian curvature in that stage’s trainable coordinates. This analysis was specified after early development results. [Measurement design](amendments/checkpoint-flatness.md) · [Measured statistics](flatness.md)
research/reports/progress.md CHANGED
@@ -1,6 +1,6 @@
1
  # Study progress
2
 
3
- Updated 2026-11-25T16:28:36+00:00.
4
 
5
  21 training/control records and 0 final evaluations are complete. This is 17.5% of 120 planned model milestones.
6
 
 
1
  # Study progress
2
 
3
+ Updated 2026-11-25T16:32:44+00:00.
4
 
5
  21 training/control records and 0 final evaluations are complete. This is 17.5% of 120 planned model milestones.
6
 
research/reports/summary.md CHANGED
@@ -1,6 +1,6 @@
1
  # Study summary
2
 
3
- Recorded 41 runs, including 40 with a completed summary.
4
 
5
  **TinyStories.** Awaiting paired test results (0 of 8 full-horizon training triplets).
6
 
 
1
  # Study summary
2
 
3
+ Recorded 42 runs, including 40 with a completed summary.
4
 
5
  **TinyStories.** Awaiting paired test results (0 of 8 full-horizon training triplets).
6
 
research/results/stories-hybrid-s23-always-r01/config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "stage": "stories",
3
+ "phase": "hybrid",
4
+ "id": "stories-hybrid-s23-always-r01",
5
+ "method": "always",
6
+ "seed": 23,
7
+ "ratio": 0.01,
8
+ "token_budget": 16777216,
9
+ "batch_windows": 32,
10
+ "context": 128,
11
+ "schedule_steps": 4096,
12
+ "protocol": "hybrid-v1",
13
+ "alpha": 9.169227719425724e-08,
14
+ "cap": 3.0190450056526336e-14,
15
+ "data_manifest_sha256": "f61dcd6d63f102755b2705140b274b65fc870c3cded3961845ca5ed51e1a6d00",
16
+ "microbatch": 32,
17
+ "coefficients": {
18
+ "trace": 9.169227719425724e-08,
19
+ "third": 3.0190450056526336e-14
20
+ }
21
+ }
research/results/stories-hybrid-s23-always-r01/events.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
research/results/stories-hybrid-s23-always-r01/state.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "status": "training",
3
+ "timestamp": "2026-11-25T16:29:19+00:00"
4
+ }
research/src/thirdloss/checkpoint_flatness.py ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Secondary training-window geometry of saved language-model checkpoints, outside timed training."""
2
+
3
+ import hashlib
4
+ import math
5
+ import subprocess
6
+ import sys
7
+ from statistics import mean
8
+
9
+ import torch
10
+ from filelock import FileLock
11
+
12
+ from .models import logits_of,token_loss,widen_pythia
13
+ from .penalties import inner,partials,random_signs
14
+ from .records import HORIZONS,read_json,run_name,sha256,time_now,write_json
15
+ from .study import load_trained_model
16
+ from .width import measure_width
17
+ from .windows import TrainingWindows,generator
18
+
19
+
20
+ PROTOCOL="checkpoint-flatness-v1"
21
+
22
+
23
+ def hessian_statistics(loss,parameters):
24
+ """Estimate tr(H)/d and ||H||F/√d on one fixed loss; the signed trace can cancel."""
25
+ gradient=partials(loss,parameters)
26
+ dimensions=sum(p.numel() for p in parameters)
27
+ device=parameters[0].device
28
+ draws=[]
29
+ for index in range(8):
30
+ z=random_signs(parameters,generator(device,88731,index,983))
31
+ hz=partials(inner(gradient,z),parameters,create_graph=False)
32
+ signed=float(inner(z,hz))/dimensions
33
+ square=float(inner(hz,hz))/dimensions
34
+ if not math.isfinite(signed) or not math.isfinite(square):
35
+ raise FloatingPointError("Nonfinite checkpoint Hessian product")
36
+ draws.append({"index":index,"trace_per_parameter":signed,"squared_rms":square})
37
+ return {"dimensions":dimensions,"draws":draws,"device":str(device),"dtype":str(parameters[0].dtype),
38
+ "trace_per_parameter":mean(r["trace_per_parameter"] for r in draws),
39
+ "rms_curvature":math.sqrt(mean(r["squared_rms"] for r in draws))}
40
+
41
+
42
+ def measure_checkpoint(project,storage,row,device):
43
+ """Restore one verified export and compute both local curvature and finite-radius width."""
44
+ corpus=storage/"data"/row["stage"]
45
+ path=project/"results"/row["id"]/"flatness.json"
46
+ identity={"protocol":PROTOCOL,"run":row["id"],"checkpoint_file_sha256":row["weights_sha256"],
47
+ "data_manifest_sha256":sha256(corpus/"manifest.json"),"width_device":device.type}
48
+ if identity["data_manifest_sha256"]!=row["data_manifest_sha256"]:
49
+ raise ValueError(f"Training manifest changed for {row['id']}")
50
+ if path.exists():
51
+ existing=read_json(path)
52
+ if any(existing.get(k)!=v for k,v in identity.items()):
53
+ raise ValueError(f"Saved flatness provenance differs for {row['id']}")
54
+ return path
55
+ print(f"{time_now()} Measuring checkpoint flatness for {row['id']}",flush=True)
56
+ model=load_trained_model(storage,row,device).eval()
57
+ inputs,targets=TrainingWindows(corpus/"train.bin",88731,8).get(0,device)
58
+ fingerprint=hashlib.sha256(inputs.cpu().numpy().tobytes()+targets.cpu().numpy().tobytes()).hexdigest()
59
+ width=measure_width(model,lambda:token_loss(logits_of(model,inputs),targets))
60
+ if row["stage"]=="abstracts":
61
+ model=widen_pythia(model.cpu())
62
+ else:
63
+ model=model.double()
64
+ hessian_device=next(model.parameters()).device
65
+ loss=token_loss(logits_of(model,inputs[:2].to(hessian_device)),targets[:2].to(hessian_device))
66
+ statistics=hessian_statistics(loss,tuple(p for p in model.parameters() if p.requires_grad))
67
+ write_json(path,{**identity,"timestamp":time_now(),"split":"train","probe_windows_sha256":fingerprint,
68
+ "width_windows":8,"curvature_windows":2,"width":width,"curvature":statistics})
69
+ print(f"{time_now()} {row['id']} width={width['width']} RMS curvature={statistics['rms_curvature']:.6g}",flush=True)
70
+ return path
71
+
72
+
73
+ def flatness_study(project,storage,stages,phase,device,publish):
74
+ """Measure all available prespecified matches; resume from independently verified per-run records."""
75
+ from .release import publish_snapshot
76
+ for stage in stages:
77
+ data=storage/"data"/stage
78
+ if (project/"results"/"selection"/f"{stage}.json").exists():
79
+ if sha256(data/"train.bin")!=read_json(data/"manifest.json")["artifacts"]["train.bin"]["sha256"]:
80
+ raise ValueError(f"Training tokens differ from their registered digest for {stage}")
81
+ for group in (("ce","trace","third"),("hessian_norm","sham","combined")):
82
+ for stage in stages:
83
+ selection=project/"results"/"selection"/f"{stage}.json"
84
+ if not selection.exists():
85
+ continue
86
+ ratios=read_json(selection)["ratios"]
87
+ strength={"ce":0.,"hessian_norm":.03,"sham":ratios["third"],"combined":ratios["third"],**ratios}
88
+ for kind in (("pilot","confirm") if phase=="all" else (phase,)):
89
+ if kind=="confirm" and "ce" not in group:
90
+ continue
91
+ for seed in ((0,) if kind=="pilot" else range(1,9)):
92
+ for method in group:
93
+ run=run_name(stage,method,kind,seed,strength[method])
94
+ summary=project/"results"/run/"summary.json"
95
+ if not summary.exists():
96
+ continue
97
+ row=read_json(summary)
98
+ if row["tokens"]!=(HORIZONS[stage]//8 if kind=="pilot" else HORIZONS[stage]):
99
+ raise ValueError(f"Flatness comparison requires the complete registered horizon: {run}")
100
+ with FileLock(str(storage/"locks"/(run+"-flatness.lock"))):
101
+ measured=measure_checkpoint(project,storage,row,device)
102
+ marker=storage/"releases"/("flatness-"+run+".json")
103
+ digest=sha256(measured)
104
+ if publish and (not marker.exists() or read_json(marker)["sha256"]!=digest):
105
+ subprocess.run([sys.executable,"-m","thirdloss.cli","--project",str(project),"report"],
106
+ cwd=project,check=True)
107
+ revision=publish_snapshot(project,f"Measure training-window flatness for {run}")
108
+ write_json(marker,{"sha256":digest,"git_revision":revision})
research/src/thirdloss/cli.py CHANGED
@@ -36,14 +36,16 @@ def parser():
36
  p = argparse.ArgumentParser(description=__doc__)
37
  p.add_argument("--project",type=Path,default=Path.cwd())
38
  parsers = p.add_subparsers(dest="action",required=True)
39
- for action in ("prepare","train","study","hybrid","freeze","evaluate","report","dashboard","publish","audit-hub","audit-restart","progress","verify"):
40
  sub = parsers.add_parser(action)
41
- if action in {"prepare","study"}:
42
  sub.add_argument("--stage",choices=(*HORIZONS,"both"),default="both")
43
  if action in {"train","freeze"}:
44
  sub.add_argument("--stage",choices=HORIZONS,required=True)
45
- if action in {"train","study","hybrid","evaluate"}:
46
  sub.add_argument("--device",default="cuda")
 
 
47
  if action=="study":
48
  sub.add_argument("--with-hybrid",action="store_true",help="Include the registered TinyStories hybrid follow-up on the same GPU")
49
  if action=="verify":
@@ -57,7 +59,7 @@ def parser():
57
  sub.add_argument("--seed",type=int,default=0)
58
  sub.add_argument("--ratio",type=float,default=0.03)
59
  sub.add_argument("--microbatch",type=int)
60
- if action in {"train","study","hybrid","evaluate"}:
61
  sub.add_argument("--publish",action="store_true",help="Publish results to the configured project accounts")
62
  if action in {"evaluate","audit-restart"}:
63
  sub.add_argument("run_id")
@@ -126,6 +128,10 @@ def main(argv=None):
126
  return
127
  from .records import setup_device
128
  device = setup_device(args.device)
 
 
 
 
129
  if args.action in {"study","hybrid"}:
130
  from contextlib import nullcontext
131
  from .live_hub import publish_live
 
36
  p = argparse.ArgumentParser(description=__doc__)
37
  p.add_argument("--project",type=Path,default=Path.cwd())
38
  parsers = p.add_subparsers(dest="action",required=True)
39
+ for action in ("prepare","train","study","hybrid","flatness","freeze","evaluate","report","dashboard","publish","audit-hub","audit-restart","progress","verify"):
40
  sub = parsers.add_parser(action)
41
+ if action in {"prepare","study","flatness"}:
42
  sub.add_argument("--stage",choices=(*HORIZONS,"both"),default="both")
43
  if action in {"train","freeze"}:
44
  sub.add_argument("--stage",choices=HORIZONS,required=True)
45
+ if action in {"train","study","hybrid","evaluate","flatness"}:
46
  sub.add_argument("--device",default="cuda")
47
+ if action=="flatness":
48
+ sub.add_argument("--phase",choices=("pilot","confirm","all"),default="all")
49
  if action=="study":
50
  sub.add_argument("--with-hybrid",action="store_true",help="Include the registered TinyStories hybrid follow-up on the same GPU")
51
  if action=="verify":
 
59
  sub.add_argument("--seed",type=int,default=0)
60
  sub.add_argument("--ratio",type=float,default=0.03)
61
  sub.add_argument("--microbatch",type=int)
62
+ if action in {"train","study","hybrid","evaluate","flatness"}:
63
  sub.add_argument("--publish",action="store_true",help="Publish results to the configured project accounts")
64
  if action in {"evaluate","audit-restart"}:
65
  sub.add_argument("run_id")
 
128
  return
129
  from .records import setup_device
130
  device = setup_device(args.device)
131
+ if args.action=="flatness":
132
+ from .checkpoint_flatness import flatness_study
133
+ flatness_study(project,storage,stages,args.phase,device,args.publish)
134
+ return
135
  if args.action in {"study","hybrid"}:
136
  from contextlib import nullcontext
137
  from .live_hub import publish_live
research/src/thirdloss/flatness_stats.py ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Order statistics for two-sided perturbation widths with finite bisection and open upper bounds."""
2
+
3
+ import math
4
+
5
+
6
+ def _quantile(values, fraction):
7
+ """Linear empirical quantile, including an unbounded upper endpoint when its weight is positive."""
8
+ ordered=sorted(values)
9
+ position=(len(ordered)-1)*fraction
10
+ lower=math.floor(position)
11
+ upper=math.ceil(position)
12
+ if lower==upper or ordered[lower]==ordered[upper]:
13
+ return ordered[lower]
14
+ return ordered[lower]+(ordered[upper]-ordered[lower])*(position-lower)
15
+
16
+
17
+ def quantile_bounds(bounds,fraction):
18
+ """Monotonicity transfers the brackets on the individual widths to the same order statistic."""
19
+ low=_quantile([b[0] for b in bounds],fraction)
20
+ high=_quantile([b[1] if b[1] is not None else math.inf for b in bounds],fraction)
21
+ return [low,high if math.isfinite(high) else None]
22
+
23
+
24
+ def direction_summary(width):
25
+ """Keep the per-direction middle half and denominator without copying raw rays into the dashboard."""
26
+ bounds=[]
27
+ for ray in width.get("directions",[]):
28
+ pos,neg=ray["positive"],ray["negative"]
29
+ upper=None if pos["upper"] is None or neg["upper"] is None else pos["upper"]+neg["upper"]
30
+ bounds.append([pos["lower"]+neg["lower"],upper])
31
+ if not bounds:
32
+ return {}
33
+ return {"direction_q1":quantile_bounds(bounds,.25),"direction_q3":quantile_bounds(bounds,.75),
34
+ "ray_count":2*len(bounds)}
35
+
36
+
37
+ def compact_width(width):
38
+ """Leave every individual ray in the linked raw file and retain summary statistics for rendering."""
39
+ return {**{k:v for k,v in width.items() if k!="directions"},**direction_summary(width)}
research/src/thirdloss/flatness_tables.py ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Describe checkpoint widths, directional variation and local curvature without treating rays as seeds."""
2
+
3
+ from statistics import median
4
+
5
+ from .flatness_stats import quantile_bounds
6
+ from .report_records import METHODS,completed,markdown_table
7
+
8
+
9
+ def _bound_text(interval,censored=False):
10
+ low,high=interval
11
+ if high is None:
12
+ return f"≥{low:.3f}"
13
+ if censored and f"{low:.3f}"!=f"{high:.3f}":
14
+ return f"[{low:.3f}, {high:.3f}]"
15
+ return f"{(low+high)/2:.3f}"
16
+
17
+
18
+ def _width_stat(points,fraction):
19
+ """Use each registered midpoint when available and keep the lower bound of every censored seed."""
20
+ bounds=[[p["width"],p["width"]] if p["width"] is not None else [p["width_lower"],None] for p in points]
21
+ return _bound_text(quantile_bounds(bounds,fraction),any(b[1] is None for b in bounds))
22
+
23
+
24
+ def _spread(points):
25
+ if not all("direction_q1" in p for p in points):
26
+ return "—"
27
+ bounds=[quantile_bounds([p[key] for p in points],.5) for key in ("direction_q1","direction_q3")]
28
+ return "–".join(_bound_text(b,any(p["censored_rays"] for p in points)) for b in bounds)
29
+
30
+
31
+ def _seed_range(points):
32
+ return "One seed" if len(points)==1 else "–".join(_width_stat(points,q) for q in (0.,1.))
33
+
34
+
35
+ def _ray_count(points):
36
+ if not all(p.get("ray_count") for p in points):
37
+ return "—"
38
+ return f"{sum(p['censored_rays'] for p in points)}/{sum(p['ray_count'] for p in points)}"
39
+
40
+
41
+ def hybrid_flatness_rows(runs):
42
+ """Show which seeds contributed to each arm; their random directions are shared by design."""
43
+ rows=[]
44
+ for arm in ("adaptive","late","trace","strong","replay","always"):
45
+ subset=sorted((r for r in runs if r.get("phase")=="hybrid" and completed(r) and r["method"]==arm
46
+ and all(str(step) in r.get("widths",{}) for step in (2048,4096))),key=lambda r:r["seed"])
47
+ if not subset:
48
+ continue
49
+ initial=[r["widths"]["2048"] for r in subset]
50
+ final=[r["widths"]["4096"] for r in subset]
51
+ rows.append([METHODS[arm],", ".join(str(r["seed"]) for r in subset),_width_stat(initial,.5),
52
+ _width_stat(final,.5),_seed_range(final),_spread(final),_ray_count(final)])
53
+ return rows
54
+
55
+
56
+ def hybrid_flatness_table(runs):
57
+ rows=hybrid_flatness_rows(runs)
58
+ if not rows:
59
+ return "Awaiting completed hybrid checkpoints."
60
+ return markdown_table(rows,["Hybrid arm","Seeds","Switch width<br>↑ Wider is flatter","Final width<br>↑ Wider is flatter","Final seed range",
61
+ "Middle 50% of final directions","Rays at limit / tested"])
62
+
63
+
64
+ def primary_flatness_table(pairs):
65
+ """Compare the same measured seeds, trainable parameterization, training windows and probe backend."""
66
+ methods=("ce","trace","third")
67
+ measured=[pair for pair in pairs if all("flatness" in pair[m] for m in methods)]
68
+ if not measured:
69
+ return ""
70
+ for pair in measured:
71
+ signatures={(pair[m]["flatness"]["protocol"],pair[m]["flatness"]["probe_windows_sha256"],
72
+ pair[m]["flatness"]["width_device"],pair[m]["flatness"]["hessian_device"]) for m in methods}
73
+ if len(signatures)!=1:
74
+ raise ValueError("Matched flatness statistics require the same probes and arithmetic")
75
+ groups=[[pair[m]["flatness"] for pair in measured] for m in methods]
76
+ rows=[
77
+ ["Directional width<br>↑ Wider is flatter",*[_width_stat(g,.5) for g in groups]],
78
+ ["Final width range across seeds<br>Descriptive spread",*[_seed_range(g) for g in groups]],
79
+ ["Middle 50% of directions<br>Descriptive spread",*[_spread(g) for g in groups]],
80
+ ["Rays at limit / tested<br>Measurement coverage",*[_ray_count(g) for g in groups]],
81
+ ["Unperturbed probe NLL<br>↓ Lower fits these windows better",*[f"{median(p['baseline_nll'] for p in g):.5f}" for g in groups]],
82
+ ["RMS Hessian curvature<br>↓ Lower means less local bending",*[f"{median(p['rms_curvature'] for p in g):.6g}" for g in groups]],
83
+ ["Signed Hessian trace / parameter<br>No general better direction",*[f"{median(p['trace_per_parameter'] for p in g):+.6g}" for g in groups]],
84
+ ]
85
+ seeds=", ".join(str(pair["ce"]["seed"]) for pair in measured)
86
+ return f"Seeds {seeds} · {measured[0]['ce']['tokens']:,} training targets per checkpoint.\n\n"+markdown_table(
87
+ rows,["Flatness statistic","AdamW","Hessian trace","Third order"])
88
+
89
+
90
+ def flatness_ledger(study):
91
+ """Provide one evidence link per measured checkpoint, including secondary controls and censored rays."""
92
+ rows=[]
93
+ for r in study["runs"]:
94
+ if "flatness" in r:
95
+ p=r["flatness"]
96
+ rows.append([r["stage"],r["phase"],r["seed"],METHODS[r["method"]],_width_stat([p],.5),
97
+ _spread([p]),_ray_count([p]),f"{p['rms_curvature']:.6g}",f"{p['trace_per_parameter']:+.6g}",
98
+ f"[All probes](../results/{r['id']}/flatness.json)"])
99
+ text=["# Flatness at saved checkpoints",
100
+ "Widths are measured in each model’s trainable coordinates. A larger width is flatter at the specified "
101
+ "training-loss tolerance. A smaller RMS curvature means less local bending. Opposite curvature signs "
102
+ "can cancel in the normalized trace. [Measurement design](amendments/checkpoint-flatness.md)",
103
+ "## Registered TinyStories hybrids",hybrid_flatness_table(study["runs"]),
104
+ "The seed range and directional spread describe variability. The rays at the limit give measurement coverage. "
105
+ "Compare matching seeds for differences between arms. [Every crossing and paired comparison](hybrid/results.md)",
106
+ "## Secondary checkpoint measurements"]
107
+ text.append(markdown_table(rows,["Stage","Horizon","Seed","Arm","Width ↑","Middle 50% of directions",
108
+ "Rays at limit / tested","RMS curvature ↓","Signed trace / parameter","Evidence"])
109
+ if rows else "Awaiting the first saved primary-checkpoint measurement.")
110
+ return "\n\n".join(text)+"\n"
research/src/thirdloss/readme_comparisons.py CHANGED
@@ -5,6 +5,7 @@ from html import escape
5
  from statistics import median
6
 
7
  from .analysis import _time_match
 
8
  from .records import HORIZONS
9
  from .report_records import METHODS, completed, finite, markdown_table, verdict_text
10
 
@@ -179,10 +180,17 @@ def comparison_sections(study):
179
  """Return a short opening scorecard and the detailed, regenerable comparisons for the README."""
180
  top=[]
181
  samples=[]
 
182
  detail=["## Side-by-side comparisons","Each row states which direction is better for that metric. "
183
  "Bold highlights the best observed value at the displayed precision. A tie means the paired difference rounds to zero. "
184
  "NLL is negative log-likelihood in nats per target. Accuracy differences use percentage points (pp)."]
185
  for stage,name in STAGES.items():
 
 
 
 
 
 
186
  pairs=_paired_runs(study,stage,"confirm",PRIMARY)
187
  confirm=bool(pairs)
188
  if not confirm:
@@ -245,6 +253,23 @@ def comparison_sections(study):
245
  "the fastest run’s finish time in each seed. Full-split NLL uses every development target. "
246
  "Training speed includes regularizer probes. Adapter derivatives use CPU float64 with one GPU reserved. "
247
  "[Timing definitions and checkpoint lags](reports/summary.md)")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
248
  fixed=_hybrid_pairs(study,"late")
249
  detail.append("### TinyStories hybrid schedules")
250
  if fixed:
@@ -256,6 +281,9 @@ def comparison_sections(study):
256
  geometry="The two schedules retained equal width at the displayed precision."
257
  else:
258
  geometry=f"It retained {width_change.removesuffix(' retained')} directional width after the switch."
 
 
 
259
  loss_change=_effect(fixed,NLL,"adaptive","late")
260
  prediction=("The two schedules had equal development NLL at the displayed precision." if loss_change=="Tie"
261
  else f"Adaptive development NLL was {loss_change}.")
@@ -302,7 +330,8 @@ def comparison_sections(study):
302
  detail.extend(["### Same-prompt continuations","Each panel shows the first saved prompt and full continuations "
303
  "from the lowest matched seed. These examples have no quality rating. The method names link to the raw generations.",
304
  *(panel for panel in samples if panel)])
305
- quick.append("[Side-by-side scores, accuracy, speed, memory and width](#side-by-side-comparisons) · "
 
306
  "[Live explorer](https://huggingface.co/spaces/BurnyCoder/thirdloss-explorer) · "
307
  "[Paired tests and intervals](reports/summary.md)")
308
  if not any(o.get("complete") for o in study["stages"].values()):
 
5
  from statistics import median
6
 
7
  from .analysis import _time_match
8
+ from .flatness_tables import hybrid_flatness_table,primary_flatness_table
9
  from .records import HORIZONS
10
  from .report_records import METHODS, completed, finite, markdown_table, verdict_text
11
 
 
180
  """Return a short opening scorecard and the detailed, regenerable comparisons for the README."""
181
  top=[]
182
  samples=[]
183
+ primary_geometry=[]
184
  detail=["## Side-by-side comparisons","Each row states which direction is better for that metric. "
185
  "Bold highlights the best observed value at the displayed precision. A tie means the paired difference rounds to zero. "
186
  "NLL is negative log-likelihood in nats per target. Accuracy differences use percentage points (pp)."]
187
  for stage,name in STAGES.items():
188
+ for horizon in ("confirm","pilot"):
189
+ table=primary_flatness_table(_paired_runs(study,stage,horizon,PRIMARY))
190
+ if table:
191
+ context="full-budget checkpoints" if horizon=="confirm" else "development pilots"
192
+ primary_geometry.append(f"**{name} · {context}**\n\n{table}")
193
+ break
194
  pairs=_paired_runs(study,stage,"confirm",PRIMARY)
195
  confirm=bool(pairs)
196
  if not confirm:
 
253
  "the fastest run’s finish time in each seed. Full-split NLL uses every development target. "
254
  "Training speed includes regularizer probes. Adapter derivatives use CPU float64 with one GPU reserved. "
255
  "[Timing definitions and checkpoint lags](reports/summary.md)")
256
+ detail.extend(["### Flatness of the trained checkpoints",
257
+ "How far can the weights move before next-token loss rises by 0.1 nats on eight fixed training windows? "
258
+ "We add the crossing distances on both sides of each of 16 unit directions, then take their median. "
259
+ "**Wider is flatter** in these coordinates. Establishing a local minimum would also require a stationarity test. "
260
+ "[Flat-minima paper](https://people.idsia.ch/~juergen/fm/node1.html) · "
261
+ "[Coordinate dependence](https://proceedings.mlr.press/v70/dinh17b/dinh17b.pdf#page=2)",
262
+ "**TinyStories hybrids** · Each row names the completed seeds. Switch and final widths are medians over those seeds. "
263
+ "The final seed range shows the smallest and largest seed widths. The middle 50% column gives the medians of "
264
+ "the within-seed directional quartiles. Spread has no preferred direction. A ray at the search limit supplies a lower bound.",
265
+ hybrid_flatness_table(study["runs"])])
266
+ if primary_geometry:
267
+ detail.extend(primary_geometry)
268
+ else:
269
+ detail.append("Matched finite-width and Hessian measurements for the primary AdamW, trace and third-order checkpoints are pending.")
270
+ detail.append("For the primary comparison, TinyStories uses all weights and Pythia uses the LoRA factors. "
271
+ "Compare widths within each model. The link gives every run, directional bracket and Hessian probe. "
272
+ "[Flatness statistics and raw files](reports/flatness.md) · [Secondary measurement design](reports/amendments/checkpoint-flatness.md)")
273
  fixed=_hybrid_pairs(study,"late")
274
  detail.append("### TinyStories hybrid schedules")
275
  if fixed:
 
281
  geometry="The two schedules retained equal width at the displayed precision."
282
  else:
283
  geometry=f"It retained {width_change.removesuffix(' retained')} directional width after the switch."
284
+ finals=[[pair[m]["widths"]["4096"]["width"] for pair in fixed] for m in ("adaptive","late")]
285
+ if all(finite(w) for group in finals for w in group):
286
+ geometry+=f" Median final widths were {median(finals[0]):.3f} (adaptive) and {median(finals[1]):.3f} (fixed)."
287
  loss_change=_effect(fixed,NLL,"adaptive","late")
288
  prediction=("The two schedules had equal development NLL at the displayed precision." if loss_change=="Tie"
289
  else f"Adaptive development NLL was {loss_change}.")
 
330
  detail.extend(["### Same-prompt continuations","Each panel shows the first saved prompt and full continuations "
331
  "from the lowest matched seed. These examples have no quality rating. The method names link to the raw generations.",
332
  *(panel for panel in samples if panel)])
333
+ quick.append("[Side-by-side scores, accuracy, speed and memory](#side-by-side-comparisons) · "
334
+ "[Flatness statistics](#flatness-of-the-trained-checkpoints) · "
335
  "[Live explorer](https://huggingface.co/spaces/BurnyCoder/thirdloss-explorer) · "
336
  "[Paired tests and intervals](reports/summary.md)")
337
  if not any(o.get("complete") for o in study["stages"].values()):
research/src/thirdloss/report_paper.py CHANGED
@@ -328,12 +328,26 @@ def write_paper(study: dict, output: Path, figure_dir: Path, figures: dict) -> N
328
  "is 4/w<super>2</super> away from zero and grows toward the flat bottom. The final appendix "
329
  "specifies both schedules and the width test. "
330
  f"{_link(REPOSITORY + '/blob/main/reports/hybrid/preregistration.md', 'Frozen follow-up design')}")
 
331
  hybrid = study["hybrid"]
332
  if "hybrid_width" in figures:
333
  flow.append(_figure(figure_dir/figures["hybrid_width"],max_height=605))
334
  p(f"{hybrid['completed_arms']} of 48 full hybrid arms and {hybrid['completed_trunks']} of 8 shared "
335
  f"checkpoints have completed. Geometric endpoint: {hybrid['status']}. "
336
  f"{_link(REPOSITORY + '/blob/main/reports/hybrid/results.md', 'All observed widths, development scores and fit differences')}")
 
 
 
 
 
 
 
 
 
 
 
 
 
337
  for comparator,s in hybrid["comparisons"].items():
338
  lo,hi = s["median_ci"]
339
  p(f"Adaptive minus {METHODS[comparator]} median width gain {fmt(s['median_delta'],5)} "
 
328
  "is 4/w<super>2</super> away from zero and grows toward the flat bottom. The final appendix "
329
  "specifies both schedules and the width test. "
330
  f"{_link(REPOSITORY + '/blob/main/reports/hybrid/preregistration.md', 'Frozen follow-up design')}")
331
+ from .flatness_tables import hybrid_flatness_rows
332
  hybrid = study["hybrid"]
333
  if "hybrid_width" in figures:
334
  flow.append(_figure(figure_dir/figures["hybrid_width"],max_height=605))
335
  p(f"{hybrid['completed_arms']} of 48 full hybrid arms and {hybrid['completed_trunks']} of 8 shared "
336
  f"checkpoints have completed. Geometric endpoint: {hybrid['status']}. "
337
  f"{_link(REPOSITORY + '/blob/main/reports/hybrid/results.md', 'All observed widths, development scores and fit differences')}")
338
+ geometry=hybrid_flatness_rows(study["runs"])
339
+ if geometry:
340
+ p("Flatness at trained checkpoints","subheading")
341
+ p("Switch and final widths are medians over the listed seeds. Larger widths tolerate greater weight "
342
+ "displacement before the eight-window training loss rises by 0.1 nats. The directional interval "
343
+ "summarizes the middle half of the 16 two-sided distances within each seed. The last column "
344
+ "counts final rays whose crossing exceeded the search radius.")
345
+ flow.append(_grid(styles,["Hybrid arm","Seeds","Switch width","Final width","Middle 50% of directions","Rays at limit"],
346
+ [[r[i] for i in (0,1,2,3,5,6)] for r in geometry],[104,71,65,65,93,66]))
347
+ p("Secondary diagnostics compare the fitted primary checkpoints within each trainable parameterization. "
348
+ "The checkpoint ledger gives their finite widths, signed trace per parameter, RMS curvature and raw probes. "
349
+ f"{_link(REPOSITORY + '/blob/main/reports/flatness.md','Flatness measurements')} · "
350
+ f"{_link(REPOSITORY + '/blob/main/reports/amendments/checkpoint-flatness.md','Secondary protocol')}")
351
  for comparator,s in hybrid["comparisons"].items():
352
  lo,hi = s["median_ci"]
353
  p(f"Adaptive minus {METHODS[comparator]} median width gain {fmt(s['median_delta'],5)} "
research/src/thirdloss/report_records.py CHANGED
@@ -9,6 +9,7 @@ from pathlib import Path
9
  from tempfile import NamedTemporaryFile
10
 
11
  from .analysis import analyze_stage
 
12
  from .hybrid_results import hybrid_results
13
  from .records import GITHUB as REPOSITORY, PAGES
14
 
@@ -174,11 +175,19 @@ def run_record(folder: Path) -> dict:
174
  record["widths"] = {}
175
  for path in sorted(folder.glob("width-*.json")):
176
  width = read_json(path)
177
- point = {k:v for k,v in width.items() if k!="directions"}
178
  record["widths"][str(width["step"])] = point
179
  record["events"].append({"step":width["step"],"tokens":width["tokens"],
180
  "width":width["width"],"width_probe_nll":width["baseline_nll"]})
181
  record["events"].sort(key=lambda row:row.get("step",0))
 
 
 
 
 
 
 
 
182
  record["samples"] = read_lines(folder / "samples.jsonl")
183
  return record
184
 
 
9
  from tempfile import NamedTemporaryFile
10
 
11
  from .analysis import analyze_stage
12
+ from .flatness_stats import compact_width
13
  from .hybrid_results import hybrid_results
14
  from .records import GITHUB as REPOSITORY, PAGES
15
 
 
175
  record["widths"] = {}
176
  for path in sorted(folder.glob("width-*.json")):
177
  width = read_json(path)
178
+ point = compact_width(width)
179
  record["widths"][str(width["step"])] = point
180
  record["events"].append({"step":width["step"],"tokens":width["tokens"],
181
  "width":width["width"],"width_probe_nll":width["baseline_nll"]})
182
  record["events"].sort(key=lambda row:row.get("step",0))
183
+ diagnostic=read_json(folder/"flatness.json")
184
+ if diagnostic:
185
+ if diagnostic["checkpoint_file_sha256"]!=record.get("weights_sha256"):
186
+ raise ValueError(f"Geometry belongs to different checkpoint weights for {folder.name}")
187
+ record["flatness"]={**compact_width(diagnostic["width"]),
188
+ **{k:diagnostic[k] for k in ("protocol","probe_windows_sha256","width_device")},
189
+ **{k:diagnostic["curvature"][k] for k in ("rms_curvature","trace_per_parameter")},
190
+ "hessian_device":diagnostic["curvature"]["device"]}
191
  record["samples"] = read_lines(folder / "samples.jsonl")
192
  return record
193
 
research/src/thirdloss/reporting.py CHANGED
@@ -7,6 +7,7 @@ from statistics import median
7
  from urllib.parse import quote
8
 
9
  from .report_figures import build_figures
 
10
  from .readme_comparisons import comparison_sections
11
  from .report_paper import write_paper
12
  from .report_records import (
@@ -296,6 +297,7 @@ def build_report(root: Path = Path(".")) -> dict:
296
  root = Path(root).resolve()
297
  study = study_snapshot(root)
298
  hybrid = _hybrid_report(root,study)
 
299
  figures = build_figures(study, root / "docs" / "figures")
300
  study["figures"] = figures
301
  static = json.dumps(study, ensure_ascii=False, allow_nan=False, separators=(",", ":"))
 
7
  from urllib.parse import quote
8
 
9
  from .report_figures import build_figures
10
+ from .flatness_tables import flatness_ledger
11
  from .readme_comparisons import comparison_sections
12
  from .report_paper import write_paper
13
  from .report_records import (
 
297
  root = Path(root).resolve()
298
  study = study_snapshot(root)
299
  hybrid = _hybrid_report(root,study)
300
+ atomic_text(root/"reports"/"flatness.md",flatness_ledger(study))
301
  figures = build_figures(study, root / "docs" / "figures")
302
  study["figures"] = figures
303
  static = json.dumps(study, ensure_ascii=False, allow_nan=False, separators=(",", ":"))
research/src/thirdloss/study.py CHANGED
@@ -56,6 +56,20 @@ def weights_file(storage, summary):
56
  return path
57
 
58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  def parent_restart_file(storage,summary):
60
  """Recover a missing branch trunk from the collection's pinned, content-addressed receipt."""
61
  import shutil
@@ -134,18 +148,9 @@ def evaluate_one(project, storage, run_id, device):
134
  if summary["freeze_id"]!=sealed["freeze_id"]:
135
  raise ValueError("Existing evaluation uses a different freeze")
136
  return summary
137
- weights = weights_file(storage,summary)
138
  if sha256(data/"test.bin") != sealed["test_sha256"]:
139
  raise ValueError("Test stream differs from the frozen manifest")
140
- model = build_model(stage,summary["seed"],device,storage)
141
- state = load_file(str(weights),device="cpu")
142
- if stage=="stories":
143
- model.load_state_dict(state,strict=True)
144
- else:
145
- from peft import get_peft_model_state_dict,set_peft_model_state_dict
146
- if set(state)!=set(get_peft_model_state_dict(model)):
147
- raise ValueError("Adapter payload does not match the pinned backbone and target modules")
148
- set_peft_model_state_dict(model,state)
149
  recorder = Recorder(project,run_id)
150
  state = path.parent/"test_state.json"
151
  def report_progress(row):
 
56
  return path
57
 
58
 
59
+ def load_trained_model(storage,summary,device):
60
+ """Load verified weights in the recorded coordinates, including only the adapter overlay for Pythia."""
61
+ state=load_file(str(weights_file(storage,summary)),device="cpu")
62
+ model=build_model(summary["stage"],summary["seed"],device,storage)
63
+ if summary["stage"]=="stories":
64
+ model.load_state_dict(state,strict=True)
65
+ else:
66
+ from peft import get_peft_model_state_dict,set_peft_model_state_dict
67
+ if set(state)!=set(get_peft_model_state_dict(model)):
68
+ raise ValueError("Adapter payload does not match the pinned backbone and target modules")
69
+ set_peft_model_state_dict(model,state)
70
+ return model
71
+
72
+
73
  def parent_restart_file(storage,summary):
74
  """Recover a missing branch trunk from the collection's pinned, content-addressed receipt."""
75
  import shutil
 
148
  if summary["freeze_id"]!=sealed["freeze_id"]:
149
  raise ValueError("Existing evaluation uses a different freeze")
150
  return summary
 
151
  if sha256(data/"test.bin") != sealed["test_sha256"]:
152
  raise ValueError("Test stream differs from the frozen manifest")
153
+ model = load_trained_model(storage,summary,device)
 
 
 
 
 
 
 
 
154
  recorder = Recorder(project,run_id)
155
  state = path.parent/"test_state.json"
156
  def report_progress(row):
research/tests/test_flatness.py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Verify geometry statistics, censoring and a Hessian known exactly in the chosen coordinates."""
2
+
3
+ import math
4
+
5
+ import pytest
6
+ import torch
7
+
8
+
9
+ def test_curvature_keeps_trace_signs_and_counts_negative_eigenvalues_in_rms():
10
+ from thirdloss.checkpoint_flatness import hessian_statistics
11
+ p=torch.tensor([1.,2.,3.],dtype=torch.float64,requires_grad=True)
12
+ diagonal=torch.tensor([-2.,0.,5.],dtype=torch.float64)
13
+ result=hessian_statistics((diagonal*p.square()).sum()/2,(p,))
14
+ assert result["trace_per_parameter"]==pytest.approx(1.)
15
+ assert result["rms_curvature"]==pytest.approx(math.sqrt(29/3))
16
+ assert len(result["draws"])==8 and result["dimensions"]==3
17
+
18
+
19
+ def test_direction_quantiles_propagate_open_bounds_without_dropping_rays():
20
+ from thirdloss.flatness_stats import direction_summary,quantile_bounds
21
+ def direction(i,upper):
22
+ return {"direction":i,"negative":{"lower":0.,"upper":0.},"positive":{"lower":float(i),"upper":upper}}
23
+ data=direction_summary({"directions":[direction(1,1.),direction(2,2.),direction(3,3.),direction(4,None)]})
24
+ assert data["ray_count"]==8 and data["direction_q1"]==pytest.approx([1.75,1.75])
25
+ assert data["direction_q3"]==[3.25,None]
26
+ assert quantile_bounds([[2.,None]],.5)==[2.,None]
27
+
28
+
29
+ def test_flatness_table_preserves_seed_count_and_geometry_units():
30
+ from thirdloss.flatness_tables import hybrid_flatness_table
31
+ rows=[]
32
+ for seed,method,initial,end in ((21,"adaptive",10.,8.),(22,"adaptive",11.,9.),(21,"late",10.,7.)):
33
+ point={"width":end,"width_lower":end,"width_upper":end,"direction_q1":[5.,5.],
34
+ "direction_q3":[9.,9.],"ray_count":32,"censored_rays":0,"baseline_nll":2.}
35
+ rows.append({"stage":"stories","phase":"hybrid","method":method,"seed":seed,"status":"complete",
36
+ "tokens":2**24,"widths":{"2048":{**point,"width":initial,"width_lower":initial,"width_upper":initial},
37
+ "4096":point}})
38
+ table=hybrid_flatness_table(rows)
39
+ assert "21, 22" in table and "8.500" in table and "8.000–9.000" in table and "0/64" in table
40
+ assert "5.000–9.000" in table and "21 |" in table