| Metadata-Version: 2.4
|
| Name: openpeer-ntk-trainer
|
| Version: 0.1.0
|
| Summary: OpenPeerLLM trainer using ntkmirror controllers and a tinygrad gate demo
|
| Requires-Python: >=3.10
|
| Description-Content-Type: text/markdown
|
| Requires-Dist: torch>=2.2
|
| Requires-Dist: transformers>=4.42
|
| Requires-Dist: pandas>=2.2
|
| Requires-Dist: plotly>=6.0
|
| Requires-Dist: psutil>=6.0
|
| Provides-Extra: demo
|
| Requires-Dist: tinygrad>=0.10.0; extra == "demo"
|
| Provides-Extra: charts
|
| Requires-Dist: openbb>=4.0; extra == "charts"
|
| Provides-Extra: gui
|
| Requires-Dist: streamlit>=1.36; extra == "gui"
|
| Provides-Extra: ntk
|
| Requires-Dist: ntkmirror @ git+https://github.com/leochlon/ntkmirror.git ; extra == "ntk"
|
| Provides-Extra: all
|
| Requires-Dist: tinygrad>=0.10.0; extra == "all"
|
| Requires-Dist: openbb>=4.0; extra == "all"
|
| Requires-Dist: streamlit>=1.36; extra == "all"
|
| Requires-Dist: ntkmirror @ git+https://github.com/leochlon/ntkmirror.git ; extra == "all"
|
|
|
|
|
|
|
| This workspace contains three related paths:
|
|
|
| * 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 LM, and
|
| * A tinygrad-backed smoke demo that trains only gate parameters on a synthetic task so the controller idea can be validated locally and cheaply.
|
| * A benchmark pipeline that records accuracy, loss, memory, process counts, predictability, and throughput, then renders a combined dashboard plus OpenBB-backed charts.
|
| * A runtime GUI for live benchmark runs with current hardware specs baked into the view.
|
|
|
| The OpenPeerLLM model card currently points at `OpenPeerAI/OpenPeerLLM`, but that repository card is not a standard inference-ready Hugging Face example. The trainer therefore targets any causal LM that `transformers` can load, with `OpenPeerAI/OpenPeerLLM` as the primary model ID and a smaller fallback for local demos.
|
|
|
|
|
|
|
| ```powershell
|
| pip install -e .
|
| pip install tinygrad
|
| pip install git+https://github.com/leochlon/ntkmirror.git
|
| ```
|
|
|
| If you only want the local demo, install the demo extra instead:
|
|
|
| ```powershell
|
| pip install -e ".[demo]"
|
| ```
|
|
|
| To enable OpenBB-backed chart generation for benchmarks, install the chart extra too:
|
|
|
| ```powershell
|
| pip install -e ".[demo,charts]"
|
| ```
|
|
|
| To enable the runtime GUI, install the GUI extra:
|
|
|
| ```powershell
|
| pip install -e ".[gui]"
|
| ```
|
|
|
|
|
|
|
| ```powershell
|
| python -m openpeer_trainer.cli demo
|
| ```
|
|
|
| The demo stops early as soon as it reaches the requested accuracy target.
|
|
|
|
|
|
|
| ```powershell
|
| python -m openpeer_trainer.cli bench
|
| ```
|
|
|
| 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.
|
|
|
|
|
|
|
| ```powershell
|
| python -m openpeer_trainer.cli gui
|
| ```
|
|
|
| The GUI shows the same dashboard, a live benchmark runner, and a hardware-spec table for this computer.
|
|
|
|
|
|
|
| ```powershell
|
| python -m openpeer_trainer.cli fit
|
| ```
|
|
|
|
|
|
|
| Preferred schema:
|
|
|
| ```jsonl
|
| {"prompt":"Question: 14 + 27 = ?\nAnswer:","completion":" 41"}
|
| {"prompt":"Question: 36 + 18 = ?\nAnswer:","completion":" 54"}
|
| ```
|
|
|
| The trainer also accepts `instruction`/`response`, `question`/`answer`, or `text` records when the underlying ntkmirror loader supports them.
|
|
|
|
|
|
|
| * OpenPeer AI / Riemann Computing Inc. / Andrew Magdy Kamal Nassief
|
| * ntkmirror: https://github.com/leochlon/ntkmirror
|
| * Tinygrad: https://github.com/tinygrad/tinygrad
|
|
|
|
|