interplane.Get Omega
Read in your language

aien-train

AIEN training programme: language-model history, GB10 constraints and the route to training on the project engine. Plans and runnable checks are distinguished.

Brought by drakestapleton

branch main Branches Tags History

aien-train / docs / si19 / ORIG1-CONTRACT.md

183 lines · 11441 bytes Raw Blame History Source

ORIG-1: original mini-model selector task and owner-controlled experience dataset

aien-train#24, child of #19. Frozen before any ORIG-2 training. A change to any numbered rule below is a new contract version, never an edit of this one.

Status words used here: PASS, FAIL, INCONCLUSIVE, NOT_RUN, BLOCKED. Host-only results are development results, never hardware qualification.

1. The consumer (pinned)

itemidentity
consumerthe Omega empirical cost model's matvec realization choice, rx_cm_decide in src/runtime/rx_costmodel.{c,h}, exercised by tests/runtime/rx_empirical_optimizer.c (make test-empirical)
repository, revisionaien-dev/omega-mv 18c653b3101fa09c157dca8d222efab41ab5e89d (main, 2026-10-25); the consumer files are byte-identical to a0eafa39
record taptests/runtime/rx_empirical_optimizer.c at 1ec813726aef5f5abf8ab449c5d8bd9738f88d2e (branch feat/731-orig4-shadow-advice): OMEGA_EMPIRICAL_RECORDS=<path> appends one record per cost table; default off; nothing in the consumer reads it. Since omega-mv 03057d27 the variable names a descriptor instead: OMEGA_EMPIRICAL_RECORDS=<fd> with fd 3..1023 open for append on a regular file (e.g. 3>>records.bin); anything else turns the tap off (omega-mv spec/shadow-advice-v0.md)
admissible-candidate generatorthe consumer's eligible bit mask: an arm is admissible only when its forked differential verification passed (g_verified) and the caller allows it. The reference arm (0) is always admissible
transformation familyinteger matvec y = A x realizations on one AArch64 core: 0 reference (compiled), 1 scalar, 2 unroll2, 3 unroll4_dual (M12 emitters), 4 quad4 (R10), 5 planted_wrong (never admissible). Cap: 8 arms (RX_CM_ARMS)
incumbent planneromega_matvec_dispatch's fixed rule: unroll2 when N <= 8, else unroll4_dual
verifierevery timed run's output digest equals the reference digest for that job (time_arm); a table with any mismatch is ineligible
costpicoseconds per call, best of 5 rounds per arm, rotating order (truth_table)
hardware profileDGX Spark host: Linux 7.0.0-1019-nvidia aarch64; core classes from MIDR: 0 Cortex-X925 (last private cache 2097152 B), 1 Cortex-A725 (524288 B), 2 other (1048576 B)
compiler for the .om sideseeded omc sha256 191b776ef98821597c3e30655da6d680a9b66edbc9ceaca3c39c61ea6df098e9 (the pin of docs/si19/dependencies.json, R5b, source omega-mv 29b12760); the R6 compiler 734f0a39...6b61 (omega-mv main seed/out/omc) must also compile every unit unchanged

The scorer ranks the admissible arms of one decision. It never proposes an arm, never widens eligible, and has no execution authority: deterministic code generates, verifies, selects and runs.

2. Record format omexp-v1

One record is 32 little-endian 64-bit words (256 bytes). A file is a whole number of records, at most 2048.

wordfieldrule
0magic3553143591248351811 (0x314f4d4558505243)
1version1
2family0 train grid, 1 validation grid, 2 H1 unseen shapes, 3 H2 thin-heavy mix, 4 H3 = H1 shapes under memory pressure
3core class0, 1 or 2
4pressure bucket0..15; the consumer uses 0 and 1
5, 6M, N1..8192 each
7callstimed calls per measurement, >= 1
8job seedthe consumer's job seed (operands are regenerated from it)
9state bytes(M*N + M + N) * 8
10cache bytesmust equal the class value of section 1 (profile check)
11thermal Crecorded, never a feature
12eligible maskbit 0 must be set; no bit at or above the arm count
13arm count1..8
14sequencestrictly increasing within a file
15monotonic nsrecorded, never a feature
16..23ps per call, arm 0..70 = not measured; an eligible arm must be measured
24..31per arm verified flag (24..29), reference digest (30), mismatches (31)word 31 must be 0

A decision instance is one record: the state is words 2..13, the candidates are the arms whose eligible bit, measurement and verified flag are all set. Incorrect results are ineligible (word 31 != 0 refuses the record). An unmeasured cost is unknown (0), never a fabricated number.

3. Typed features (frozen)

All quantities are integers in 1/16 units, converted to binary32 exactly with wmbits n 4. lg16 v for v >= 1 with bit length L and e = L - 1 is (v << 4 >> e) + 16 (e - 1): floor(log2 v) plus a truncated 4-bit fraction.

State vector x (12):

jvaluenote
016constant 1 (bias)
1lg16 M
2lg16 N
3(lg16 M * lg16 N) >> 8log2 M * log2 N / 16
4(lg16 N * lg16 N) >> 8(log2 N)^2 / 16
516 if N <= 3 else 0
616 if N rem 4 != 0 else 0
7max(0, lg16 state_bytes - lg16 cache_bytes), capped at 256doublings past the private cache
8, 9, 1016 for the matching core class 0, 1, 2one hot
1116 * min(pressure, 15)

Candidate vector c (8): 16 at the arm's index, 0 elsewhere. The model input is x (affine: per arm) or x concatenated with c (nonlinear). Thermal state, calls, seed, sequence and time are never features. These are the consumer's own basis (spec/empirical-optimizer.md, "Features and targets") plus core and pressure as inputs instead of cells.

4. Target and objective (frozen)

Per (record, admissible arm a): t16 = lg16 ps_a - lg16 ps_0, the cost of the arm relative to the always-admissible reference, in 1/16 log2 units. The reference anchors the scale, and argmin over arms of t16 is argmin of ps.

Normalization is fitted on the TRAIN partition only: mu16 = floor of the mean of t16 over train pairs; sh = max(0, bitlen(s16) - 5) where s16 is the integer square root of the mean of (t16 - mu16)^2. The learning target is y = (t16 - mu16) / 2^(4 + sh) as binary32, exact while |t16 - mu16| < 2^24. The predicted score is in the same units; selection is the arm with the smallest score among admissible arms, lowest index on a tie. The loss is the squared error of the score against y, summed over the admissible arms of a record and averaged over records.

5. Provenance, authorization, privacy

6. Splits (frozen, by family and shape lineage)

partitionfamilieslineage rule
TRAIN0the consumer's training grid, M in {1,4,16,64,256,1024}, N in {1,2,3,5,8,12,16,33,64,100,256,512,1024}; two timing passes of each shape stay together
DEV1validation grid, M in {2,8,32,128,512}, N in {4,6,10,24,48,200,700}: no M or N value shared with TRAIN
TEST-H1260 log-uniform shapes per core with no M or N value seen in TRAIN or DEV
TEST-H23thin-heavy mix: unseen M values; 70% reuse TRAIN N values in 1..7 (declared partial lineage overlap)
TEST-H34the H1 shapes under memory pressure, a condition absent from TRAIN and DEV (out-of-distribution)

The loader refuses a file in which any TEST-H1 (M, N) key also appears in TRAIN or DEV (future/held-out contamination). The trainer admits only TRAIN records; DEV is used for the lr choice and early stopping; TEST is read only by the evaluation mode after the checkpoint is final. There is no sealed judge-held holdout on this machine: every TEST number here is development-only. ORIG-3 obtains a sealed test set by running the tap again after the candidate checkpoint is frozen (the records do not exist at training time), which is the only sealing available without an independent operator.

7. Baselines (frozen)

namechoice
fixed rule (incumbent)arm 2 when N <= 8 else arm 3, if admissible, else arm 0
always referencearm 0
best staticthe single arm with the lowest total TRAIN cost for that core class
retrievalthe TRAIN record of the same core class nearest in (lg16 M, lg16 N) by L1 distance (lowest sequence on a tie); choose its cheapest admissible arm
affineper-arm linear scorer on x (8 x 12 = 96 parameters), trained as in ORIG-2
oraclethe cheapest admissible arm of the record (analysis bound only)
controlsuntrained scorer (declared init), shuffled targets (t16 permuted among train pairs by the trainer RNG), no-update run (lr = 0; parameters must stay bit-identical)

Metric: total chosen cost over oracle cost, sum of ps per call over the partition's records (unweighted by calls), per core class and overall; top-1 agreement with the oracle; paired per-record wins and losses against each baseline.

8. Budgets and stop rules (predeclared)

itemlimit
seedstrainer 19024; init from the same LCG as wsrand
nonlinear modelat most 100000 trainable parameters (engineering budget, not an optimum); ORIG-2's first model is 705
learning rateone of 2^-8, 2^-10, 2^-12 chosen on DEV loss; nothing is chosen on TEST
epochsat most 64 full passes over TRAIN, per-record order from the trainer RNG; stop early when DEV loss has not improved for 16 epochs
updatesat most 2^20
dataat most 2048 records per file; at most one owner dataset per run
memoryprogram image under 16 MiB; checkpoint under 64 KiB
wallcompile + tests + one training run under 30 minutes on the host
failed experimentscounted in the evidence README; a failed or inconclusive run is kept

A hardware (GB10) run is not part of ORIG-1 or ORIG-2: NOT_RUN. Any later Spark experiment needs an exclusive reservation and never loads a second model beside the resident service.

9. Acceptance mapping

#24 acceptancewhere
versioned manifest, exact identitiesdocs/si19/orig1-manifest.json, this file
provenance teststests/si19/omexp-test.om tprovenance, tallow
refusal tests: revoked, unauthorized, corrupt, duplicate, wrong profile, contaminatedtests/si19/omexp-test.om trefuse*
family/episode isolation, holdout boundary testabletsplit, tleak
baselines, units, fixture vs real, stop rules explicitsections 4, 7, 8
consent-safe dataset local, public fixtures syntheticsection 5
missing real experience or sealed holdout = BLOCKED/development-onlysection 6; receipts say development-only