Skip to content

feat(posttraining,#16744): PT_14 Neural Thermodynamic Laws (R08 distillation, toy CPU + mini-GPT) - #16842

Merged
myia-ai-01 merged 3 commits into
mainfrom
feature/16744-neural-thermo-laws
Sep 21, 2026
Merged

myia-ai-01 merged 3 commits into
mainfrom
feature/16744-neural-thermo-laws

Conversation

@jsboige

@jsboige jsboige commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Grain: DEEP/ml -- lane myia-po-2023:CoursIA -- prev: MED/qc #16835

Summary

Nouveau notebook PT_14_neural_thermodynamic_laws.ipynb (38 cellules : 24 md, 14 code) distillant R08 — Neural Thermodynamic Laws for LLM Training (Liu et al. 2025, arXiv:2505.10559), epic #16741 arc A1. Tous les protocoles ont été prototypés et vérifiés par machine avant rédaction (5 rounds de prototype : paysage numpy, diagramme de phase, E.1/E.2, protocoles torch).

Deliverables vs issue #16741/#16744

Livrable issue Section Mesure clé (commitée, outputs réels)
Distributions stationnaires SGD/SignGD river-valley P2 sigma(a) : SGD exact sur toute la gamme (0.1579/0.1582 à a=0.02 ; queue non monotone a=10→15 visible) ; SignGD saturation à eta aux grands a (régime télégraphe, documenté par le papier) ; plancher sqrt(2pi)/4*eta = 0.0627
Équipartition l_f indépendant de la sharpness P3 SGD plat en a avec loi exacte (sg²·eta/4)/(1−a·eta/2) : la dérive +33 % à a=5 est le facteur 1/(1−a·eta/2)=1.33 exactement ; T∼eta ratios 1.006–1.054
val loss linéaire en eta_min à confronter à nos runs P4 Verdict honnête : mini-GPT 106k au plateau (bruit d'étiquette q=0.15, phase chaude 9000 steps batch 16) — val(eta_min) plat à 0.4 % (1.4195/1.4173/1.4139) : terme thermique borné (C < 0.1), sous résolution du banc toy ; le GPT-2 rapporté (3.145+110·eta_min) le résout à son échelle (5M directions somment le bruit + convergence complète). Bonus : l'écart SGD/Adam(0,0) s'inverse entre régimes — hors plateau 2.50 vs 1.44 (la dynamique sign ne cale pas dans les directions raides), au plateau 1.4195 vs 1.4222 (plancher de température)
Schedule 1/t optimal + discontinuité eta/2 + durée bornée P5 Diagramme de phase (b, t_h) 4×6 : optimum empirique exactement (0.5, 10) = théorie, valeur 6.03e-06 vs 6.10e-06 prédite (−1 %)
Force entropique et entropic trapping (App E) P7-P8 E.1 : arrêts décroissants avec sigma_g (135→45→21 pour sigma_g=0.5→1.5→3.0), décalage vers les zones plates vérifié (note d'honnêteté sur la forme fermée x±) ; E.2 : zéro de dérive entre eta=0.3 (+4.45e-04) et 0.4 (−1.18e-03), eta* = 4c/(alpha·sigma_g²) = 0.4

Validation (H.1/H.3)

  • Papermill end-to-end kernel coursia-ml-training, exit 0 : 14/14 cellules code execution_count non-null + outputs, 0 erreur, 9 figures png.
  • C.1 : 3 exercices stubs sans erreur volontaire (return None/pass + print), indices # Indice/# Étape.
  • Torch CPU installé dans l'env (règle F) — vrai moteur, pas de workaround (SOTA-OK) ; temps d'exécution total ~7 min.
  • README : ligne PT-14 ajoutée au tableau, compte 16→17 réconcilié (intro + section Frontière qui était restée à 14), R08 ajouté aux références, CATALOG-STATUS non touché (automation-owned).

Références arXiv vérifiées

  • R08 : arXiv:2505.10559 (source, PDF GDrive distillé)
  • Cohen et al. Edge of Stability : arXiv:2103.00065 (vérifié par recherche web)

Closes #16744
See #16741

🤖 Generated with Claude Code

…R08 distillation)

Toy river-valley CPU + mini-GPT 106k torch: sigma(a) SGD/SignGD with edge
of stability and floor sqrt(2pi)/4*eta, equipartition l_f = (sg^2*eta/4)/(1-a*eta/2)
measured flat in a, T ~ eta, optimal 1/t decay phase diagram with exact theoretical
optimum (0.5, 10) and value 6.03e-06 vs 6.10e-06, Fourier two-temperature relaxation
(rate 0.0195 vs 2a*eta_B = 0.0200, 4 replicas), entropic trapping E.1 (stops 135 -> 45
-> 21 as sigma_g grows), blocking threshold E.2 (zero crossing at eta* = 0.4).

Mini-GPT confrontation (honest verdict): label-noise q=0.15 plateau protocol bounds
the thermal term (C < 0.1, sub-resolution at toy scale; GPT-2 3.145 + 110*eta_min
reported by R08 resolves it at scale); SGD vs Adam(0,0) gap inverts between progress
regime (2.50 vs 1.44) and plateau (1.4195 vs 1.4222) - the sign-dynamics temperature
floor. Executed end-to-end via papermill (kernel coursia-ml-training), 14 code cells,
9 figures, 0 errors.

Closes #16744
See #16741

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

MD hierarchy drift -- c16e4d0

Cette PR augmente le compte de defauts de rendu markdown
par rapport a la base de fusion e179e08 re-scannee.
Nouveaux defauts imputables au diff :

reference: merge base e179e08cc201e1e8ceb4db87cdee900664571a92 re-scanned (0 of 1 changed notebook(s) existed at base; others are additions; 0 had findings at base)
  +9  MyIA.AI.Notebooks/GenAI/PostTraining/PT_14_neural_thermodynamic_laws.ipynb
        +9 HEADING-IN-LIST

=== drift: +9 across 1 notebook(s), 0 burned down ===

Corriger (ex. - # Indice : ... -> - **Indice :** ...). See #11831.

@github-actions

Copy link
Copy Markdown
Contributor

✅ No prose/output mismatch detected in the notebooks this PR changed.

Scope = notebooks CHANGED in this PR, not the whole corpus. Explicit claim-check relations resolve only against named CLAIM_METRICS from the local output window and are classified SUPPORTED, CONTRADICTED, or UNPROVEN.
The markdown-claims-output-report run artifact contains the structured JSON report. See python scripts/check_markdown_claims_output.py --help for re-running locally.
Detector rationale: c.290 / c.331 / PR #11435 numeric pathology, extended with low-noise relational evidence.

@jsboige

jsboige commented Sep 19, 2026

Copy link
Copy Markdown
Owner Author

Grain: DEEP/ml -- lane myia-po-2023:CoursIA -- prev: MED/qc #16835

[DELIVERED] PT_14 Neural Thermodynamic Laws livré : notebook 38 cellules exécuté papermill (14 code, 0 erreur, 9 figures), README +1 ligne (17 notebooks), tous les livrables #16744 couverts. Prototypé 5 rounds avant rédaction (machine-vérifié). Verdict honnête mini-GPT documenté dans le body (terme thermique borné C<0.1 au plateau toy, Adam(0,0) gap inversé hors/at plateau).

@github-actions

Copy link
Copy Markdown
Contributor

Notebook PR Validation: PASS

  • Notebooks checked: 1
  • Code cells validated: 14
  • Result: All passed

Checks: H.1 (no errors), H.3 (execution_count), C.1 (no banned patterns)
Non-Python kernels (.NET/Lean): C.1 + errors only (execution_count advisory)
QuantConnect notebooks: C.1 + errors only (require QC Cloud for execution)

@github-actions github-actions Bot added the variation-tag-genre-offlist GENRE hors de l'enumeration variation-protocol §1 label Sep 19, 2026
@github-actions

github-actions Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Golden-Set Execution (H.7 P3)

✅ 8/8 notebooks passed (certified reproducible)

Notebook Status Time
2.1-Workflow-ML.ipynb ✅ SUCCESS 2.8s
2.2-Descente-de-gradient.ipynb ✅ SUCCESS 3.3s
2.3-Regression-lineaire-logistique.ipynb ✅ SUCCESS 3.9s
2.4-Arbres-Forets-Ensembles.ipynb ✅ SUCCESS 3.5s
Search-01-StateSpace.ipynb ✅ SUCCESS 2.9s
SL-1-LogicalLearning.ipynb ✅ SUCCESS 2.1s
rl_4_multi_armed_bandits.ipynb ✅ SUCCESS 17.1s
GameTheory-04c-NashExistence-Python.ipynb ✅ SUCCESS 2.9s

Pinned lockfile: scripts/notebook_tools/golden_set.lock.txt (H.7 P3, axe A #4208)

@github-actions

Copy link
Copy Markdown
Contributor

G-VAR-2/3 GENRE signals (advisory, non bloquant, #10020).
La lane `myia-po-2023:CoursIA` voit ces signaux actifs sur les mergees du jour (UTC 2026-09-19) :

G-VAR-2 plafonne a max(1, grains_mergees_du_jour // 3) LIGHT par lane et par jour, toutes categories LIGHT confondues -- un RATIO, pas un plafond plat ; le cap calcule du jour est dans le tally ci-dessus. G-VAR-3 interdit deux genres LIGHT consecutifs. Les signaux ci-dessus rendent le fait VISIBLE (labels variation-tier-inflation, `variation-genre-run`, `variation-genre-cap-exceeded`, `variation-genre-mismatch`, `variation-genre-unknown`) -- la decision de merge reste au coordinateur.

@github-actions

Copy link
Copy Markdown
Contributor

Notebook outputs-required (H.4 schema): PASS (every code cell carries an outputs: list)

@clusterManager-Myia clusterManager-Myia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: LGTM (vérifié firsthand)

[Hermes] po-2026 — review PT_14 Neural Thermodynamic Laws (R08, arXiv:2505.10559), head c16e4d07 (notebook 38 cellules + README).

Vérifications sur le blob au head :

  1. Structure : 14/14 code cells exec counts non-null, 0 erreur, 9 figures png — conforme aux preuves H.1/H.3.
  2. Table deliverables ↔ outputs, intégral : sigma(a) 0.1579/0.1582 et plancher 0.0627 ✓ ; équipartition T∼eta ratios 1.006–1.054 ✓ ; val(eta_min) 1.4195/1.4173/1.4139 plat + amplitude sweep 0.4 % ✓ ; SGD vs Adam hors plateau 2.5037/1.4351 et au plateau 1.4195/1.4222 (inversion confirmée) ✓ ; diagramme de phase optimum empirique (0.5, 10) = 6.03e-06 vs 6.10e-06 théorique ✓ ; E.1 arrêts 135.1/138.3/139.4 → 45 → 21 pour σg 0.5/1.5/3.0 ✓ ; E.2 zéro de dérive +4.45e-04/−1.18e-03 autour de eta*=0.4 ✓. Aucun chiffre de prose non ancré.
  3. Qualité scientifique : les verdicts négatifs/bornés sont rapportés honnêtement (terme thermique sous résolution du banc toy, note sur le biais d'initialisation liée) — pas de survente du toy vers le régime GPT-2.
  4. Security scan : zéro match sur le diff.

Cap #15511 : COMMENT (author=jsboige), relais à myia-ai-01:CoursIA pour event formel éventuel.

[Hermes hermes-pr-review, cycle :11 19/09, host c92df397a786]

@jsboige

jsboige commented Sep 19, 2026

Copy link
Copy Markdown
Owner Author

[adjoint — preflight COMMENTED] PR #16842 — BLOCKED-WITH-SUBSTANCE au head c16e4d0776a96005e23dc8ddb25b6bd04e593dbb.

La substance scientifique, la review exacte-head, B.0 et les preuves d'exécution sont propres. Le blocage est local et mécanique : le check requis markdown-rendering guard (main-repo notebooks) échoue sur 9 HEADING-IN-LIST dans le notebook neuf, puis PR gate agrège ce rouge.

Le check donne la forme canonique : dans les listes d'exercices, remplacer les lignes du type - # Indice : ... / - # Étape ... par de la prose (- **Indice :** ..., - **Étape ... :** ...). Repair markdown-only : ne pas toucher aux cellules code ni aux outputs; relancer le guard et recapturer au nouveau head.

Aucun dossier READY n'est posé tant que le check requis reste rouge.

…31/33/35

- # Indice 1 : ...  ->  - **Indice 1 :** ...
(cells markdown 31/33/35, 2 lignes chacune). Edition markdown uniquement :
cellules code byte-identiques (dump JSON sort_keys verifie), outputs
inchanges — exception C.2 (modifs markdown seules).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

MD hierarchy drift -- e239cdc

Cette PR augmente le compte de defauts de rendu markdown
par rapport a la base de fusion e179e08 re-scannee.
Nouveaux defauts imputables au diff :

reference: merge base e179e08cc201e1e8ceb4db87cdee900664571a92 re-scanned (0 of 1 changed notebook(s) existed at base; others are additions; 0 had findings at base)
  +3  MyIA.AI.Notebooks/GenAI/PostTraining/PT_14_neural_thermodynamic_laws.ipynb
        +3 HEADING-IN-LIST

=== drift: +3 across 1 notebook(s), 0 burned down ===

Corriger (ex. - # Indice : ... -> - **Indice :** ...). See #11831.

…(markdown-rendering guard)

Guard verdict [heading_in_list] on cells 31/33/35: '- # Étape 1 : ...'
renders as an oversized heading inside a list item. Fixed with the
dedicated tool (fix_hint_headings.py --apply, 3 occurrences): the hash
token is now inline code -- `# Étape 1` -- so the line stays a list
item. Markdown cells only, no code cell touched (C.2 exception).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Path-collision (organ #13359/#13615)

Cette PR #16842 (feat(posttraining,#16744): PT_14 Neural Thermodynamic Laws (R08 distillation, toy CPU + mini-GPT)) touche au moins un chemin de fichier aussi modifie par d'autres PRs ouvertes. Risque de double-livraison (meme fichier livre deux fois, 2x le travail et 2x les runs CI). Advisory : parfois legitime (tranches coordonnees, partition paths: explicite, PRs empilees exclues) -- l'organe rend visible, il ne bloque pas.

@github-actions github-actions Bot added the pr-overlap Advisory: another open PR touches the same files (organ #13615) label Sep 20, 2026
@jsboige

jsboige commented Sep 20, 2026

Copy link
Copy Markdown
Owner Author

[ADJOINT PREFLIGHT]
schema: 1
lane: myia-po-2025:CoursIA-2
pr: 16842
head: 4a0bbac
complete: true
body: read
comments-reviewed: 10
reviews-reviewed: 1
threads-reviewed: 0
threads-unresolved: 0
surfaces-sha256: 42c6c8fca4fbb07d785f3e49c22a8cf6df7c2c0d3b8537fa20ec44ec1502c605
diff-files: 2
diff-additions: 1845
diff-deletions: 2
checks: latest-wins-green
b0: clear
scope: pass
domain: pass
verdict: READY
[/ADJOINT PREFLIGHT]

@myia-ai-01
myia-ai-01 merged commit 16cbffd into main Sep 21, 2026
83 of 84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-overlap Advisory: another open PR touches the same files (organ #13615) variation-tag-genre-offlist GENRE hors de l'enumeration variation-protocol §1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Neural Thermodynamic Laws : thermodynamique de l'entraînement — T ∼ η, équipartition, schedule 1/t

3 participants