OpenPeer AI NTK Trainer

This workspace contains three related paths:

  • A real fine-tuning path that uses ntkmirror to fit signed log-gate controllers on a frozen Hugging Face causal LLM, 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 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.

newplot

Install

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:

pip install -e ".[demo]"

To enable OpenBB-backed chart generation for benchmarks, install the chart extra too:

pip install -e ".[demo,charts]"

To enable the runtime GUI, install the GUI extra:

pip install -e ".[gui]"

Run the tinygrad demo

python -m openpeer_trainer.cli demo --steps 100 --target-accuracy 0.99

The demo stops early as soon as it reaches the requested accuracy target.

Run benchmarks and charts

python -m openpeer_trainer.cli bench --steps 10 25 50 --target-accuracy 0.99

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.

Launch the runtime GUI

python -m openpeer_trainer.cli gui

The GUI shows the same dashboard, a live benchmark runner, and a hardware-spec table for this computer.

Fit an ntkmirror controller

python -m openpeer_trainer.cli fit --model OpenPeerAI/OpenPeerLLM --train-jsonl train.jsonl --out runs/openpeer_controller.pt

JSONL format

Preferred schema:

{"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.

References

Downloads last month

-

Downloads are not tracked for this model. How to track
Video Preview
loading

Model tree for OpenPeerAI/OpenPeer-AI-NTK-Trainer

Finetuned
(2)
this model