Mentors4EDU commited on
Commit
b02b5a9
·
verified ·
1 Parent(s): 9a9cece

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +84 -84
README.md CHANGED
@@ -17,88 +17,88 @@ tags:
17
  - epoch
18
  - epoch-time
19
  ---
20
- # OpenPeer NTK Trainer
21
-
22
- This workspace contains three related paths:
23
-
24
- * A real fine-tuning path that uses [ntkmirror](https://github.com/leochlon/ntkmirror) to fit signed log-gate controllers on a frozen Hugging Face causal LLM, and
25
- * A tinygrad-backed smoke demo that trains only gate parameters on a synthetic task so the controller idea can be validated locally and cheaply.
26
- * A benchmark pipeline that records accuracy, loss, memory, process counts, predictability, and throughput, then renders a combined dashboard plus OpenBB-backed charts.
27
- * A runtime GUI for live benchmark runs with current hardware specs baked into the view.
28
-
29
- The trainer therefore targets any causal LLM that `transformers` can load, with `OpenPeerAI/OpenPeerLLM` as the primary model ID and a smaller fallback for local demos.
30
-
31
- ![newplot](https://cdn-uploads.huggingface.co/production/uploads/67b50285f432f49d3afe5bb1/OuP9QS0zVUKB_hIofQgIp.png)
32
-
33
- ## Install
34
-
35
- ```powershell
36
- pip install -e .
37
- pip install tinygrad
38
- pip install git+https://github.com/leochlon/ntkmirror.git
39
- ```
40
-
41
- If you only want the local demo, install the demo extra instead:
42
-
43
- ```powershell
44
- pip install -e ".[demo]"
45
- ```
46
-
47
- To enable OpenBB-backed chart generation for benchmarks, install the chart extra too:
48
-
49
- ```powershell
50
- pip install -e ".[demo,charts]"
51
- ```
52
-
53
- To enable the runtime GUI, install the GUI extra:
54
-
55
- ```powershell
56
- pip install -e ".[gui]"
57
- ```
58
-
59
- ## Run the tinygrad demo
60
-
61
- ```powershell
62
- python -m openpeer_trainer.cli demo --steps 100 --target-accuracy 0.99
63
- ```
64
-
65
- The demo stops early as soon as it reaches the requested accuracy target.
66
-
67
- ## Run benchmarks and charts
68
-
69
- ```powershell
70
- python -m openpeer_trainer.cli bench --steps 10 25 50 --target-accuracy 0.99
71
- ```
72
-
73
- The benchmark runner writes a CSV plus HTML charts under `artifacts/benchmarks/`. The main output is `benchmark_dashboard.html`, a multi-panel dashboard showing memory, processes, learned gates, loss, predictability, accuracy, training steps, time, and epoch in actual seconds. If the OpenBB charting extension is installed, the companion charts are rendered through OpenBB; otherwise the script falls back to Plotly with the same data.
74
-
75
- ## Launch the runtime GUI
76
-
77
- ```powershell
78
- python -m openpeer_trainer.cli gui
79
- ```
80
-
81
- The GUI shows the same dashboard, a live benchmark runner, and a hardware-spec table for this computer.
82
-
83
- ## Fit an ntkmirror controller
84
-
85
- ```powershell
86
- python -m openpeer_trainer.cli fit --model OpenPeerAI/OpenPeerLLM --train-jsonl train.jsonl --out runs/openpeer_controller.pt
87
- ```
88
-
89
- ## JSONL format
90
-
91
- Preferred schema:
92
-
93
- ```jsonl
94
- {"prompt":"Question: 14 + 27 = ?\nAnswer:","completion":" 41"}
95
- {"prompt":"Question: 36 + 18 = ?\nAnswer:","completion":" 54"}
96
- ```
97
-
98
- The trainer also accepts `instruction`/`response`, `question`/`answer`, or `text` records when the underlying ntkmirror loader supports them.
99
-
100
- ## References
101
-
102
- * OpenPeer AI / Riemann Computing Inc. / Andrew Magdy Kamal Nassief
103
- * ntkmirror: https://github.com/leochlon/ntkmirror
104
  * Tinygrad: https://github.com/tinygrad/tinygrad
 
17
  - epoch
18
  - epoch-time
19
  ---
20
+ # OpenPeer AI NTK Trainer
21
+
22
+ This workspace contains three related paths:
23
+
24
+ * A real fine-tuning path that uses [ntkmirror](https://github.com/leochlon/ntkmirror) to fit signed log-gate controllers on a frozen Hugging Face causal LLM, and
25
+ * A tinygrad-backed smoke demo that trains only gate parameters on a synthetic task so the controller idea can be validated locally and cheaply.
26
+ * A benchmark pipeline that records accuracy, loss, memory, process counts, predictability, and throughput, then renders a combined dashboard plus OpenBB-backed charts.
27
+ * A runtime GUI for live benchmark runs with current hardware specs baked into the view.
28
+
29
+ The trainer therefore targets any causal LLM that `transformers` can load, with `OpenPeerAI/OpenPeerLLM` as the primary model ID and a smaller fallback for local demos.
30
+
31
+ ![newplot](https://cdn-uploads.huggingface.co/production/uploads/67b50285f432f49d3afe5bb1/OuP9QS0zVUKB_hIofQgIp.png)
32
+
33
+ ## Install
34
+
35
+ ```powershell
36
+ pip install -e .
37
+ pip install tinygrad
38
+ pip install git+https://github.com/leochlon/ntkmirror.git
39
+ ```
40
+
41
+ If you only want the local demo, install the demo extra instead:
42
+
43
+ ```powershell
44
+ pip install -e ".[demo]"
45
+ ```
46
+
47
+ To enable OpenBB-backed chart generation for benchmarks, install the chart extra too:
48
+
49
+ ```powershell
50
+ pip install -e ".[demo,charts]"
51
+ ```
52
+
53
+ To enable the runtime GUI, install the GUI extra:
54
+
55
+ ```powershell
56
+ pip install -e ".[gui]"
57
+ ```
58
+
59
+ ## Run the tinygrad demo
60
+
61
+ ```powershell
62
+ python -m openpeer_trainer.cli demo --steps 100 --target-accuracy 0.99
63
+ ```
64
+
65
+ The demo stops early as soon as it reaches the requested accuracy target.
66
+
67
+ ## Run benchmarks and charts
68
+
69
+ ```powershell
70
+ python -m openpeer_trainer.cli bench --steps 10 25 50 --target-accuracy 0.99
71
+ ```
72
+
73
+ The benchmark runner writes a CSV plus HTML charts under `artifacts/benchmarks/`. The main output is `benchmark_dashboard.html`, a multi-panel dashboard showing memory, processes, learned gates, loss, predictability, accuracy, training steps, time, and epoch in actual seconds. If the OpenBB charting extension is installed, the companion charts are rendered through OpenBB; otherwise the script falls back to Plotly with the same data.
74
+
75
+ ## Launch the runtime GUI
76
+
77
+ ```powershell
78
+ python -m openpeer_trainer.cli gui
79
+ ```
80
+
81
+ The GUI shows the same dashboard, a live benchmark runner, and a hardware-spec table for this computer.
82
+
83
+ ## Fit an ntkmirror controller
84
+
85
+ ```powershell
86
+ python -m openpeer_trainer.cli fit --model OpenPeerAI/OpenPeerLLM --train-jsonl train.jsonl --out runs/openpeer_controller.pt
87
+ ```
88
+
89
+ ## JSONL format
90
+
91
+ Preferred schema:
92
+
93
+ ```jsonl
94
+ {"prompt":"Question: 14 + 27 = ?\nAnswer:","completion":" 41"}
95
+ {"prompt":"Question: 36 + 18 = ?\nAnswer:","completion":" 54"}
96
+ ```
97
+
98
+ The trainer also accepts `instruction`/`response`, `question`/`answer`, or `text` records when the underlying ntkmirror loader supports them.
99
+
100
+ ## References
101
+
102
+ * OpenPeer AI / Riemann Computing Inc. / Andrew Magdy Kamal Nassief
103
+ * ntkmirror: https://github.com/leochlon/ntkmirror
104
  * Tinygrad: https://github.com/tinygrad/tinygrad