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 / tools / omegallm / wsplit / README.md

158 lines · 8403 bytes Raw Blame History Rendered
1# wsplit
2
3Seeded Omega replacement for `make_splits.py` and `make_d.py` in
4`evidence/OMEGALLM/wsp-dra187-20261107/`. All generation, parsing, random draws,
5JSON formatting, record framing, metadata and SHA-256 execute in Omega.
6The program reads the original inputs below, never the committed split outputs:
7
8`/home/drakestapleton/handoffs/tool-omega-20261104`
9
10## Build
11
12Linux AArch64. Pin `omega-mv` to
13`e5b32567a7aff3ce594e3254a622a846a6cd190b`:
14
15- `seed/out/omc` SHA-256:
16 `2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f`
17- `om/sha256/sha256-om2.om` SHA-256:
18 `dbf002dd6aa36585632b9d01d98ac3f0bd2fa0f0475082940de53638847994bb`
19
20From the aien-train root, with `OUT` an existing private build directory and `wbuild` built as in
21`tools/omegallm/wdrive/README.md`:
22
23```sh
24OMEGA_MV=../omega-mv
25sha256sum "$OMEGA_MV/seed/out/omc" "$OMEGA_MV/om/sha256/sha256-om2.om"
26OMC="$OMEGA_MV/seed/out/omc" CORE=0 wbuild "$OUT/wsplit" "$OMEGA_MV/om/sha256/sha256-om2.om" tools/omegallm/wsplit/wsplit.om
27```
28
29wbuild writes every line starting `export fn ` as `fn `, because the output is a program, so SHA's
30four `export fn` declarations become `fn`. It also moves the `om2` line and the `layout shactx`
31block to the top of `$OUT/wsplit-all.om`. The layout, implementation and constants are unchanged.
32wbuild checks omc's sha256, compiles with `taskset -c CORE nice -n 19`, and leaves no output from a
33failed compile. On 2026-11-07 (MEASURED) the binary was byte for byte the one from the earlier
34`sed 's/^export fn /fn /'` and `cat` route, sha256 `be6f7f0d...f19f`. There is no foreign runtime
35dependency.
36
37## Commands
38
39```sh
40mkdir -p /tmp/wsplit-output /tmp/wsplit-negative
41taskset -c 0 nice -n 19 "$OUT/wsplit" splits /tmp/wsplit-output
42taskset -c 0 nice -n 19 "$OUT/wsplit" d /tmp/wsplit-output
43taskset -c 0 nice -n 19 "$OUT/wsplit" splits /tmp/wsplit-negative 1
44```
45
46`OUTDIR` must exist. Existing `S`, `H`, `G` or `D` output files are overwritten.
47`splits` writes `S`, then `H`, then `G`, sharing the used-ID set as the Python
48instrument does. `d` preserves the selected source rows' order. Each writes
49`X.json`, `X.rec` and `X.meta`. Summary stdout matches the Python instrument:
50template/form/exclusion counts for `splits`, then split name, row count, JSON
51SHA-256 and record SHA-256. The optional unsigned seed offset (0 to 999999)
52is accepted only for `splits`; offset 1 is the negative control, not a new split.
53
54Metadata is ASCII, one newline-terminated row per JSON row:
55
56```text
57idx role length kind
58```
59
60There is no header. For example, `0 control 4 path`. Role is `target` for
61length at least 6 and `control` otherwise. Kind is `word` for G and `path`
62for S/H/D. The index is the post-shuffle JSON index.
63
64S/H/D records contain UTF-8 `prompt`, byte 31, UTF-8 `answer`, byte 0.
65G records contain only UTF-8 `prompt`, byte 0, matching the original generator.
66JSON has Python's one-space indentation, insertion-order keys, ASCII escapes,
67lowercase Unicode escape hex and no final newline.
68
69## Exactness and bounds
70
71MT19937 helpers are symbol-renamed copies of the verified `wprobe.om` helpers
72at aien-train `72d3377`. Integer seeding uses `init_by_array` with a single
7332-bit key word, which covers every seed and offset accepted here. `_randbelow`
74uses high-bit `getrandbits` rejection, including rejection for powers of two.
75The small-pool `sample(range(1, 10), 2)`, choice, descending shuffle, range draws,
76200-attempt pattern fallback, discarded leading-zero draws and the extra loop
77Goal draws preserve Python's call order. No float random API is needed.
78
79The tokenizer covers the supplied arrays of objects, their strings (JSON
80escapes and UTF-8), integer lengths, and skipped primitive/nested values. Task
81and Goal lines are extracted, deduplicated and sorted from inputs, not embedded
82as a fixture. Goal digit runs become `{}` before sorted form selection.
83Raw `item<digits>` and then `hello<digits>` scanning is over file bytes, not
84parsed JSON. The frozen corpus uses ASCII digits; non-ASCII decimal digit
85semantics of Python `re` are outside this input subset. Leading-zero strings
86remain distinct through numeric value plus digit length. The scanner is
87streaming, including matches crossing read boundaries. Hidden entries are
88excluded as in Python glob. Source symlinks and unknown directory-entry types
89are refused; the observed inputs have neither.
90
91Explicit capacities: each parsed JSON input is smaller than 524288 bytes,
92output buffer 524288 bytes, string arena 4194304 bytes, 32767 stored strings,
93256 tasks and 256 forms, 1024 rows, 32768 excluded/generated IDs, 18 digits per
94raw ID, directory depth 32. Raw scanned JSON files are filtered at the same
95strictly-less-than 52428800-byte size limit as Python and are not loaded whole.
96The program refuses exhaustion; it does not silently drop input.
97
98Exit codes: 0 success; 2 usage/unsupported seed; 61 capacity; 62 unsupported or
99malformed input; 63 random rejection limit; 70 I/O failure. Omega's checked
100runtime may also report its standard trap exit statuses.
101
102## ORACLE and acceptance
103
104ORACLE: the existing, independent CPython instruments `make_splits.py` and
105`make_d.py`, retained in historical evidence. They are verification references
106only, never executed by wsplit or needed to build or run it. CPython's algorithms
107are documented by [random.py](https://github.com/python/cpython/blob/v3.12.3/Lib/random.py)
108and [_randommodule.c](https://github.com/python/cpython/blob/v3.12.3/Modules/_randommodule.c).
109Byte comparison uses `cmp`; SHA-256 can also be checked with `sha256sum`.
110
111The input tree includes actively written evaluation results. A historical H
112must not be regenerated or rewritten: its preregistered hashes remain frozen.
113The accepted comparison, confirmed by the integrating lane, is current-input
114Omega versus current-input Python for all four splits, plus committed S/G/D.
115The frozen H discrepancy must be causally accounted for separately, not hidden
116by excluding a particular ID in product code or by adding a snapshot mode.
117
118On 2026-11-07, current-input H differed from committed H at indices 31, 61 and
119248. The new raw output `src/item1199.om` in
120`round41/c9/results/c9b-round40-fam-dev.json` excluded a previously fresh ID.
121An ORACLE-only intervention deleting precisely `1199` from the exclusion set
122restored both committed H files byte for byte. Product code has no such
123intervention. The changed file is a round41 evaluation result, not round40
124training data. See the integrating lane's port receipt for timestamps, hashes,
125commands, sizes, runtime, metadata checks and the seed-offset negative control.
126
127No compiler, language, host-word, gate or repository-ownership contract changed;
128this tool-specific README is the affected guide.
129
130## MT19937 attribution
131
132The MT19937 recurrence and initialization originate with Makoto Matsumoto and
133Takuji Nishimura, as retained in CPython's `_randommodule.c`:
134
135Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
136All rights reserved.
137
138Redistribution and use in source and binary forms, with or without
139modification, are permitted provided that the following conditions are met:
140
1411. Redistributions of source code must retain the above copyright notice,
142 this list of conditions and the following disclaimer.
1432. Redistributions in binary form must reproduce the above copyright notice,
144 this list of conditions and the following disclaimer in the documentation
145 and/or other materials provided with the distribution.
1463. The names of its contributors may not be used to endorse or promote products
147 derived from this software without specific prior written permission.
148
149THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
150AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
151IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
152DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
153ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
154(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
155LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
156ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
157(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
158SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.