interplane.Get Omega
Read in your language

benchmarks-mv

Measurement harnesses and evidence bundles for AIEN on the NVIDIA DGX Spark GB10. Speed is reported against the machine's physical limit and my own previous run. Attachment of AienOS.

Brought by drakestapleton

branch main Branches Tags History

benchmarks-mv / README.md

596 lines · 46716 bytes Raw Blame History Rendered
1# AIEN Benchmarks
2
3[![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](LICENSE)
4
5This repository holds AIEN's performance measurements and the Rust tools that take and check them. Every measurement in it comes from one machine, the NVIDIA DGX Spark (Grace Blackwell GB10, aarch64). It has two parts: the Prime Drag Race suite runner in [prime-drag-race/](prime-drag-race/CONTRACT.md), which builds on its own, and the main measurement harness (the `aien-benchmarks` crate at the root), which needs a sibling checkout to build (see [Build and test](#build-and-test)).
6
7AIEN does not compare itself with other people's systems, with one exception. Speed is measured against the machine's physical limit and AIEN's own previous run, and correctness against AIEN's own reference.
8
9**Exception: same-machine head-to-head (bar P0, added 2026-10-27 on Drake's order).** llama.cpp and vLLM, each at its own current release built for sm_121, may be run against my stack on the same DGX Spark, with the same model (Qwen3.6-35B-A3B), the same prompts and the same measurement definition; the bar is defined in [omega-mv docs/OMEGA.md](https://github.com/aien-dev/omega-mv/blob/main/docs/OMEGA.md). Every number in such a table is measured by me on this machine and labelled that way, with raw logs and SHA-256 digests. The result is published whether I win or lose. Numbers published by others are never placed in the same table as mine, and nothing from the other systems enters my serving path. The 2026-10-15 withdrawals below stand; this exception does not restore them.
10
11## Where this fits in AIEN
12
13This repository is published on Interplane: `https://interplane.io/drakestapleton/benchmarks-mv.git`. Links to `github.com/aien-dev` in this file are history: GitHub is no longer used (rule of 2026-11-11), and they are kept only as the record of where issues and documents were.
14
15The whole system is [Sovereign Intelligence (SI)](https://github.com/aien-dev/sovereign-intelligence). [AienOS](https://github.com/aien-dev/AienOS-nv) is only the operating-system layer. [aien-dev/aienix](https://github.com/aien-dev/aienix) is retired. [aien-dev/sovereign-intelligence](https://github.com/aien-dev/sovereign-intelligence) is the integration, release and install center, and where the signed whole-system Spark test runs on one frozen candidate. Other repositories, including this one, keep their own parts ([ADR 0045](https://github.com/aien-dev/aien-architecture-mv/blob/main/docs/adr/0045-aienix-retired-sovereign-intelligence-center.md)). Related repositories:
16
17- [aien-sovereign-core-mv](https://github.com/aien-dev/aien-sovereign-core-mv): host runtime and the Spark verification pipeline that tests this repository. Its [Measured results](https://github.com/aien-dev/aien-sovereign-core-mv#measured-results) section sets the evidence standard used here.
18- [aien-architecture-mv](https://github.com/aien-dev/aien-architecture-mv): architecture and plans. Issue [#233](https://github.com/aien-dev/aien-architecture-mv/issues/233) (performance intelligence) is the plan behind the streaming and evidence work below.
19- [omega-mv](https://github.com/aien-dev/omega-mv): the language and GPU engine that the Prime Drag Race native GB10 entry runs on.
20- [aien-receipts](https://github.com/aien-dev/aien-receipts): where the Spark publishes the signed test bundle for each tested commit of this repository.
21
22## Neuralese independent evaluation (NL-6)
23
24Issue [#55](https://github.com/aien-dev/benchmarks-mv/issues/55), extending
25[#38](https://github.com/aien-dev/benchmarks-mv/issues/38), freezes its design at
26`8ee0a494bf73230c9d37647eb3caea792298fa8d` in
27[`manifests/neuralese_prereg.json`](manifests/neuralese_prereg.json). The
28[`raw Wolfram calls/results`](manifests/neuralese_wolfram_raw.json) establish the
29statistical planning calculations, not experimental results. The design includes
30an eight-combination training/eight-combination test split, matched text,
31typed-semantic and deterministic Omega baselines, full lifecycle costs and
32adversarial controls. A frozen design is not a sealed, executed campaign.
33
34[`native/neuralese/score.om`](native/neuralese/score.om) is a seeded handwritten
35Omega evidence checker. It supplements the existing signed Spark judge; it does
36not create an authority or execute proposed effects. Public synthetic fixtures
37qualify only the checker, never model performance or physical throughput.
38
39Compile the checker and the existing Omega conductor with the compiler from
40`omega-mv@e79566c191ea8ef11888e69ce50d8fadf375d4fd`, SHA-256
41`d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84`.
42This binary originated at `1fe5976d398646b17acabbf6d9dfae96b017e439`; it is
43not either of the older documented `2c824805` / `49923639` compiler pins.
44The conductor source is `seed/qualification/om2/gate.om` at that same revision.
45It verifies the compiler digest itself, compiles every source and mutant, runs
46each child with a deadline, compares exact stdout/stderr/status and writes raw
47artifacts. Never run a binary left by a failed compile.
48
49Run the conductor in a disposable replay directory containing `native` linked
50to this checkout's `native`, and `seed` linked to the pinned Omega checkout's
51`seed` (the conductor reads its committed SHA-256 constants there):
52
53```text
54<compiled-gate> <pinned-omc> d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 native/neuralese/host.cases <new-scratch-directory>
55```
56
57Direct checker interface: `score MODE TRUSTED_REFERENCE ACTUAL_RAW_OUTPUT`.
58`MODE=1` compares ordered lines of exactly four ASCII bits and LF, reporting
59total/correct/wrong rows. Its reference comes from the independent task inputs,
60not a candidate's `expected_bits`; self-reported counts or extra fields fail.
61`MODE=2` compares a nonempty raw journal byte-for-byte with a separately frozen
62reference. `MODE=3` parses the NL4 boundary record, independently binds all
63operation/operand/type-shape/effect fields and recomputes increment, double or
64identity. Refusals must contain no residual operation, effects or result.
65The trusted reference starts `NL4REF1`; its final numeric field is reserved zero,
66not a supplied expected result. Actual records start `NL4R1`. Both have exactly
67ten decimal fields and LF; no leading zeroes, trailing fields or oversized values.
68Exit `0` means matching fixture evidence, `1` means wrong/missing-length output,
69`90` means invalid input/setup, and `93` means output I/O failure.
70
71Raw artifacts must come from independently replayed commands with pinned
72source/compiler/binary/input hashes and actual exits, not copied producer
73summary fields. Journal equality alone does not establish authorization; the
74reference and the existing capability authority must establish that separately.
75Neither row counts nor a `PASS` line establish independent test custody,
76distinct task IDs, safety certification or a quality-floor campaign. The
77checker deliberately does not accept producer timing, token, privacy, consent
78or hardware claims. Missing instrument evidence stays NOT_MEASURED/NOT_RUN.
79
80The fixtures include wrong-but-valid results, wrong operations/shapes/effects,
81all-refuse candidates, forged summaries, malformed/short/trailing records and
82guard-removal mutants. Changed equality/result/metadata guards must accept the
83bad fixture in the mutant while the original refuses it. Signals, timeouts and
84compile failures never count as mutation kills. The oracle arithmetic/parity
85queries and raw tool results are in
86[`native/neuralese/arithmetic_wolfram_raw.json`](native/neuralese/arithmetic_wolfram_raw.json).
87All learned, model-native and GB10 campaigns remain NOT_RUN/BLOCKED unless
88separately admitted and executed. No model, GPU or live-serving access is part
89of this checker.
90
91For NL1 CSV evidence, concatenate `native/neuralese/learnscore.om` and
92`native/neuralese/learn-cli.om` in that order before compilation, then run
93`learnscore RAW_CSV_FILE`. This bounded-streaming checker interprets the raw
94IEEE-754 carriers itself, derives fixture meanings from input IDs, recomputes
95threshold decisions and abstentions, rejects forged prediction/status fields
96and rejects duplicate or missing selected cases. It reports every seed,
97training/held-out partition and frozen quantization arm separately. It neither
98trusts the producer's aggregation nor counts abstention as recovery. Return
99zero means the evidence was scored, not that recovery was perfect.
100
101[`qualification.json`](native/neuralese/qualification.json) records the native
102conductor's 41/41 synthetic checks, including six guard-removal mutants.
103[`nl1-independent.json`](native/neuralese/nl1-independent.json) records an
104independent rebuild and CPU replay of learned sender/receiver source
105`aien-train@c5992ca0b015a233bca6f9af7af892a71c558403`.
106Its held-out full-precision learned recovery is 5/8, 5/8 and 6/8 for seeds
10717, 29 and 43; the fixed-basis and discrete controls each recover all eight.
108These filed native-checker counts are not independent objective samples for
109the preregistered statistical campaign. No parameters were tuned from them.
110The exact independently generated raw CSV is retained as
111[`nl1-replay.stdout`](native/neuralese/nl1-replay.stdout).
112The original `0e01c58` stream is preserved in
113[`nl1-pre-repair.stdout`](native/neuralese/nl1-pre-repair.stdout): its discrete
114control incorrectly decoded the original input ID rather than its transmitted
115byte. The repair changes only that causal control, not learned parameters.
116An independently compiled direct-ID mutant exits 77 when the control changes
117only the transmitted byte, while the repaired source completes successfully.
118[`nl4-independent.json`](native/neuralese/nl4-independent.json) records an
119independent compile of `omega-mv@09b1394fe68287eaa10b0d90cf07a9dd00e6cb60`
120with its locked projection and envelope dependencies. The successful pure
121operation and foreign-tenant refusal were replayed with their actual channels
122and exits; the checker recomputes the result from separately bound request
123fields. This is a closed host boundary, not signed capability authorization.
124[`nl5-independent.json`](native/neuralese/nl5-independent.json) records
125independent proposal and unchanged-kernel replay of the 30 Allen scenarios.
126It explicitly distinguishes proposal refusal, kernel admission and real task
127execution; C remains a typed fallback, not a learned transport.
128The six ordinary/corrected states were also checked against independent
129Wolfram-derived references, including a wrong-terminal-state negative control;
130[`nl5_wolfram_raw.json`](native/neuralese/nl5_wolfram_raw.json) retains the
131actual arithmetic tool calls and results.
132
133## Neuralese structure follow-up (NL-7)
134
135New freeze: [`neuralese_nl7_prereg.json`](manifests/neuralese_nl7_prereg.json)
136at `989fb7a214d8e0d6c7ed04f5f48c45d68a43d5a3`, posted on BOARD
1372026-10-28T15:21:18Z, before any variant ran. This extends NL-6 without
138rewriting its preregistration or using NL-1's split/seeds.
139
140The fresh public held-out sets are `{6,7,10,11,12,13,14,15}` and
141`{3,5,7,9,11,13,14,15}`. Seed order in every cell below is 101,211,307.
142Fit means a separate all-sixteen-training run; held-out means a separately
143trained eight-combination run. Entries are accepted-correct counts, not
144accepted-only accuracy.
145
146| Variant | Wire bits | Full fit /16 | Split 1 /8 | Split 2 /8 |
147|---|---|---|---|---|
148| Exact 3-coordinate | 8,24,96,192 | 16,16,16 | 8,8,8 | 8,8,8 |
149| RM(1,3) | 8,24,96,192 | 16,16,16 | 8,8,8 | 8,8,8 |
150| Packed semantic | 8,24,96,192 | 16,16,16 | 8,8,8 | 8,8,8 |
151| Learned additive + separation | 8 | 0,0,0 | 1,1,3 | 1,0,3 |
152| Learned additive + separation | 24 | 1,1,1 | 2,4,3 | 1,0,3 |
153| Learned additive + separation | 96,192 | 15,15,15 | 5,6,6 | 3,4,3 |
154| Existing learned softsign | 8 | 8,7,8 | 3,2,3 | 1,1,1 |
155| Existing learned softsign | 24 | 14,14,14 | 0,1,1 | 2,2,1 |
156| Existing learned softsign | 96,192 | 14,14,14 | 0,0,1 | 2,2,1 |
157
158Budgets are transmitted bits, **not coordinates**. Numeric payload is
1596,24,96,192 bits at 2,8,32,64 bits per coordinate; the 8-bit transport has
160two zero padding bits. RM's payload is eight bits and packed semantics four
161bits, padded to every matched wire budget. Thus a four-bit payload still costs
162an actual byte at the smallest tested transport. Codebook, schema and learned
163receiver weights are separate shared-state costs. Learned low-bit quantizers
164refuse values outside [-4,4], rather than clipping; all refusals remain in the
165denominator. The exact construction uses its frozen [0,1] quantizer.
166
167### Guarantees and robustness
168
169Wolfram confirms `16` distinct exact points, minimum Euclidean separation
170`1/3` and strict nearest-decoder perturbation radius `<1/6`. The native
171numeric transport/decoder recovers all sixteen cleanly at all budgets and
172all six axis `+/-1/12` probes at 96/192 bits. The `1/6` boundary is not covered
173by the strict guarantee; boundary and `1/4` probes are recorded descriptively.
174At 192 bits on the all-fit run, across all eighteen nonclean numeric modes,
175exact has `(correct,refused,undetected wrong)=(252,8,28)` out of 288.
176
177Wolfram independently enumerates RM parameters `(16 codewords,8 bits,dmin4)`,
178128/128 single-bit recoveries and 448/448 double-bit refusals. The native
179enumeration matches these at every budget/seed/split. Double-error detection
180is radius-one refusal, not a claim to correct two bits. Packed semantics
181accepts all 64 single-bit and 96 double-bit corruptions as wrong. Repeating
182these deterministic codebooks over seeds does not create independent trials.
183
184The additive construction obeys the composition identity algebraically.
185The maximum observed absolute coordinate residual over all nine models is
186`1.7763568394002504646778106689453125e-15`, independently decoded by Wolfram,
187below the frozen `1e-12`. The separation hinge uses training pairs only.
188The learned receiver can still fail even with separated sender points.
189For 192-bit all-fit runs, additive numeric nonclean counts are
190`(270,0,18)` for each seed; existing learned counts are
191`(252,5,31)`, `(243,16,29)`, `(245,9,34)`, each out of 288.
192Per-held-out robustness, other precisions and individual modes are retained
193in [`nl7-score.csv.gz`](native/neuralese/nl7-score.csv.gz), not silently pooled.
194
195**Verdict: NOT_SUPPORTED** for the frozen additive learned success hypothesis:
196full fit is not 16/16 and held-out recovery is not 8/8. It does improve over the
197existing learned arm on these fresh high-precision splits, without fixing
198recoverability or beating explicit codes. Exact and RM synthetic recovery
199thresholds are **EXERCISED**. This is not useful-compression evidence, real-model
200evidence, hardware qualification, authority, or deployment.
201Johnson-Lindenstrauss projections for real activations are future work only,
202**NOT_RUN** here.
203
204### Native scoring and negative controls
205
206[`nl7-score.om`](native/neuralese/nl7-score.om) is an independent .om scorer
207for all five arms, deriving membership, codewords, Hamming corruptions,
208mandatory exact guarantees, budgets and completeness from the frozen contract.
209It rejects missing/duplicate/noncanonical records and inconsistent
210prediction/status/payload fields. `S` rows contain seed, split, arm, budget,
211mode, scope (0 all-sixteen, 1 held-out), total, correct, refused, undetected wrong;
212`R` rows pool nonclean modes; `L` reports each frozen learned criterion.
213`NL7 CHECKS PASS` means stream/guarantee checks passed, **not learned success**;
214the separate result is `NL7 LEARNED NOT_SUPPORTED`.
215
216`fixtures/nl7-fixture.om` generates ten original checker controls; nine
217guard-removal/incorrect-oracle source mutants are in
218[`nl7-score.cases`](native/neuralese/fixtures/nl7-score.cases).
219All 19 cases passed, including all nine mutants killed. The producer's
220native guards separately passed 16 cases including fourteen source mutants.
221Actual logs, not inferred outcomes, are retained. The compiler is the same
222pinned `d6290c76...` seeded Omega compiler used for NL-1; no Python product path.
223
224Build by redirecting source through the pinned compiler:
225
226```sh
227"$OMC" < native/neuralese/nl7-score.om > "$WORK/nl7-score"
228"$OMC" < native/neuralese/fixtures/nl7-fixture.om > "$WORK/nl7-fixture"
229chmod +x "$WORK/nl7-score" "$WORK/nl7-fixture"
230"$WORK/nl7-score" < "$WORK/all.csv" > "$WORK/score.csv"
231```
232
233For native conductor replay, use a fresh context with read-only `native` and
234the pinned Omega `seed` available under those relative names. Generate
235`inputs/nl7-case-M.csv` with `nl7-fixture M`; capture original scorer stdout as
236`expected/nl7-case-M.score` for M=0..9. Run the pinned OM2 conductor on
237`native/neuralese/fixtures/nl7-score.cases` with a new scratch directory.
238Each KILL requires the exact specified mutant exit and stdout differing from
239the corresponding original oracle. Receiver/transport source and full raw
240stream/Wolfram receipts are published in the companion aien-train draft.
241No compiler/language/host-word, ownership or harness gate changes are made;
242omega-harness guide updates are not applicable.
243
244[`nl7-wire.om`](native/neuralese/nl7-wire.om) additionally replays actual
245numeric carrier bytes with the final parameter snapshots, independently
246recomputing coordinates, perturbations, receiver scores, predictions and
247abstentions. It reports `NL7WIRE PASS frames=21888 refused=3764`.
248All four qualification cases passed, including three mutants for receiver
249weight indexing, carrier decoding and decision threshold. The total across
250the producer guard and two checker conductors is 39 cases, with 26 source
251mutants killed. Refused encodes require `pred99/status1`; their stale carrier
252bytes cannot independently establish sender-overflow causality. This limitation
253does not apply to admitted-carrier decoding, which is replayed.
254To replay, compile `nl7-wire.om`, feed the same `all.csv`, then provide
255`inputs/nl7-real.csv` and original stdout `expected/nl7-wire.out` to the
256native conductor cases in `fixtures/nl7-wire.cases`.
257
258The conductor reads `inputs/` and `expected/` relative to the replay directory;
259without them every NL7 case is `INVALID input, source or fixture unreadable`.
260Exact setup, from a replay directory containing `native`, `seed`, the compiled
261`gate` and the pinned compiler as `omc` (`all.csv` is the gunzipped
262`native/neuralese/evidence/nl7-stream.csv.gz` of the producer revision named in
263`nl7-independent.json`, SHA-256 `a70bc35d...`):
264
265```sh
266./omc < native/neuralese/fixtures/nl7-fixture.om > nl7-fixture
267./omc < native/neuralese/nl7-score.om > nl7-score
268./omc < native/neuralese/nl7-wire.om > nl7-wire
269chmod +x nl7-fixture nl7-score nl7-wire
270mkdir inputs expected
271for M in 0 1 2 3 4 5 6 7 8 9; do
272 ./nl7-fixture $M > inputs/nl7-case-$M.csv
273 ./nl7-score < inputs/nl7-case-$M.csv > expected/nl7-case-$M.score
274done
275cp all.csv inputs/nl7-real.csv
276./nl7-wire < all.csv > expected/nl7-wire.out
277./gate ./omc d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 native/neuralese/fixtures/nl7-score.cases score-scratch
278./gate ./omc d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 native/neuralese/fixtures/nl7-wire.cases wire-scratch
279```
280
281The scorer exits are 0, 90, 90, 90, 90, 0, 1, 1, 90, 90 for M=0..9, as the
282cases expect. The conductors report `OM2GATE PASS cases=19` and
283`OM2GATE PASS cases=4`.
284
285## Status (2026-10-19)
286
287- **One evidence-backed result:** the [Prime Drag Race campaign of 5 October 2026](prime-drag-race/CAMPAIGN-2026-10-05.md) (details below).
288- **Older figures are withdrawn.** Everything under [Historical record](#historical-record-withdrawn-figures) predates the evidence standard and is kept only as a record.
289- **Merged since the last README update (2026-10-16 to 2026-10-18):** the streaming benchmark now counts tokens only from the server's own report and writes structured records (#25); an offline evidence check and a generated index, [docs/PERF_INDEX.md](docs/PERF_INDEX.md), were added (#24); rustls was updated for security advisories (#27); the hosted GitHub test workflows were removed, so the Spark is now the only test judge (#33).
290- **Fixed on 2026-10-19:** `docs/PERF_INDEX.md` had fallen behind the source files, so `cargo test` failed 2 tests in `tests/perf_index.rs` and the BENCH-PERF-INDEX gate failed. #34 committed the regenerated index.
291- **The main harness builds from public sources** since DRA-166: its five runtime crates are pinned by git commit (see [Build and test](#build-and-test)). Its GPU benchmarks still need the GB10.
292- **Planned, not started in this repository:** open tracking issues [#29](https://github.com/aien-dev/benchmarks-mv/issues/29) and [#30](https://github.com/aien-dev/benchmarks-mv/issues/30) (GB10 expert streaming, "Ribbon"), [#31](https://github.com/aien-dev/benchmarks-mv/issues/31) (Spark, iMac and M2 compute across machines) and [#32](https://github.com/aien-dev/benchmarks-mv/issues/32) (small-model training across those machines). None of them has results yet.
293
294## Current result: Prime Drag Race
295
296On the DGX Spark, the native GB10 prime sieve ran at 19,701.34 passes per second, 20.3x the frozen native baseline of 971.48 passes per second, with correctness checked on the chip against my own reference. Source: receipt `1a3eafe9`, recorded in [CAMPAIGN-2026-10-05.md](prime-drag-race/CAMPAIGN-2026-10-05.md), with the run files under [prime-drag-race/evidence/](prime-drag-race/evidence). The frozen baseline run is in [RESULTS-2026-10-05.md](prime-drag-race/RESULTS-2026-10-05.md). That run was on Linux on the GB10, not on Aienux. How close this is to the hardware limit for this workload has not been measured.
297
298The rules of the race (the frozen contract) are in [CONTRACT.md](prime-drag-race/CONTRACT.md).
299
300## What is in this repository
301
302| Path | What it is |
303| :--- | :--- |
304| `prime-drag-race/` | Prime Drag Race suite runner (`prime_race`), contract, results and sealed evidence. A standalone Rust crate. |
305| `src/` | The `aien-benchmarks` measurement harness and five helper programs: `bench_canonical_suite`, `bench_branching_neutral`, `bench_verify_records`, `bench_verify_prereg`, `bench_index`. |
306| `data/` | Datasets from the withdrawn 2026-09-19 sweep, kept as recorded. |
307| `artifacts/gb10_canonical_1789907893_4d762/` | One withdrawn GB10 run bundle with its `SHA256SUMS` file. |
308| `assets/` | SVG charts drawn from `data/`. |
309| `manifests/` | Workload manifests read by `bench_branching_neutral` and `bench_canonical_suite`; `manifests/prereg/` holds preregistrations checked by `bench_verify_prereg`. |
310| `docs/` | [PIPELINE.md](docs/PIPELINE.md) (how pull requests are tested and merged), [PERF_INDEX.md](docs/PERF_INDEX.md) (generated index), [LIVE_PRESSURE_BENCHMARK.md](docs/LIVE_PRESSURE_BENCHMARK.md) (an older pressure benchmark write-up, not regenerated under the evidence standard). |
311| `tests/gates/` | The Spark test gates (see [How changes are tested](#how-changes-are-tested)). |
312| `tests/fixtures/records/` | Good and bad example records for the evidence check. |
313| `scripts/check-no-python.sh` | Fails if any tracked file is Python. |
314
315## Build and test
316
317You need a Rust toolchain. The Spark used `rustc 1.98.1 (48a229cea 2026-09-01)` on 2026-10-19.
318
319### Prime Drag Race runner (builds on its own)
320
321```bash
322git clone https://interplane.io/drakestapleton/benchmarks-mv.git
323cd benchmarks-mv/prime-drag-race
324cargo build
325cargo test
326cargo run -- --help
327```
328
329On the Spark on 2026-10-19 this built, and `cargo test` passed 33 tests with 1 ignored. `prime_race verify` runs the correctness sweep of one implementation, and `prime_race run` runs the timed trials and writes a receipt. Timed runs need the implementations under test, which live in other repositories (see the campaign file).
330
331### Main harness (reproducible checkout)
332
333The `aien-benchmarks` crate depends on five crates of [aien-sovereign-core-mv](https://interplane.io/drakestapleton/aien-sovereign-core-mv.git): `aien-platform`, `aien-platform-linux`, `aien-kv-cache`, `aien-scheduler` and `aien-inference-abi`. `Cargo.toml` pins all five to commit `2eb2bdd82fa5c97f7164b66c812b2ecd14ae9259`, the head of that repository's branch `feat/canonical-branch-native-runtime`, fetched from its Interplane clone address, and `Cargo.lock` records the same commit. A plain clone needs no other checkout:
334
335```bash
336git clone https://interplane.io/drakestapleton/benchmarks-mv.git && cd benchmarks-mv
337cargo fetch --locked # the only step that needs the network
338CARGO_NET_OFFLINE=true tests/gates/run.sh check
339```
340
341Until DRA-166 the crates came by path from a sibling directory `../canonical-branch-native-runtime`, and `tests/gates/run.sh` exited 3 without it. The sibling checkouts on the Spark were at the same commit `2eb2bdd8`; their uncommitted changes in those five crates were `rustfmt` reformatting only (checked by formatting the pinned sources and comparing, 2026-11-06). A checkout of aien-sovereign-core-mv `main` does not work in its place: `bench_canonical_suite` needs `BlackwellBatchExecutor` and the `ModelConfig` fields of that branch.
342
343`bench_canonical_suite` records `runtime_git_sha` from the `Cargo.toml` and `Cargo.lock` compiled into it, and refuses to run unless both pin all five crates to the same full commit. It no longer reads a sibling directory.
344
345`Cargo.lock` names `spark-max-rs` and `spark-max-cabi` (the Modular MAX bridge, removed from AIEN on 2026-10-15) because `aien-scheduler` at the pinned commit depends on them. No code in this repository uses them.
346
347From the repository root:
348
349```bash
350# Unit and integration tests
351cargo test --verbose
352
353# Check the committed dataset against its budgets (RSS budgets and latency thresholds)
354cargo run --release -- verify
355
356# Print a summary table of the committed dataset
357cargo run --release -- report
358
359# Check every tracked record (found by its schema), the artifact bundles and local records/ offline
360cargo run --release --bin bench_verify_records -- --tracked records artifacts
361
362# Check preregistration manifests offline (one line per defect)
363cargo run --release --bin bench_verify_prereg -- manifests/prereg
364
365# Check that docs/PERF_INDEX.md matches the generator (drop --check to rewrite it)
366cargo run --release --bin bench_index -- --check
367
368# Fail if any tracked file is Python
369sh scripts/check-no-python.sh
370```
371
372On the Spark on 2026-10-19, with the former sibling in place: `verify`, `report`, `bench_verify_records` (1 record, 1 bundle, 0 defects) and the Python check passed. `cargo test` and `bench_index --check` failed because of a stale index; after #34 regenerated it, the gate steps `test` and `perf-index` pass on the Spark (2026-10-19).
373
374### How changes are tested
375
376The Forgejo CI in [`.forgejo/workflows/ci.yml`](.forgejo/workflows/ci.yml) calls `tests/gates/run.sh` once per gate below, so CI and a local run use the same commands. A change lands on `main` when the gates pass on a fresh clone and a fresh independent review of the exact head returns MERGE. The former GitHub jobs (`AIEN Checks`, `AIEN Alpha`) were removed for DRA-166. See [docs/PIPELINE.md](docs/PIPELINE.md) for the current process and the historical PR bridge.
377
378The gates, each a step of `tests/gates/run.sh`:
379
380| Gate | Runs |
381| :--- | :--- |
382| BENCH-FMT | `cargo fmt -p aien-benchmarks -- --check` |
383| BENCH-CHECK | `cargo check --all-targets` |
384| BENCH-CLIPPY | `cargo clippy --all-targets -- -D warnings` |
385| BENCH-TEST | `cargo test --verbose` |
386| BENCH-VERIFY | `cargo run --release -- verify` |
387| BENCH-GENERATE | `cargo run --release -- generate --output assets`, then fails if `assets/` changed |
388| BENCH-VERIFY-RECORDS | `bench_verify_records` as above, fails on any defect |
389| BENCH-PERF-INDEX | `bench_index`, then fails if `docs/PERF_INDEX.md` changed |
390| BENCH-ZERO-DISK-SECRETS | fails if any `.env*` file is found up to 4 directories deep (always runs) |
391
392This repository has no crumb files (`crumb verify .` reports `OK: 0 crumbs current`).
393
394## The measurement harness
395
396The main harness was built for the Spark's live service layout, so some steps only produce data where those services run. It produced the withdrawn figures in the historical record below. The streaming measurement was rewritten on 2026-10-16 (#25) and has not produced any committed result since.
397
398### Full sweep
399
400```bash
401cargo run --release -- measure
402```
403
404By default `measure` overwrites the committed `data/benchmarks_latest.json` and `assets/*.svg`. Use `--output-json` and `--output-assets` to write elsewhere. It runs these steps:
405
4061. **System discovery:** CPU architecture, memory, kernel (`uname -r`), page size and `rustc --version`.
4072. **Standalone server:** starts the harness's own Rust HTTP server on a free port.
4083. **HTTP load sweep:** sends concurrent requests to that server's `/api/status`, `/api/query` and `/api/vector` and records latency percentiles and throughput. Defaults: `--concurrency 10`, `--requests 500`, `--warmup 20`.
4094. **Memory:** reads resident memory (`VmRSS` in `/proc/<pid>/status`) of the live AIEN services it finds.
4105. **Model serving:** streams chat requests to one OpenAI-compatible endpoint (default `127.0.0.1:18006`, model `atlas-lightning-omni`, set with the `--llm-*` flags), and measures the embedding service on port 18081.
4116. **Vector math:** times 100,000 dot products of 768-number vectors.
4127. **Output:** writes the JSON dataset and redraws the SVG charts.
413
414`--skip-standalone` skips steps 2 and 3, `--skip-live` skips the live-service memory readings, and `--skip-llm` skips the streaming endpoint. All flags: `cargo run --release -- measure --help`.
415
416### Streaming measurement only
417
418```bash
419cargo run --release -- llm-stream --llm-host 127.0.0.1 --llm-port 18006 \
420 --llm-model <model id> --llm-engine <engine label> --llm-precision <e.g. BF16> \
421 --llm-context-length <tokens> --llm-requests 20 --llm-concurrency 1 --out-dir records \
422 --llm-binary <serving binary> --llm-model-file <model checkpoint>
423```
424
425This writes one `aien-bench-record/1` JSON record and its raw samples file into `--out-dir` (default `records/`, which git ignores). It exits 2 if no request succeeded. `--llm-binary` and `--llm-model-file` name the files the operator says were measured; their sha256 go into the record as `backend.binary_sha256` and `backend.model_sha256`, and an unreadable file stops the run before any request (exit 2). `--llm-model-file` may name a directory of shards: its digest is the sha256 of a manifest with one line `<file sha256> <relative path>` per file below it, sorted by path. Files are hashed by streaming, so a large checkpoint is not loaded into memory. llm-stream does not check that the process answering on the endpoint runs that binary or loaded that model, and every record with these digests says so in its limitations. After writing, llm-stream checks the record against the record contract and exits 3, listing the defects, when it does not meet it, for example when either digest is missing: such a record is kept but is not a claimed result. llm-stream compares no output, so its records say `parity.verdict: NOT_RUN`. How it measures (source: `src/harness/llm_stream.rs`, `src/harness/sse.rs`):
426
427- **TTFT** (time to first token) is the time from just before the request is sent to the first streamed event that carries text. Events with only a role, nothing, or only usage data do not count.
428- **Tokens** are counted only from the server's own `usage.completion_tokens`, and the record says `token_accounting: "backend_usage"`. Without it the record says `"events_not_tokens"` and reports events per second and time between events, never tokens per second.
429- **Failures:** read errors, timeouts, non-2xx responses, error events, cut-off bodies and streams without `data: [DONE]` count as failed requests and are not measured.
430- **Percentiles** use the nearest-rank method over the successful requests, and the count is recorded. A p50 needs at least 2 and a p95 at least 20 successful requests (`P95_MIN_SAMPLES`); with fewer the record omits them and says so in its limitations.
431- **Labels** in the record (model, engine, precision, context length) come from the flags, not from constants in the code.
432
433Symlinks inside a model directory given to `--llm-model-file` are followed; one that leads back to a directory already being walked (a cycle) stops the run before any request (exit 2) instead of recursing until the program crashes.
434
435Run llm-stream from the repository root. The record names its samples file as `--out-dir` joined with the file name, relative to where llm-stream ran, which is the root `bench_verify_records` resolves evidence against; the verifier accepts a samples file beside its record. So `bench_verify_records records` accepts every record llm-stream accepts, which `tests/llm_stream_cli.rs` checks. An `--out-dir` outside the repository gives an evidence path the record contract refuses (exit 3).
436
437### Other commands
438
439```bash
440# Redraw the SVG charts from the committed dataset
441cargo run --release -- generate --output assets
442
443# Rewrite the benchmark table between the AIEN:BENCHMARKS:START and END markers in a
444# markdown file from the dataset. --check exits non-zero instead of writing.
445# A target without both markers (START before END) is an error in either mode,
446# and so is a --target file that does not exist: each is named on stderr and the
447# command exits non-zero. With no --target it uses ../README.md and
448# ../docs/STATE_OF_AIEN.md; a missing default is skipped, but an existing default
449# without markers is an error like any other target.
450cargo run --release -- sync-docs --target <file> --check
451```
452
453## Evidence integrity
454
455New benchmark records follow the `aien-bench-record/1` format: source commit and whether the tree was dirty, build, workload, hardware, backend, one definition per metric, metrics, evidence file paths and limitations. They live as JSON files under `records/`. The older run bundles under `artifacts/` keep their own format and are checked against their `SHA256SUMS` files, never rewritten.
456
457A record that claims a result (status `VERIFIED`, `EXPERIMENTAL` or `FAIL`) also binds what was measured (DRA-166). Only such records are claimed results: the LLM rows of the full sweep (`measure`, `data/benchmarks_latest.json`, its report and charts) carry no digest, tolerance or parity verdict, and the report labels them as not claimed.
458
459- `backend.binary_sha256` and `backend.model_sha256`: sha256 of the serving binary and of the model checkpoint, 64 lowercase hex. A workload that runs no model writes `none` in both `backend.model` and `backend.model_sha256`.
460- `methodology.warmup`: the number of iterations run and discarded before measuring.
461- `methodology.tolerance`: the numerical tolerance outputs are compared with.
462- `parity`: `reference` (what the outputs were compared against), `verdict` (`PASS`, `FAIL` or `NOT_RUN`) and, for `PASS` or `FAIL`, `evidence` (a file in this repository, symlinks resolved) with its `evidence_sha256`, and a stated `methodology.tolerance` other than `none`. A changed evidence file no longer matches its digest and is a defect. `NOT_RUN` needs a limitations entry that names parity as a word. `VERIFIED` requires `PASS`, and a parity `FAIL` makes the record `FAIL`.
463
464A claimed LLM result from `llm-stream` has no parity control yet: llm-stream writes `methodology.tolerance` `none: …` and parity `NOT_RUN` with a limitation saying so, because no reference comparison of the generated tokens exists. Such a record says how fast the endpoint answered, not that its answers were right.
465
466`HISTORICAL` and `SUPERSEDED` records may say `not_recorded` for the four fields above when a limitations entry names the field. `tests/fixtures/records/good/experimental_bound.json` is a bound example; the `bad/` fixtures each break one binding rule.
467
468`cargo run --release --bin bench_verify_records` (default paths `records` and `artifacts`) checks them offline and prints one `path: field: reason` line per defect. It rejects placeholder values, short commit ids, missing evidence files and percentiles from too few samples. `cargo run --release --bin bench_index` regenerates [docs/PERF_INDEX.md](docs/PERF_INDEX.md), a list of records, sources and studies copied from the files; it is an index, not an authority.
469
470Status words in a record (source: `src/evidence.rs`):
471
472- **VERIFIED**: measured from a clean committed build, with evidence files in this repository that anyone can re-check.
473- **EXPERIMENTAL**: a real measurement that has not been qualified yet; not a claim.
474- **HISTORICAL**: kept as a record of what an earlier run wrote; not a current claim. Fields that run did not record say `not_recorded` and are named in its limitations.
475- **NOT_RUN**: a required measurement that has not been performed; it carries no numbers and no evidence.
476- **FAIL**: the run happened and did not meet its acceptance check; kept as evidence.
477- **SUPERSEDED**: replaced by a newer record.
478
479### Preregistration
480
481A campaign that compares learning arms is declared before any candidate is trained, in an `aien-bench-prereg/1` file under `manifests/prereg/`: arms, environments, the sealed held-out split and how non-access is enforced, metrics, sample sizes with their power calculation, stopping rules and the Turing profile `T(M;B,D,G,P)` with `T_ideal` and `T_real` kept apart. A preregistration is a plan and carries no measurements. `cargo run --release --bin bench_verify_prereg` (default path `manifests/prereg`) prints one `path: field: reason` line per defect. It refuses a file without `baseline_before_eval` (baselines run and frozen before any evaluation), without a non-empty `G` background naming every pretrained adviser and toolchain an arm uses, with T/J allowed while energy is not `MEASURED`, with unpinned background revisions once `FROZEN`, or with a sample size whose design effect, effective n or power does not add up (source: `src/prereg.rs`). [manifests/prereg/si_genesis_e2.json](manifests/prereg/si_genesis_e2.json) is the SI Genesis E2 and Fusion E1 plan for issues #39 and #38; its status is `SCOPED` and every result in it is `NOT_RUN`.
482
483## Hardware
484
485All measurements here come from one NVIDIA DGX Spark (`spark`), Grace Blackwell GB10, aarch64. The withdrawn dataset `data/benchmarks_latest.json` records kernel `7.0.0-1019-nvidia` and `rustc 1.98.1 (48a229cea 2026-09-01)`. On 2026-10-19 the Spark reported the same kernel and compiler, a 4096-byte page size (`getconf PAGESIZE`) and 121 GiB of memory (`free -g`). Nothing in this repository measures or tests any other platform. Work across other machines is planned in issues #31 and #32 and has no results yet.
486
487---
488
489## Human-Directed Agentic Engineering
490
491Development follows Human-Directed Agentic Engineering (HDAE): humans define goals, architecture, constraints, acceptance criteria, and stopping points; agents implement, execute checks, diagnose failures, and revise within those boundaries. Human review retains responsibility for claims, acceptance, and release decisions.
492
493For the documented method and a systems-software case study, see Gregory M. Kurtzer, [*Ginux: Building an Independent Kernel That Runs Linux Userspace through Human-Directed Agentic Engineering* (2026)](https://doi.org/10.5281/zenodo.23682548). This describes current development, not the protocol or validity of historical measurements below.
494
495## Historical record (withdrawn figures)
496
497> Everything in this section was recorded before the evidence standard in [aien-sovereign-core-mv](https://github.com/aien-dev/aien-sovereign-core-mv#measured-results) (this note was first written on 23 September 2026; labels updated 12 October 2026). None of it has been regenerated, and none of it is a current result. A figure is current only when its bundle carries commit identity, a hardware and environment record, the exact command, raw samples, SHA-256 digests, a measurement definition and steps to reproduce it. The files in `data/` are kept as recorded, including service names from before the openclaw-rs to aegis-runtime rename. On 2026-10-15 the Python baseline rows and the Rust-versus-Python records were removed from `data/` under this rule; they remain in git history. The model serving rows were served by Modular MAX, which AIEN removed on 2026-10-15.
498
499### Summary (withdrawn)
500
5011. **Memory:** the Rust services read 4.56 MB to 18.66 MB resident memory, apart from the embedding service, which holds model weights.
5022. **HTTP latency and throughput:** p50 time to first byte of 0.26 ms to 0.50 ms at 19,000 to 34,000 requests per second (concurrency 10, 500 requests per endpoint).
5033. **Vector math:** 0.58 microseconds per 768-number dot product.
5044. **Model serving (Modular MAX):** the GPU seat (`atlas-lightning-omni`, Nemotron 3.5 Lightning 30B) measured 426.9 ms TTFT and 46.9 ms between tokens. The CPU fallback seat (`unsloth/Llama-3.2-1B-Instruct`) measured 155.4 ms TTFT and 88.8 ms between tokens.
505
506### 1. Memory resident set size (withdrawn)
507
508![Memory RSS](assets/memory_comparison.svg)
509
510Read from `/proc/[pid]/status` (`VmRSS`) on live services:
511
512| Service | Built with | Role | Memory RSS |
513| :--- | :--- | :--- | :--- |
514| **aegis-runtime** | Rust (Axum + SQLite) | Agent runtime | **4.56 MB** |
515| **spark-cockpit-rs** | Rust (Axum) | Health and telemetry gateway | **12.90 MB** |
516| **cortex-rs** | Rust (Axum + SQLite WAL) | Knowledge graph engine | **18.66 MB** |
517| **cortex-encoder-rs** | Rust (ONNX INT8) | Local vector embedding | **777.43 MB** |
518
519### 2. HTTP latency and throughput (withdrawn)
520
521![Gateway Latency](assets/latency_comparison.svg)
522
523Concurrency 10, 500 requests per endpoint on localhost:
524
525| Endpoint | Service | Requests / sec | p50 TTFB | p95 | p99 |
526| :--- | :--- | :--- | :--- | :--- | :--- |
527| **cortex-encoder-rs `/health`** | Rust Axum + ONNX Runtime | **34,684.6** | **0.26 ms** | 0.35 ms | 0.40 ms |
528| **cortex-rs `/api/cortex/get`** | Rust Axum + SQLite WAL | **19,366.6** | **0.50 ms** | 0.65 ms | 0.69 ms |
529| **spark-cockpit-rs `/api/pulse`** | Rust Axum | **5,840.2** | **1.63 ms** | 2.44 ms | 2.86 ms |
530
531### 3. Model serving and vector math (withdrawn)
532
533These rows came from the old streaming parser, which counted every `data:` line as a token, gave all events from one socket read the same time, treated read errors as end of stream, and reported one TTFT sample as both p50 and p95. The TTFT rows are single samples, so their p50 and p95 are the same value. For the vector row, the p50 is the mean time per iteration over 100,000 iterations and the p95 was that value times 1.3, not a measured percentile. The current harness works differently (see [Streaming measurement only](#streaming-measurement-only)).
534
535| Workload | Model / target | Engine | p50 | p95 | Observed speed |
536| :--- | :--- | :--- | :--- | :--- | :--- |
537| **TTFT, GPU seat** | `Nemotron 3.5 Lightning 30B` (BF16) | Modular MAX on GB10 GPU | **426.91 ms** | 426.91 ms | |
538| **Time between tokens, GPU seat** | `Nemotron 3.5 Lightning 30B` (BF16) | Modular MAX on GB10 GPU | **46.91 ms** | 47.88 ms | about 21.3 tok/s |
539| **TTFT, CPU fallback** | `Llama 3.2 1B Instruct` (Q4_K) | Modular MAX on Grace CPU | **155.40 ms** | 155.40 ms | |
540| **Time between tokens, CPU fallback** | `Llama 3.2 1B Instruct` (Q4_K) | Modular MAX on Grace CPU | **88.82 ms** | 99.42 ms | about 11.3 tok/s |
541| **Vector embedding** | `BAAI/bge-base-en-v1.5` (INT8) | cortex-encoder-rs (ONNX Runtime) | **8.55 ms** | 8.83 ms | |
542| **Dot product (768 numbers)** | 100,000 iterations | Rust loop | **0.0006 ms** (0.58 us) | 0.0008 ms | 1.71M ops/sec |
543
544### 4. GB10 run gb10_canonical_1789907893_4d762 (withdrawn)
545
546Recorded on the DGX Spark GB10 (`sm_121`). The run files report `fallback_count: 0` for every step.
547
548#### A. Continuous batching sweep (TinyLlama-1.1B BF16)
549
550| Concurrency | TTFT p50 | ITL p50 | Throughput | Step latency p50 | GPU power | GPU utilization | Active KV blocks | Fallback count |
551| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
552| **C = 1** | 33.39 ms | 22.26 ms | 44.65 tok/s | 22.26 ms | 16.94 W | 10% | 8 | 0 |
553| **C = 2** | 31.38 ms | 20.92 ms | 94.87 tok/s | 20.92 ms | 21.29 W | 95% | 16 | 0 |
554| **C = 4** | 32.64 ms | 21.76 ms | 46.17 tok/s | 21.76 ms | 17.61 W | 95% | 14 | 0 |
555| **C = 8** | 30.42 ms | 20.28 ms | 245.66 tok/s | 20.28 ms | 31.14 W | 12% | 46 | 0 |
556| **C = 16** | **35.34 ms** | **23.56 ms** | **553.14 tok/s** | **23.56 ms** | **27.89 W** | 9% | 110 | **0** |
557| **C = 32** | 112.76 ms | 75.17 ms | 222.77 tok/s | 75.17 ms | 41.90 W | 96% | 166 | 0 |
558| **C = 64** | 152.55 ms | 101.70 ms | 510.16 tok/s | 101.70 ms | 42.52 W | 96% | 416 | 0 |
559
560#### B. Branching (500 branches, 32,768 prefix tokens)
561
562- **Total time to fork 500 branches:** 1.20 ms (1,202.2 µs)
563- **Median fork time per branch:** 2.06 µs (p90: 3.18 µs, p99: 5.86 µs)
564- **Shared blocks:** 2,048 (reference count 501, no duplicate blocks)
565- **KV memory allocated:** 704.00 MB, against 352,000.00 MB (343.75 GB) if every branch had its own copy
566- **Memory ratio:** 500.0x
567- **Cold fork to first token:** 13.04 µs (0.013 ms)
568- **Copy-on-write change:** 13.30 µs (13,297 ns)
569- **Fallback count:** 0
570
571#### C. File digests
572
573The run files are under `artifacts/gb10_canonical_1789907893_4d762/`. Their SHA-256 digests match its `SHA256SUMS` file, and `bench_verify_records` digest-checked all 5 on 2026-10-19:
574
575| File | SHA-256 |
576| :--- | :--- |
577| `manifest.json` | `a78f0ad669b85e92ceffed38e7d36bc55786280b1b4d21d9ae646f1718479816` |
578| `summary.json` | `9cf62a25445e643b3f7d0af5bc86217aed2de1067bcb37c6610e653c2d2cedc8` |
579| `linear_sweep.json` | `0362ac84d0eb0ddcdc1a877ef449a2030eb59c0d5ed0a621fcc75aac8f661858` |
580| `branch_steady.json` | `6cf46288e554c41bc5003fd3e0c7d56e25dbc15466ce8ab67ca4db14f7af8155` |
581| `branch_cold.json` | `d09869d5a3ec4365bec4f97f1d8e7ba32ea0d799ea6160bb0aed82b9904fa567` |
582
583The program that produced it is `bench_canonical_suite` (`cargo run --release --bin bench_canonical_suite`). It builds from the pinned checkout described in [Build and test](#build-and-test) and needs the GB10 GPU to run.
584
585---
586
587## License
588
589Licensed under the Apache License, Version 2.0 (Apache-2.0). See [LICENSE](LICENSE).
590Copyright (c) 2026 Drake Stapleton and AIEN Contributors. See [NOTICE](NOTICE) for attribution.
591
592- **Code and harness:** [Apache-2.0](LICENSE).
593- **Benchmark data:** the raw JSON telemetry, timing records and SVG charts are dedicated to the public domain under [CC0-1.0](https://creativecommons.org/publicdomain/zero/1.0/).
594- **Development charter:** [CONSTITUTION.md](CONSTITUTION.md) sets the rules for upstream development. It does not bind people who use this code.
595
596Contributing: see [CONTRIBUTING.md](CONTRIBUTING.md). Security reports: see [SECURITY.md](SECURITY.md).