From 967565ab59604bc0b4ccf547cf1ed689de454985 Mon Sep 17 00:00:00 2001 From: Drake Stapleton Date: Fri, 9 Oct 2026 16:58:49 -0500 Subject: [PATCH 1/2] docs: mark yardstick Python as historical evidence, not active AIEN execution Operator decision 2026-10-09 (yardsticks#2, arch#12). No .py file changed. Crumbs recompiled (structural block only; whispers unchanged). Co-Authored-By: Claude Opus 5.5 --- HISTORICAL-PYTHON.md | 40 +++++++++++++++++++ README.md | 2 + .../benchmarks/.crumb | 30 ++++++++++---- .../modular-nemotron-h-kvexp/tests/.crumb | 30 ++++++++++---- yardsticks/prime-drag-race-cuda/.crumb | 34 +++++++++++----- 5 files changed, 110 insertions(+), 26 deletions(-) create mode 100644 HISTORICAL-PYTHON.md diff --git a/HISTORICAL-PYTHON.md b/HISTORICAL-PYTHON.md new file mode 100644 index 0000000..f2c10fb --- /dev/null +++ b/HISTORICAL-PYTHON.md @@ -0,0 +1,40 @@ +# HISTORICAL — NOT PART OF ACTIVE AIEN EXECUTION + +The nine Python files listed below are retained, byte for byte, as frozen historical evidence of two outside yardsticks (a Modular MAX Nemotron-H KV-head-expansion adapter and a TinyLlama reference-oracle generator). They are not part of any active AIEN build, qualification run, CI workflow, or runtime. + +## Decision + +Operator decision, Drake, 2026-10-09 (recorded against aien-dev/aien-yardsticks#2 and aien-dev/aien-architecture#12): Option 1 approved. Preserve legacy Python qualification scripts and yardstick experiments as frozen historical evidence. This does not relax the prohibition on Python in AIEN's active runtime or trusted tooling. + +1. The retained files are marked HISTORICAL — NOT PART OF ACTIVE AIEN EXECUTION (this file). +2. Original source bytes, receipts, hashes, and historical test outcomes are preserved. No `.py` file is modified by this marking. +3. No production entry point, active build, CI qualification workflow, or current runtime depends on these files, with one exception that is disclosed below ("Known operational reference"). +4. Historical evidence is not altered to conform to today's standards. The older notes in the READMEs ("scheduled for replacement by Rust") are kept as written; they are superseded by this decision. +5. Scoped claim: the enforceable claim is that AIEN's **active trusted execution path** is Python-free. This repository is **not** claimed to be Python-free. +6. Reactivating, replacing, or requalifying any of these files (including the Rust replacement proposed in aien-yardsticks#2) needs a separate task and new evidence. No Rust rewrite and no deletion is made or implied here. + +## File table + +All hashes are of the files at repository commit `765eec0` (default branch `main`). Paths below are relative to the repository root. + +| Path | SHA-256 | Git blob | What it was for | Result / receipt it backs | +|---|---|---|---|---| +| `yardsticks/modular-nemotron-h-kvexp/__init__.py` | `05952e288c9d9b30c6a56ed305dc176a88b90abe3f85a6a83d3c5b6c79d5c041` | `f0b4617a99344bf2940f40af205715ba09f13005` | Exports the KV-head-expanded Nemotron-H adapter for MAX | No receipt. Served model `atlas-lightning-omni` (see operational reference) | +| `yardsticks/modular-nemotron-h-kvexp/arch.py` | `847e83099dde0bd3423b395b0ad2b440ea02d1caeaa527cc0b25e72e22c9d9a3` | `4e012b6db809edf1a966136c9636b610955c82c1` | Registers the expanded architecture with MAX | No receipt | +| `yardsticks/modular-nemotron-h-kvexp/config.py` | `2bc8afa5bbae928563d510999b4ec63d5ab2dd5b671a9d10da165aa9fe4f7005` | `5145eaa9289d08bc0b79233e3061e5545ed5d2a5` | Config subclass expanding KV heads so MAX's GQA kernel accepts Nemotron-H | No receipt | +| `yardsticks/modular-nemotron-h-kvexp/model.py` | `ca7169425190fde42fd3a65d2a794f8d711cc1276cb6eb536588d9cd96445373` | `4c5fcc39f71e84f8eac1be93c19d5ee2f63c4582` | Pipeline model subclass using the expanded config | No receipt | +| `yardsticks/modular-nemotron-h-kvexp/weight_adapters.py` | `73a424cee22eac1458f799bba5d2aaa3d921ce21a6e5685dc9af4847540a6e1e` | `cd8a20ce975f2aa89981b5fda5d5efc274c9fdd3` | State-dict conversion, optional PEFT LoRA fold, KV-head replication | No receipt | +| `yardsticks/modular-nemotron-h-kvexp/benchmarks/bench_kv_expansion.py` | `fa48b860a8327db08d310287481d95ead0a497ddbc96cb98cb2ec52cf7008dc0` | `2909c2a019caa4aaecf9f04495658e3130c63cfd` | Times KV-head replication latency and memory throughput on ARM64 | Recorded whisper in `yardsticks/modular-nemotron-h-kvexp/benchmarks/.crumb` (id `bench-results`, 2026-09-18): 5.49 ms per layer, 285.63 ms for the 52-layer model, 12.80 GB/s. No separate receipt file | +| `yardsticks/modular-nemotron-h-kvexp/tests/__init__.py` | `4544a6f2ce7fa2405a38963e240afcec63c75b0a7a920a82e1a7b663d5a7e4d7` | `59d9449d9a4bb8435274df5f9ae72e5c84f898c9` | Test package marker | See `test_kvexp.py` | +| `yardsticks/modular-nemotron-h-kvexp/tests/test_kvexp.py` | `b81573141728bc381886982770171936be9e40ee83b31f511d87bef673de6a2d` | `589b292a6e03c9792a3f3788e9078e1f3ea400f1` | Unit tests for expansion factor, LoRA delta, bfloat16 round trip, tensor replication | Recorded whisper in `yardsticks/modular-nemotron-h-kvexp/tests/.crumb` (id `test-suite-pass`, 2026-09-18): 100% pass across 7 unit tests. No separate receipt file | +| `yardsticks/tinyllama-oracle/generate_tinyllama_oracle.py` | `6247aa9d4bded40fa8756be278eec3c043ec6e65c506ccbc1f579807ae006b0d` | `0c879e5b1486c276b2ef9e627835198ee54b0fde` | Generated the TinyLlama-1.1B-Chat FP32 CPU reference answers (activations, logits, greedy sequences) | Fixture `tinyllama_oracle.safetensors` and `tinyllama_oracle_manifest.json` (SHA-256 manifest) held in aien-dev/aien-sovereign-core `crates/aien-inference-abi/fixtures/`; candidate gates in aien-dev/aien-sovereign-core `docs/release/ORACLE-FIXTURE-CAND4.md` and aien-dev/aien-architecture `qualification/candidates/CAND-4.gates.md`. The script here is a plain copy from sovereign-core commit `8b5caed` | + +Other tracked files that mention Python and are left as written: `yardsticks/modular-nemotron-h-kvexp/pyproject.toml`, the two yardstick READMEs. The CUDA yardstick (`yardsticks/prime-drag-race-cuda/`) has no Python. + +## Known operational reference (disclosed, not hidden) + +`scripts/start_max_lightning_18006.sh` in aien-dev/aien-sovereign-core (and the home-directory copy that `crates/spark-cockpit-rs` launches on a "start"/"restart" of `max-server`) starts the outside Modular MAX server with `--custom-architectures .../aien-yardsticks/yardsticks/modular-nemotron-h-kvexp`. That loads this adapter's Python inside MAX, an outside yardstick server, not an AIEN-built component. This marking does not change that script. Whether the MAX launch is inside the "active trusted execution path" is an operator question and is reported separately. + +## Rust replacement + +aien-yardsticks#2 proposes a Rust replacement. It is not done here. If it goes ahead it is a separate task with new evidence (item 6). diff --git a/README.md b/README.md index 1b404a0..7546d18 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,5 @@ Outside yardsticks AIEN is measured against (MAX, llama.cpp, vLLM). Never part o | CUDA mirror of the AIEN native prime sieve kernel (Prime Drag Race) | `yardsticks/prime-drag-race-cuda/` | Python is tolerated here only until it is replaced by Rust. + +> Superseded 2026-10-09: the Python here is retained as frozen historical evidence, not part of active AIEN execution, and is not scheduled for deletion. See [`HISTORICAL-PYTHON.md`](HISTORICAL-PYTHON.md). diff --git a/yardsticks/modular-nemotron-h-kvexp/benchmarks/.crumb b/yardsticks/modular-nemotron-h-kvexp/benchmarks/.crumb index 272b9eb..80d23d8 100644 --- a/yardsticks/modular-nemotron-h-kvexp/benchmarks/.crumb +++ b/yardsticks/modular-nemotron-h-kvexp/benchmarks/.crumb @@ -1,22 +1,36 @@ { - "schema_version": "1.0", "dir_path": "./modular/nemotron_h_kvexp/benchmarks", - "purpose": { - "summary": "Performance and throughput micro-benchmarks for KV-head expansion on Grace Neoverse V2", - "created_by": "AIEN", - "session_id": "modular-upstream-packaging", - "created_at": "2026-09-18T14:26:00Z" + "extensions": { + "generated": { + "children": [], + "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "compiled_at": "2026-10-09T21:58:26Z", + "compiler": "crumb-compile/1", + "digest": "sha256:02aad50a34816d938dadf49d4c6ab5c0ec634fe0aebb9cde20d5e9a582a4a99c", + "evidence_files": 0, + "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "files": 1, + "generated_at_commit": "765eec0f511594d8b9dbfde8dbd9aa22544a0163", + "source_tree": "sha256:75888bf9d9c1fbef4f70fb4c63d01c39a52d5f60a398dcf11d8650fe9360b2d2" + } }, "parent": { "canonical": "./modular/nemotron_h_kvexp", "name": "nemotron_h_kvexp" }, + "purpose": { + "created_at": "2026-09-18T14:26:00Z", + "created_by": "AIEN", + "session_id": "modular-upstream-packaging", + "summary": "Performance and throughput micro-benchmarks for KV-head expansion on Grace Neoverse V2" + }, + "schema_version": "1.0", "whispers": [ { "author": "AIEN", + "message": "Benchmark measured 5.49 ms per layer and 285.63 ms for full 52-layer Nemotron-30B model at 12.80 GB/s.", "timestamp": "2026-09-18T14:26:00Z", - "whisper_id": "bench-results", - "message": "Benchmark measured 5.49 ms per layer and 285.63 ms for full 52-layer Nemotron-30B model at 12.80 GB/s." + "whisper_id": "bench-results" } ] } diff --git a/yardsticks/modular-nemotron-h-kvexp/tests/.crumb b/yardsticks/modular-nemotron-h-kvexp/tests/.crumb index 6b35396..43e5000 100644 --- a/yardsticks/modular-nemotron-h-kvexp/tests/.crumb +++ b/yardsticks/modular-nemotron-h-kvexp/tests/.crumb @@ -1,22 +1,36 @@ { - "schema_version": "1.0", "dir_path": "./modular/nemotron_h_kvexp/tests", - "purpose": { - "summary": "Unit tests for KV-head expanded Nemotron-H MAX architecture adapter", - "created_by": "AIEN", - "session_id": "modular-upstream-packaging", - "created_at": "2026-09-18T14:26:00Z" + "extensions": { + "generated": { + "children": [], + "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "compiled_at": "2026-10-09T21:58:26Z", + "compiler": "crumb-compile/1", + "digest": "sha256:64778fe6c5d29f35ed5b6f1c818d6af194a72111799738a44a3430fa001ece86", + "evidence_files": 0, + "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "files": 2, + "generated_at_commit": "765eec0f511594d8b9dbfde8dbd9aa22544a0163", + "source_tree": "sha256:607bb55ffbf32741481664b2ee280fc2426cda61019f9e5645a5af7184c66a93" + } }, "parent": { "canonical": "./modular/nemotron_h_kvexp", "name": "nemotron_h_kvexp" }, + "purpose": { + "created_at": "2026-09-18T14:26:00Z", + "created_by": "AIEN", + "session_id": "modular-upstream-packaging", + "summary": "Unit tests for KV-head expanded Nemotron-H MAX architecture adapter" + }, + "schema_version": "1.0", "whispers": [ { "author": "AIEN", + "message": "100% pass rate across 7 unit tests: expansion factor math, LoRA deltas, bfloat16 roundtrips, and tensor replication.", "timestamp": "2026-09-18T14:26:00Z", - "whisper_id": "test-suite-pass", - "message": "100% pass rate across 7 unit tests: expansion factor math, LoRA deltas, bfloat16 roundtrips, and tensor replication." + "whisper_id": "test-suite-pass" } ] } diff --git a/yardsticks/prime-drag-race-cuda/.crumb b/yardsticks/prime-drag-race-cuda/.crumb index c2429a4..1c6f59e 100644 --- a/yardsticks/prime-drag-race-cuda/.crumb +++ b/yardsticks/prime-drag-race-cuda/.crumb @@ -1,20 +1,34 @@ { - "schema_version": "1.0", "dir_path": "./yardsticks/prime-drag-race-cuda", - "purpose": { - "summary": "Outside CUDA yardstick for the AIEN Prime Drag Race: mirrors the AIEN native GPU sieve kernel algorithm; outside AIEN, never linked into AIEN binaries", - "created_by": "AIEN", - "session_id": "prime-drag-race", - "created_at": "2026-10-05T19:00:00Z" - }, - "parent": { - "canonical": "./yardsticks", - "name": "yardsticks" + "extensions": { + "generated": { + "children": [], + "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "compiled_at": "2026-10-09T21:58:26Z", + "compiler": "crumb-compile/1", + "digest": "sha256:71fe586415aefc85256ea43442978e66428c2a0799ad67f513337be89253c0d2", + "evidence_files": 0, + "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "files": 4, + "generated_at_commit": "765eec0f511594d8b9dbfde8dbd9aa22544a0163", + "source_tree": "sha256:b9f9bf709a6c1f3ce015171e5b1499ea1bc99d4ad514702fd832a1b2f3dfa094" + } }, "invariants": [ "outside AIEN; never linked into AIEN binaries", "builds against omega bench/prime_race protocol via OMEGA_DIR, never copies it", "must not be executed outside a quiet-flag window (GPU)" ], + "parent": { + "canonical": "./yardsticks", + "name": "yardsticks" + }, + "purpose": { + "created_at": "2026-10-05T19:00:00Z", + "created_by": "AIEN", + "session_id": "prime-drag-race", + "summary": "Outside CUDA yardstick for the AIEN Prime Drag Race: mirrors the AIEN native GPU sieve kernel algorithm; outside AIEN, never linked into AIEN binaries" + }, + "schema_version": "1.0", "whispers": [] } From d763b3a50626811b1778d0874e362d601297eb98 Mon Sep 17 00:00:00 2001 From: Drake Stapleton Date: Fri, 9 Oct 2026 16:59:32 -0500 Subject: [PATCH 2/2] Keep the existing .crumb files byte-identical (minimal change; historical records untouched) Co-Authored-By: Claude Opus 5.5 --- .../benchmarks/.crumb | 30 +++++----------- .../modular-nemotron-h-kvexp/tests/.crumb | 30 +++++----------- yardsticks/prime-drag-race-cuda/.crumb | 34 ++++++------------- 3 files changed, 26 insertions(+), 68 deletions(-) diff --git a/yardsticks/modular-nemotron-h-kvexp/benchmarks/.crumb b/yardsticks/modular-nemotron-h-kvexp/benchmarks/.crumb index 80d23d8..272b9eb 100644 --- a/yardsticks/modular-nemotron-h-kvexp/benchmarks/.crumb +++ b/yardsticks/modular-nemotron-h-kvexp/benchmarks/.crumb @@ -1,36 +1,22 @@ { + "schema_version": "1.0", "dir_path": "./modular/nemotron_h_kvexp/benchmarks", - "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-09T21:58:26Z", - "compiler": "crumb-compile/1", - "digest": "sha256:02aad50a34816d938dadf49d4c6ab5c0ec634fe0aebb9cde20d5e9a582a4a99c", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 1, - "generated_at_commit": "765eec0f511594d8b9dbfde8dbd9aa22544a0163", - "source_tree": "sha256:75888bf9d9c1fbef4f70fb4c63d01c39a52d5f60a398dcf11d8650fe9360b2d2" - } + "purpose": { + "summary": "Performance and throughput micro-benchmarks for KV-head expansion on Grace Neoverse V2", + "created_by": "AIEN", + "session_id": "modular-upstream-packaging", + "created_at": "2026-09-18T14:26:00Z" }, "parent": { "canonical": "./modular/nemotron_h_kvexp", "name": "nemotron_h_kvexp" }, - "purpose": { - "created_at": "2026-09-18T14:26:00Z", - "created_by": "AIEN", - "session_id": "modular-upstream-packaging", - "summary": "Performance and throughput micro-benchmarks for KV-head expansion on Grace Neoverse V2" - }, - "schema_version": "1.0", "whispers": [ { "author": "AIEN", - "message": "Benchmark measured 5.49 ms per layer and 285.63 ms for full 52-layer Nemotron-30B model at 12.80 GB/s.", "timestamp": "2026-09-18T14:26:00Z", - "whisper_id": "bench-results" + "whisper_id": "bench-results", + "message": "Benchmark measured 5.49 ms per layer and 285.63 ms for full 52-layer Nemotron-30B model at 12.80 GB/s." } ] } diff --git a/yardsticks/modular-nemotron-h-kvexp/tests/.crumb b/yardsticks/modular-nemotron-h-kvexp/tests/.crumb index 43e5000..6b35396 100644 --- a/yardsticks/modular-nemotron-h-kvexp/tests/.crumb +++ b/yardsticks/modular-nemotron-h-kvexp/tests/.crumb @@ -1,36 +1,22 @@ { + "schema_version": "1.0", "dir_path": "./modular/nemotron_h_kvexp/tests", - "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-09T21:58:26Z", - "compiler": "crumb-compile/1", - "digest": "sha256:64778fe6c5d29f35ed5b6f1c818d6af194a72111799738a44a3430fa001ece86", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 2, - "generated_at_commit": "765eec0f511594d8b9dbfde8dbd9aa22544a0163", - "source_tree": "sha256:607bb55ffbf32741481664b2ee280fc2426cda61019f9e5645a5af7184c66a93" - } + "purpose": { + "summary": "Unit tests for KV-head expanded Nemotron-H MAX architecture adapter", + "created_by": "AIEN", + "session_id": "modular-upstream-packaging", + "created_at": "2026-09-18T14:26:00Z" }, "parent": { "canonical": "./modular/nemotron_h_kvexp", "name": "nemotron_h_kvexp" }, - "purpose": { - "created_at": "2026-09-18T14:26:00Z", - "created_by": "AIEN", - "session_id": "modular-upstream-packaging", - "summary": "Unit tests for KV-head expanded Nemotron-H MAX architecture adapter" - }, - "schema_version": "1.0", "whispers": [ { "author": "AIEN", - "message": "100% pass rate across 7 unit tests: expansion factor math, LoRA deltas, bfloat16 roundtrips, and tensor replication.", "timestamp": "2026-09-18T14:26:00Z", - "whisper_id": "test-suite-pass" + "whisper_id": "test-suite-pass", + "message": "100% pass rate across 7 unit tests: expansion factor math, LoRA deltas, bfloat16 roundtrips, and tensor replication." } ] } diff --git a/yardsticks/prime-drag-race-cuda/.crumb b/yardsticks/prime-drag-race-cuda/.crumb index 1c6f59e..c2429a4 100644 --- a/yardsticks/prime-drag-race-cuda/.crumb +++ b/yardsticks/prime-drag-race-cuda/.crumb @@ -1,34 +1,20 @@ { + "schema_version": "1.0", "dir_path": "./yardsticks/prime-drag-race-cuda", - "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-09T21:58:26Z", - "compiler": "crumb-compile/1", - "digest": "sha256:71fe586415aefc85256ea43442978e66428c2a0799ad67f513337be89253c0d2", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 4, - "generated_at_commit": "765eec0f511594d8b9dbfde8dbd9aa22544a0163", - "source_tree": "sha256:b9f9bf709a6c1f3ce015171e5b1499ea1bc99d4ad514702fd832a1b2f3dfa094" - } + "purpose": { + "summary": "Outside CUDA yardstick for the AIEN Prime Drag Race: mirrors the AIEN native GPU sieve kernel algorithm; outside AIEN, never linked into AIEN binaries", + "created_by": "AIEN", + "session_id": "prime-drag-race", + "created_at": "2026-10-05T19:00:00Z" + }, + "parent": { + "canonical": "./yardsticks", + "name": "yardsticks" }, "invariants": [ "outside AIEN; never linked into AIEN binaries", "builds against omega bench/prime_race protocol via OMEGA_DIR, never copies it", "must not be executed outside a quiet-flag window (GPU)" ], - "parent": { - "canonical": "./yardsticks", - "name": "yardsticks" - }, - "purpose": { - "created_at": "2026-10-05T19:00:00Z", - "created_by": "AIEN", - "session_id": "prime-drag-race", - "summary": "Outside CUDA yardstick for the AIEN Prime Drag Race: mirrors the AIEN native GPU sieve kernel algorithm; outside AIEN, never linked into AIEN binaries" - }, - "schema_version": "1.0", "whispers": [] }