From 65cfc3255f03b5abb528990ae595d0a69b19a2df Mon Sep 17 00:00:00 2001 From: Guitared Date: Tue, 3 Mar 2026 14:11:42 +0700 Subject: [PATCH 1/3] optimize singleton token params in generate_text --- training/dashboard.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/training/dashboard.py b/training/dashboard.py index a3a1503..ed019ef 100644 --- a/training/dashboard.py +++ b/training/dashboard.py @@ -142,7 +142,7 @@ def softmax(x): e = np.exp(x) return e / np.sum(e) -def generate_text(W, tok, max_tokens=64, temperature=0.8): +def generate_text(W, max_tokens=64, temperature=0.8): tokenizer = get_tokenizer() if tokenizer is None: return '[no tokenizer]' @@ -244,7 +244,7 @@ def generation_thread(): with S.gen_lock: S.gen_status = 'idle' continue - text = generate_text(W, get_tokenizer(), max_tokens=64, temperature=0.8) + text = generate_text(W, max_tokens=64, temperature=0.8) with S.gen_lock: S.gen_text = text S.gen_step = S.step @@ -851,7 +851,7 @@ def main(): try: W = load_weights_from_ckpt(CKPT_PATH) if W: - text = generate_text(W, get_tokenizer(), max_tokens=64, temperature=0.8) + text = generate_text(W, max_tokens=64, temperature=0.8) with S.gen_lock: S.gen_text = text S.gen_step = S.step From b8f09a685354b4ec3fbd381ae49844f0bf655770 Mon Sep 17 00:00:00 2001 From: Guitared Date: Tue, 3 Mar 2026 14:14:30 +0700 Subject: [PATCH 2/3] fix non-interactive session error and sudo password input for powermetrics --- training/dashboard.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/training/dashboard.py b/training/dashboard.py index ed019ef..b55c12e 100644 --- a/training/dashboard.py +++ b/training/dashboard.py @@ -672,6 +672,8 @@ def spawn_training(resume=False, steps=10000): return proc def spawn_powermetrics(): + if not sys.stdin.isatty(): + return None try: proc = subprocess.Popen( ['sudo', 'powermetrics', '--samplers', 'cpu_power,gpu_power,ane_power', '-i', '1000'], From a14ce098fb901eee48448bc1439346d5f0728051 Mon Sep 17 00:00:00 2001 From: Guitared Date: Tue, 3 Mar 2026 14:18:35 +0700 Subject: [PATCH 3/3] Capitalize doc header --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ce3df1f..403c668 100644 --- a/README.md +++ b/README.md @@ -12,20 +12,20 @@ This is a **research project**, not a production framework. The goal was to demonstrate that **training on the Apple Neural Engine — and potentially other NPUs — is possible**, and that the barrier has always been software support, not hardware capability. The ANE is a remarkably capable piece of silicon that Apple restricts to inference-only use through CoreML. This project bypasses that restriction using reverse-engineered private APIs to show what's possible when you give the hardware a chance. -### What this project is +### What This Project Is - A proof of concept for ANE training via `_ANEClient` and `_ANECompiler` private APIs - A set of benchmarks documenting real ANE performance characteristics (throughput, power, SRAM behavior) - A reference for anyone exploring direct ANE access outside CoreML - Research code that I update when I find something interesting -### What this project is not +### What This Project Is Not - A maintained framework or library - A replacement for CoreML, MLX, llama.cpp, or any production inference stack - A path to training large models on consumer hardware (yet) -### On the hype +### On The Hype Some coverage of this project has overstated its implications. To be clear: @@ -37,7 +37,7 @@ The honest results — including all limitations — are documented in the accom - [Part 1: Reverse Engineering](https://maderix.substack.com/p/inside-the-m4-apple-neural-engine) - [Part 2: Benchmarks](https://maderix.substack.com/p/inside-the-m4-apple-neural-engine-615) -### On maintenance +### On Maintenance I don't intend to grow this into a large community project. My focus is on original research (compiler infrastructure for edge AI optimization), and maintaining an open-source framework takes time away from that.