omegese45 pipeline: data, core model, training
Pipeline lane of aien-train#45. This lane owns:
native/omegese45/data/gen.om(episode generator);native/omegese45/core/{model,ckpt,run,cli}.om(core model, checkpoint, training and decode CLI);tests/omegese45/core/(build, suite, oracle);- the receipts under
evidence/OMEGESE45/pipeline/.
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
| Item | Status | Receipt |
|---|---|---|
Generator oe45gen, deterministic, contract-valid, follows the reference policy | EXERCISED | evidence/OMEGESE45/pipeline/data/, suite/ |
Dense core model, forward and backward in .om | EXERCISED (gradient check 639/639 entries) | suite/grad.stdout |
| Two-phase training from random weights, 400,000 steps | EXERCISED, 23:52 wall | train/r1/ |
| Reproducibility (second run byte-identical) | EXERCISED | train/repro-cmp.txt |
Checkpoint OE45CK01: resume after kill -9, fallback, 51/52 | EXERCISED | suite/ |
Decode U and G, batch over the full dev set | EXERCISED | batch/ |
| Mutants (gradient sign flip, target shifted by one) | EXERCISED, both KILLED | suite/run-core.log |
| Transformer core | NOT_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 inference | NOT_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
| Split | Command | Episodes | .ids sha256 | .oe45 sha256 |
|---|---|---|---|---|
| train | oe45gen 4501 20000 train.oe45 train.ids | 20000 | 76120f4d436edabb9745e568706d613a542e25b59d61965a42bf9488a92f4228 (1,516,027 B) | 609cb1aac900c001a5474c7ff352c1f58d70d384a9ee6af3072ff4baf7af2940 (4,476,414 B) |
| dev | oe45gen 4502 1000 dev.oe45 dev.ids | 1000 | 041741b42bd5d02193afd193c0790b979e911603374920d1b2c124ff36c281cf (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:
- The goal kind is
mmorpair, each with probability 1/2. - Each of the three dimensions is drawn independently:
- 8%: an edge value 0x000, 0x001, 0x100 or 0x101, 2% each;
- 4%: uniform in 0x101..0xfff;
- 88%: uniform in 0x001..0x100. The admitted range is 1..256, so a dimension is out of range with probability 2% + 2% + 4% = 8%.
- Seeds are uniform in 0..0xffff.
- Each job attempt has a synthetic outcome drawn for training coverage:
- 55%:
res ok; - 15%:
res fail transport; - 2% each: the 15 other class × code pairs, namely refused × {replay, budget, worker, transport, receipt, recomp, verdict, io} and fail × {replay, budget, worker, receipt, recomp, verdict, io}.
- 55%:
- The first
fail transportof a job is retried once.
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:
- P(admit) = 0.92³.
- P(job ok) = 0.55 + 0.15 · 0.55 = 0.6325, since one retry is allowed after a transport failure.
mmhas one job andpairhas two.
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) | Observed | Expected | (obs − exp)/√exp |
|---|---|---|---|
| out-of-range goals | 4461 | 4426.24 | 0.522 |
episodes ending rep ok | 8059 | 8040.39 | 0.208 |
| transport retries | 3042 | 3074.84 | −0.592 |
| episodes stopped by an outcome | 7480 | 7533.37 | −0.615 |
fail transport outcomes | 3495 | 3536.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:
- head slot p (0 ≤ p < 30, p < t): the one-hot of id[p], at feature p·41 + id;
- tail slot k (0 ≤ k < 64, k < t): the one-hot of id[t−1−k], at feature (30 + k)·41 + id.
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).
- Initialization (algorithm 1). splitmix64 seeded with 45 generates W1 and then W2 in payload order. Each value is u = ((r >> 40) − 2²³) · 2⁻²³, scaled by 1/8 for W1 and 1/16 for W2. The biases are 0. Every value is a dyadic rational and exact in binary32.
- Loss. Squared error between the 41 outputs and the one-hot target id[t].
- Update rule. Plain SGD, one update per trained position, with learning rate 2⁻⁷ = 0.0078125
(
lrbits 1006632960). - Phases.
- Phase 1 is self-supervised. It trains every position t ≥ 1 of every episode for P1 = 20,000 steps, one episode per step, which is one epoch (1,496,027 positions).
- Phase 2 is supervised. It trains only the positions of messages whose frame id is
actorrep(the A/P mask), up to TOTAL = 400,000 steps.
- Epoch order. A Fisher-Yates permutation per epoch, drawn from splitmix64 seeded with order + 1000003 · epoch (order = 7). It is rebuilt from the step count alone, which is what makes resume exact.
- Decoding. Greedy argmax.
- U (unguided) takes the argmax over all ids and validates the message afterwards.
- G (guided) restricts the argmax to the ids the grammar allows (
ocmask).
The decode budget is 31 ids (interface §6).
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)
| Check | What fails it |
|---|---|
| gradient check | At 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 decrease | The summed loss over the first 50 training episodes must fall after one SGD pass over them (rc 87 otherwise). |
| target and mask | The (episode, t, target, mask) dump must match oracle.py mask byte for byte. |
| causal no-leak | Changing 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 resume | timeout -s KILL 2 in mid-run, then resuming, must give ck.a and ck.b byte-identical to an uninterrupted run. |
| data binding | Training with a different .ids file must exit 54. |
| round trip | Load then save must reproduce the payload bytes exactly. |
| corrupt slots | A 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. |
| decode | G 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 oploss | Must be KILLED by the gradient check (rc 86, GC 639 362). |
mutant 1: optgt reads t + 1 | Must 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.
| Measure | Value | Source |
|---|---|---|
| wall time | 23:52.05 (r1), 23:51.72 (r2) | train/r*/time.txt |
| user / system CPU | 1429.84 s / 0.91 s, 99% of one core | train/r1/time.txt |
| per step (one episode) | 3.5746 ms (Wolfram 1000*1429.84/400000) | |
| max RSS | 9600 KB | train/r1/time.txt |
| checkpoint | 3,989,908 B per slot (Wolfram 4*997417 + 240) | |
step-0 ck.a sha256 | 02d85006cd96c9c450c66147538a286b07954964fa14552fb40501fcf77225f2 | train/r1/sha.txt |
trained ck.a (gen 21, step 400000) sha256 | 2ebb99de9a0aa04dfba95e0f008e392b99c3f4c4c3836086e24cf7b3a8204058 | train/r1/sha.txt |
trained ck.b (gen 20, step 380000) sha256 | 71118b656eb3aa8ac5a5d75e5d5a35710d49a44e78bfcbba88cfcec81a25892e | train/r1/sha.txt |
| reproducibility | r2 step0.ck, ck.a, ck.b and train.out are byte-identical to r1 | train/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"]):
- 0.287741 in phase 1, up to step 20000;
- 0.0712697 for steps 20000..40000;
- 0.0137037 for steps 380000..400000.
Dev results, from 2410 A/P messages in 1000 episodes (D step episodes positions correct messages exactU exactG):
| Checkpoint | Teacher-forced correct positions | Exact messages, U | Exact messages, G |
|---|---|---|---|
| step 0 | 1564 / 44233 (3.536%) | 0 / 2410 | 159 / 2410 (6.598%) |
| step 400000 | 43793 / 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).
| lr | P1 | Exact G at 10k / 20k / 30k / 40k |
|---|---|---|
| 2⁻¹⁰ | 20000 | 258 / 496 / 765 / 1107 |
| 2⁻⁸ | 20000 | 795 / 1378 / 1565 / 1614 |
| 2⁻⁸ | 5000 | 824 / 1463 / 1596 / 1590 |
| 2⁻⁷ | 20000 | 991 / 1566 / 1659 / 1797 |
| 2⁻⁶ | 20000 | 830 / 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).
| Checkpoint | Mode | Wall | Valid ok | err 50 | err 53 | Exact vs reference |
|---|---|---|---|---|---|---|
| step 0 | U | 3.64 s | 0 | 94 | 2316 | 0 |
| step 0 | G | 1.12 s | 2410 | 0 | 0 | 159 |
| step 400000 | U | 1.69 s | 2410 | 0 | 0 | 2116 |
| step 400000 | G | 1.70 s | 2410 | 0 | 0 | 2116 |
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 message | Errors |
|---|---|
act job | 148 / 1200 |
act refuse | 7 / 210 |
rep ok | 139 / 401 |
rep refused | 0 / 402 |
rep fail | 0 / 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
- Why not the native tape.
native/autodiff664/tape.omat omega-mv965fb762(sha2561b4ed431…a708bde) has these limits: "rank 2 only, at most 32 nodes, 64 elements per node" (line 3), and value and gradient arenas of 2048 binary32 each (global TV f32 2048,TG f32 2048). The first weight matrix alone has 3854 × 256 = 986,624 elements. Forward and backward are therefore written out inmodel.omand checked against central differences instead. The squared-error loss is the one interface §6 names as tape-compatible. - Why PACK5 is not reused.
native/ecosystem5/pack.om(docs/ecosystem5/CONTRACT.md) is composed with Omega L775/L776 admission units and pinned to a different compiler (sha256191b776e…98e9). Its inputs are admitted public examples, not generated episodes. The idea taken from it is the supervised-target mask: phase 2 masks the loss to A/P messages (opmask). - No transformer. This is a dense model, as interface §6 prescribes for the first step. The transformer is NOT_RUN, as stated in §1.
- Branch base.
feat/45-pipelinestarts at main5aaeb65plus contract80cc357. It includes only the pipeline commits and the refuse-prefix fix from00d66c37. The unused PR #42 merge was removed by reconstructing this new branch; the oldfeat/45-native-pipelineis not rewritten. PR #42's build/suite convention was consulted, but its code is not a dependency. - Dependencies.
native/omegese45/core/dependencies.jsonrecords:- the compiler pin;
- the SHA-256 unit (omega-mv
bf54b19f,om/sha256/sha256-om2.om, sha256dbf002dd…94bb), used for the vocab pin, the data binding and the payload digests; - the oracle;
- each host tool with its version and role.
The
sedrewrite ofexport fntofnis the one host step in the build path. Its replacement proposal is an omc unit-link mode that accepts exported library units.
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.
- Step 0:
/tmp/op45w/final/ck0/ck.a, sha25602d85006…77225f2. - Trained:
/tmp/op45w/final/ck/(ck.a2ebb99de…8204058is the newest;ck.bis71118b65…25892e).