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 / omegese45 / PIPELINE.md

297 lines · 17700 bytes Raw Blame History Source

omegese45 pipeline: data, core model, training

Pipeline lane of aien-train#45. This lane owns:

The vocabulary (R45, 41 ids), grammar, reference policy and exit codes belong to the contract lane and are used unchanged (native/omegese45/{vocab,msg}.om, docs/omegese45/vocab.tsv). The command line is documented in CORE-CLI.md.

Status words: IMPLEMENTED (code exists), EXERCISED (run, with a receipt), NOT_RUN. Every measurement below was taken on the **GB10 Spark Grace CPU, cores 10-14 (Cortex-A725), nice 19, ionice idle**. The programs are single-threaded. No GPU was used.

1. Status

ItemStatusReceipt
Generator oe45gen, deterministic, contract-valid, follows the reference policyEXERCISEDevidence/OMEGESE45/pipeline/data/, suite/
Dense core model, forward and backward in .omEXERCISED (gradient check 639/639 entries)suite/grad.stdout
Two-phase training from random weights, 400,000 stepsEXERCISED, 23:52 walltrain/r1/
Reproducibility (second run byte-identical)EXERCISEDtrain/repro-cmp.txt
Checkpoint OE45CK01: resume after kill -9, fallback, 51/52EXERCISEDsuite/
Decode U and G, batch over the full dev setEXERCISEDbatch/
Mutants (gradient sign flip, target shifted by one)EXERCISED, both KILLEDsuite/run-core.log
Transformer coreNOT_RUN: softmax needs exp, and omc bf54b19f has only the float intrinsics fsqrt, fabs, fmin and fmax (interface §0). This is an extension proposal.none
GPU training or inferenceNOT_RUN: no GPU window was requested; this lane is CPU-only by assignment.none
Native tape reuse (native/autodiff664/tape.om)NOT_RUN (does not fit, see §5)none

No reinforcement learning of any kind is used. Phase 1 is self-supervised next-token prediction and phase 2 is supervised next-token prediction masked to A and P positions. Both use the reference-policy episodes as targets, with no reward signal, no sampling-based objective and no policy gradient.

2. Data

SplitCommandEpisodes.ids sha256.oe45 sha256
trainoe45gen 4501 20000 train.oe45 train.ids2000076120f4d436edabb9745e568706d613a542e25b59d61965a42bf9488a92f4228 (1,516,027 B)609cb1aac900c001a5474c7ff352c1f58d70d384a9ee6af3072ff4baf7af2940 (4,476,414 B)
devoe45gen 4502 1000 dev.oe45 dev.ids1000041741b42bd5d02193afd193c0790b979e911603374920d1b2c124ff36c281cf (76,482 B)8396a07bc33e32228625a504d8b8d73503c4d7ceee23b9235fdd1a6da2122d54 (225,668 B)

The files are regenerated, not committed. Regenerating them with the head-built binary gives byte-identical files (cmp, receipt data/). The stdout counters are in data/gen-4501-20000.stdout and data/gen-4502-1000.stdout.

Lineage (interface §7) is (generator unit sha256, lineage seed). The generator unit is native/omegese45/data/gen.om. The training lineage used sha256 2d44ac9c560062e6cd9557393ebe269ab325fdeca03749956f2cbf3637878e58. The final source sha256 is 2c61fadcb93d736cfeec894462c84d1053510c4ddf88cb945fb0d3dbf50aebcb; the only change is correcting its documentation citation and labeling the outcomes as synthetic. The lineage seeds are 4501 (train) and 4502 (dev). Each episode is generated by the reference policy of interface §3 from one goal:

These are grammar-coverage probabilities, not a measured or predicted runtime distribution. In particular, res refused {transport receipt recomp verdict io} and res fail {replay budget worker} are legal R messages for grammar coverage but unreachable through the Aienet-0 exit map (interface §5). At run time only that exit map may produce R; the model never produces res (interface §0).

Generator stdout begins oe45gen v1 SEED COUNT, then 26 coverage counters in this order (gen.om, coverage-line declaration): mm pair oob retry stop okep e000 e001 e100 e101, then refused replay budget worker transport receipt recomp verdict io, then fail replay budget worker transport receipt recomp verdict io.

The generator implements the v1.3 episode pin: an out-of-bound G yields only act refuse bound end then rep refused bound end. In-bound goals use only A-job/R pairs then P. The core prefix parser accepts G, G (A-job R)*, or G A-refuse as decode points; it refuses any P inside a prefix, a refuse after an A or R, and any message after a refuse. Decoding deliberately does not encode this policy in the message DFA (interface §3); hive must still reject an inappropriate predicted message kind.

Outcome distribution checked with Wolfram

Expected counts follow from the generator:

WolframLanguageEvaluator query and raw result are in wolfram-distribution.txt. Its expressions are oob = n (1-adm); okep = (n/2) adm (pj + pj^2); retry = (n/2) adm (15/100 + 15/100 (1+pj)); attempts = (n/2) adm (115/100 + 115/100 (1+pj)); stop = n adm-okep. At n=20000 the returned expected counts are: oob 4426.24, okep 8040.39, retry 3074.84, stop 7533.37, attempts 23573.8, fail transport 3536.07 and each other pair 471.476.

Train counter (seed 4501, N 20000)ObservedExpected(obs − exp)/√exp
out-of-range goals44614426.240.522
episodes ending rep ok80598040.390.208
transport retries30423074.84−0.592
episodes stopped by an outcome74807533.37−0.615
fail transport outcomes34953536.07−0.691

The 15 other outcome pairs total 7027 observations. Query:

others = {481,456,538,456,459,482,473,472,448,474,430,474,459,493,432}; e = 471.4761168;
x2 = Total[(others - e)^2/e]; {Total[others], N[x2, 5], N[1 - CDF[ChiSquareDistribution[15], x2], 4]}
-> {7027, 20.6279, 0.1491}

The uniformity test on the same counts, with 14 degrees of freedom around their own mean, gives p = 0.1160.

Dev (seed 4502, N 1000), with the same expressions and n = 1000. The observed counts are {oob 210, okep 401, retry 158, stop 389}, the expected counts {221.312, 402.020, 153.742, 376.668}, and the z-scores {−0.760, −0.051, 0.343, 0.635}.

All |z| are below 1 and the χ² p-value is 0.149, so the counters agree with the declared distribution. The reference policy itself is checked episode by episode by the independent oracle (oracle.py policy prints POLICY n 0) and by the in-.om contract validator (vgen).

3. Model

The model is a dense next-token model over the R45 ids. Each position t predicts id[t] from a causal input built only from ids at positions < t:

There are (30 + 64) · 41 = 3854 inputs. The longest goal is 30 ids and the longest message 31, so the head slots cover the whole goal and the 64 tail slots cover the last two messages. The network is one hidden layer of 256 ReLU units followed by 41 linear outputs, with 3854·256 + 256 + 256·41 + 41 = 997,417 parameters (Wolfram: 3854*256 + 256 + 256*41 + 41 -> 997417).

The step-0 checkpoint is fully determined by (seed 45, algorithm 1). Its payload sha256 is 6e2e8efebdad7a09535ef0ef7eb90e8cd72a066b693a89e5ebb4da5c32841c1b, the same in the suite fixture and in the full run.

Tests (tests/omegese45/core/run-core.sh)

CheckWhat fails it
gradient checkAt three positions of episode 0, central differences (ε = 2⁻⁶) must agree with the backward pass within 0.001 + 0.01·|g| at every sampled parameter entry (639 in total; rc 86 otherwise).
loss decreaseThe summed loss over the first 50 training episodes must fall after one SGD pass over them (rc 87 otherwise).
target and maskThe (episode, t, target, mask) dump must match oracle.py mask byte for byte.
causal no-leakChanging every id at positions ≥ t must not change the output at t, and changing id t must change the output at t + 1 (control).
kill -9 and resumetimeout -s KILL 2 in mid-run, then resuming, must give ck.a and ck.b byte-identical to an uninterrupted run.
data bindingTraining with a different .ids file must exit 54.
round tripLoad then save must reproduce the payload bytes exactly.
corrupt slotsA corrupt, header-flipped or truncated newest slot must fall back to the older slot. Both slots corrupt or an empty directory must exit 51; a wrong vocab pin must exit 52.
decodeG on step-0 and trained checkpoints never emits an invalid message. U is invalid (50) or over budget (53) when it should be. A bad prefix or header must exit 40. The refuse prefix must be accepted.
mutant 0: opgy sign flip in oplossMust be KILLED by the gradient check (rc 86, GC 639 362).
mutant 1: optgt reads t + 1Must be KILLED by the target/mask oracle comparison.

The suite ran to OE45_CORE_PASS in 14.89 s wall (suite/run-core.log).

4. Training run (issue #45 checkpoint)

P="taskset -c 10-14 nice -n 19 ionice -c3"
$P oe45core init ck train.ids 45 20000 400000 7 7
/usr/bin/time -v $P oe45core train ck train.ids 400000 20000
oe45core evaldev ck dev.ids

The full script is evidence/OMEGESE45/pipeline/train/final.sh. The two runs r1 and r2 ran in parallel.

MeasureValueSource
wall time23:52.05 (r1), 23:51.72 (r2)train/r*/time.txt
user / system CPU1429.84 s / 0.91 s, 99% of one coretrain/r1/time.txt
per step (one episode)3.5746 ms (Wolfram 1000*1429.84/400000)
max RSS9600 KBtrain/r1/time.txt
checkpoint3,989,908 B per slot (Wolfram 4*997417 + 240)
step-0 ck.a sha25602d85006cd96c9c450c66147538a286b07954964fa14552fb40501fcf77225f2train/r1/sha.txt
trained ck.a (gen 21, step 400000) sha2562ebb99de9a0aa04dfba95e0f008e392b99c3f4c4c3836086e24cf7b3a8204058train/r1/sha.txt
trained ck.b (gen 20, step 380000) sha25671118b656eb3aa8ac5a5d75e5d5a35710d49a44e78bfcbba88cfcec81a25892etrain/r1/sha.txt
reproducibilityr2 step0.ck, ck.a, ck.b and train.out are byte-identical to r1train/repro-cmp.txt

Mean loss per trained position is the summed pre-update loss from the T lines divided by the positions; the binary32 bits were decoded with Wolfram (ImportByteArray[…, "Real32"]):

Dev results, from 2410 A/P messages in 1000 episodes (D step episodes positions correct messages exactU exactG):

CheckpointTeacher-forced correct positionsExact messages, UExact messages, G
step 01564 / 44233 (3.536%)0 / 2410159 / 2410 (6.598%)
step 40000043793 / 44233 (99.005%)2116 / 2410 (87.80%)2116 / 2410 (87.80%)

The percentages are from Wolfram (N[43793/44233], N[2116/2410] and so on). These are pipeline self-checks on the dev split. The sealed evaluation and the reported metrics belong to the eval lane.

Tuning

Each tuning run used the same data. Dev exact-G is shown at 10k / 20k / 30k / 40k steps (evidence/OMEGESE45/pipeline/train/tune-*/dev.out).

lrP1Exact G at 10k / 20k / 30k / 40k
2⁻¹⁰20000258 / 496 / 765 / 1107
2⁻⁸20000795 / 1378 / 1565 / 1614
2⁻⁸5000824 / 1463 / 1596 / 1590
2⁻⁷20000991 / 1566 / 1659 / 1797
2⁻⁶20000830 / 1116 / 1615 / 1712

2⁻⁷ with one full self-supervised epoch was chosen. The 400,000-step total fits the 45-minute limit.

Batch decode over the full dev set

oracle.py prefixes dev.oe45 1000 writes 2410 prefixes. Each one ends just before an A or P message: after a G, after an R, or after act refuse (whose P follows directly). oe45core batch decodes them, and oe45test vok counts the results (evidence/OMEGESE45/pipeline/batch/summary.txt).

CheckpointModeWallValid okerr 50err 53Exact vs reference
step 0U3.64 s09423160
step 0G1.12 s241000159
step 400000U1.69 s2410002116
step 400000G1.70 s2410002116

Batch exact counts equal the evaldev counts. The trained model's G errors by expected message type (batch/errors-by-type-ck-G.txt) are:

Expected messageErrors
act job148 / 1200
act refuse7 / 210
rep ok139 / 401
rep refused0 / 402
rep fail0 / 197

The errors are concentrated in copying the hexadecimal operands. Guided decoding guarantees validity, not binding: the contract lane's binding check (exit 41/42) stays the gate before dispatch.

5. Design notes

6. Checkpoint locations for the demo and eval lanes

The checkpoints are too large to commit (3.99 MB per slot) and are regenerated by the commands in §4.