interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

Add a seeded Omega training harness for CPU and GB10

open edf8fe5619d3a591 opened 2026-11-20 by z6MktvMGgxSZ19NQ...

1 commit · 3 files · 8855 bytes. Base 9dda7c88c5f95edda3edfaf23cd345d073c5e4fe. Applied head 82328d1889f36a8d83cee9d72f584d3ac2465a9c: the last commit this forge's own git am made on the base. It is in no repository; the owner applies the patch by hand.

Equivalent source on the signed project history. Proposal commit:
d2aaa308d925bf628b3fbe3bd0809cad34b2fba0
Seeded Omega training harness. Candidate 8610663f80fc59e61fa80b3466a3a57af8f586df.

Built on AArch64 Linux with the compiler grown by sh seed/omega-from-seed.sh. The compiled harness SHA-256 was 7e635c36b2ddc65c47452f9ef7aa17105d31993f42af6ecbd9c1583deffbc296.

CPU BPE smoke test from the run directory:
./wtrain-exact cpu ../ollm-bundle-chains-20261119/ollm tiny-bpe.ck ../ollm-bundle-chains-20261119/merges4096.bin data.om math.om cpu-bpe 3 500 3

K 8654 5013
K 5050 3649
baseline
E 0 3 8331334 7692528
U 69968
T 3 8294230
candidate
E 3 3 8331277 7692475
TRAINING_COMPLETE

Byte-mode training passed. Restarting a fine-tuning schedule from a trained checkpoint preserved the parent SHA-256. An existing destination was refused. Asking for 9999 held-out windows from the small byte corpus exited 23 before creating a candidate. A GPU invocation without the Spark window was refused.

tests/gates/run.sh evidence-immutable reported evidence_rewrites 0.
tests/gates/run.sh zero-disk-secrets reported env_files_found false.

Apply it

git checkout -b patch-edf8fe5619d3a591 9dda7c88c5f95edda3edfaf23cd345d073c5e4fe
curl -fsSL https://interplane.io/drakestapleton/omega-mv/patches/edf8fe5619d3a591.patch | git am

Raw patch (mbox) · Diff

Signature

The author's key did:key:z6MktvMGgxSZ19NQkrvXG6aRzjbFA1yBa2KJmmA9pSTJCiEZ signed this statement with ssh-keygen -Y sign -n interplane-patch; the forge checked the signature before it kept the patch. The lines are: format, repository, base, SHA-256 of the mbox, SHA-256 of the title, a line feed and the description.

interplane-patch 1
drakestapleton/omega-mv
9dda7c88c5f95edda3edfaf23cd345d073c5e4fe
0b671f32cb20eb48a793eb2491ae8db872d9501337140fbe49801c0f7ff35018
e24f4a279ede5b5f316d3114864711e9ddf2ab1031339c5a3a7423249b340edd
-----BEGIN SSH SIGNATURE-----
U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAg1vQ1KtWtuW5PISxEahQt4AgcBw
syuwQ4l2Qd7RBTSZ4AAAAQaW50ZXJwbGFuZS1wYXRjaAAAAAAAAAAGc2hhNTEyAAAAUwAA
AAtzc2gtZWQyNTUxOQAAAECf2S8MxRtbQPOt4iD62uSDWvFpEoi4ZKFx3/tVPZ32a/ACG6
BXbJvk62Mrjb3zx03rFFPQHAYvCxfCfpIagAsL
-----END SSH SIGNATURE-----

Changes

diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 28d22900a917aa238e1b4bc2191675f2781d31b2..d0bd5ba8cde4e8af7945faafbca83d572e7f50a4 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -358,3 +358,4 @@ Update this table in the same commit as the work it credits.
 | Antigravity (under Drake Stapleton's direction) | Pure seeded OM-2 runtime migration (`om/runtime/`, 11 units bound via `om/units.sh`): migrated regulator decision/envelope/step (`rx_regulate.om`), canonical Machine ID codec/hash/compare (`rx_mid.om`), Cortex crumb classification/digest/link dedup (`rx_cortex_rec.om`), plan word/predicate sort/arrangement fact pack (`rx_plan_core.om`), state projection summary/classification (`rx_projection.om`), capability query hash/ranking/Pareto dominance/128-bit tolerance band (`rx_capq_core.om`), Bayesian cost model Cholesky/Student-t/rank-1 update (`rx_costmodel_core.om`), cognitive routing binning/Wilson interval (`rx_route_core.om`), World lifecycle FSM/resource admission/priority ordering (`rx_world_core.om`), skill router rejection bitmask/digest-zero (`rx_skillroute_core.om`), and workflow fusion eligibility/word64 (`rx_fusion_core.om`). Verified on Spark (`om/units.sh --check` + 14 host runtime test suites). |
 | Codex (under Drake Stapleton's direction) | Integrated Antigravity's runtime units with current bindings and restored large and overlapping projection summary inputs. |
 | Codex (under Drake Stapleton's direction) | Ported OSC integer-literal decoding and overflow detection to seeded Omega and connected the lexer to the generated binding. |
+| Codex (under Drake Stapleton’s direction) | Implemented the seeded Omega training harness for native tokenization, CPU and GB10 fine-tuning and held-out evaluation. |
diff --git a/train/omega-llm/README.md b/train/omega-llm/README.md
index 08f377aeae4506bd3f9f888378b99ca7f435feae..73a42d13088478ffc8273c48383c603e7a41fbae 100644
--- a/train/omega-llm/README.md
+++ b/train/omega-llm/README.md
@@ -15,6 +15,26 @@ The Python corpus builder and compile feedback loop live in `tools/omega-llm/` a
 
 Stays in aien-train (listed in `train/NOT-YET-OMEGA.tsv`): the shell/Python harness `tests/omegallm/` (`build.sh`, `oracle.py`, `pre-review.py`, ...), `evidence/OMEGALLM/` receipts, and the C++ llama.cpp UI bridge `tools/omegallm-ui/`. The docs here still cite those upstream paths and commits. Unless a citation names a different commit, upstream paths refer to aien-train `f1bebdf3c5b08ec624005e5bc39d0427a87f9537`; they are not local omega-mv paths.
 
+## Training from source text
+
+The seeded `wtrain` harness fine-tunes an existing checkpoint on a training text file and evaluates both checkpoints on the same held-out text. For a coding run, supply Omega source or instruction-and-function records. Keep the evaluation corpus separate before starting the run. The trainer uses full-token loss.
+
+Build on AArch64 Linux from the repository root with the seeded compiler. The first source supplies the existing Omega driver library.
+
+```sh
+driver=train/omega-llm/tools/wdrive
+{ sed "s/^fn main to int$/fn wbmain to int/" "$driver/wbuild.om"; cat "$driver/wtrain.om"; } | seed/out/omc > wtrain && chmod +x wtrain
+```
+
+Pass an Omega LLM executable, base checkpoint, tokenizer merges, training file, held-out file, new output directory, step count, learning rate in millionths and number of held-out windows. Byte checkpoints use `-` for the merges argument. BPE checkpoints use the native `bpeenc` command with the vocabulary size from the base checkpoint. Each corpus must supply at least one context window plus the next token. The held-out file must cover the requested number of windows.
+
+```sh
+./wtrain cpu ./ollm base.ck merges.bin training.om held-out.om run-01 100 250 3
+spark-window run ./wtrain gb10 ./ollm-gb10 base.ck merges.bin training.om held-out.om run-02 100 250 3
+```
+
+The GPU invocation runs inside an authorized exclusive Spark window. The harness creates a private directory, writes the token streams and `candidate.ck` there, and records native tokenizer, optimizer and evaluator output in `run.log`. An existing output directory is refused. A failed run retains its partial files. A successful run ends with `TRAINING_COMPLETE` after the final evaluation. The E lines report held-out language-model loss. Coding accuracy requires separate execution tests.
+
 ## Units
 
 Built by `seed/out/omc` and gated by `train/units-gate.om` (`OMEGA-TRAIN-UNITS`), rows in `train/units.tsv`, composed as upstream `tests/omegallm/build.sh` does (`math data <pool> model adam ckpt bpe spec cli <plat> <post>`); `build.sh` has no Darwin target, so the `ollm_darwin` row follows upstream `tests/omegallm/ollm_metrics_bench.py` (`darwin-arm64`):
diff --git a/train/omega-llm/tools/wdrive/wtrain.om b/train/omega-llm/tools/wdrive/wtrain.om
new file mode 100644
index 0000000000000000000000000000000000000000..68233ed07d6f59806dc11c89523fa23d6b3e3898
--- /dev/null
+++ b/train/omega-llm/tools/wdrive/wtrain.om
@@ -0,0 +1,206 @@
+note SPDX-License-Identifier: AGPL-3.0-only
+note Compose after wbuild.om with its main renamed to wbmain.
+text ftusage "usage: wtrain cpu|gb10 OLLM BASE MERGES TRAIN_TEXT HELD_TEXT NEW_DIR STEPS LRMICRO WINDOWS\n"
+text ftgpu "gb10"
+text ftcpu "cpu"
+text ftlock "AIEN_GB10_LOCK_HELD"
+text ftwindow "SPARK_WINDOW"
+text ftneed "gb10 training requires an exclusive spark-window run\n"
+text ftoutfail "cannot create fresh run directory\n"
+text ftbad "invalid checkpoint or numeric argument\n"
+text fttrain "/train.tok"
+text ftheld "/held.tok"
+text ftck "/candidate.ck"
+text ftlog "/run.log"
+text ftencode "bpeenc"
+text fttune "tune"
+text fttr "train"
+text ftgtr "gtrainf"
+text ftev "eval"
+text ftgev "geval"
+text ftbase "baseline\n"
+text ftafter "candidate\n"
+text ftcomplete "TRAINING_COMPLETE\n"
+
+fn ftfail msg view uchar * code int to void
+wdwrall 2 msg len msg
+exit code
+end
+fn ftmatch i ulong word view uchar * to bool
+n = wdarg i
+if ne n len word
+ret false
+end
+for j ulong n
+if ne get wdab j get word j
+ret false
+end
+end
+ret true
+end
+fn ftpositive i ulong to void
+n = wdarg i
+v = ulong 0
+for j ulong n
+c = ulong get wdab j
+if or lt c 48 gt c 57
+ftfail ftbad 2
+end
+d = sub c 48
+if gt v div sub 18446744073709551615 d 10
+ftfail ftbad 2
+end
+v = add mul v 10 d
+end
+if eq v 0
+ftfail ftbad 2
+end
+end
+fn ftpath suffix view uchar * to void
+wdpclr
+wdpa 7
+wdpt suffix
+end
+fn ftpush suffix view uchar * to void
+ftpath suffix
+wdkp
+end
+fn ftstart cmd view uchar * to void
+wdkclr
+wdka 2
+wdkt cmd
+end
+fn ftrun fd int to void
+rc = wdwait wdspawn -1 fd fd
+if ne rc 0
+exit int rc
+end
+end
+fn ftvocab to ulong
+wdpclr
+wdpa 3
+fd = wdopen 0 0
+if lt fd 0
+ftfail ftbad 3
+end
+h = new uchar 16 0
+n = read fd h 0 16
+z = fclose fd
+if ne n 16
+ftfail ftbad 3
+end
+v = ulong 0
+for i ulong 8
+v = or v shl ulong get h add 8 i mul 8 i
+end
+ret v
+end
+fn ftdata src ulong suffix view uchar * vocab ulong logfd int to void
+if eq vocab 256
+wdpclr
+wdpa src
+fi = wdopen 0 0
+ftpath suffix
+fo = wdopen 193 384
+if or lt fi 0 lt fo 0
+exit 70
+end
+wdcopyfd fi fo
+c1 = fclose fi
+c2 = fclose fo
+if or ne c1 0 ne c2 0
+exit 70
+end
+else
+ftstart ftencode
+wdka 4
+wdpclr
+wdpd vocab
+wdkp
+wdka src
+ftpush suffix
+ftrun logfd
+end
+end
+fn ftmeasure gpu bool trained bool vocab ulong fd int to void
+if gpu
+ftstart ftgev
+else
+ftstart ftev
+end
+if trained
+wdwrall fd ftafter len ftafter
+ftpush ftck
+else
+wdwrall fd ftbase len ftbase
+wdka 3
+end
+ftpush ftheld
+wdka 10
+if gt vocab 256
+wdka 4
+end
+ftrun fd
+end
+fn main to int
+if ne argcnt 11
+ftfail ftusage 2
+end
+gpu = ftmatch 1 ftgpu
+if and not gpu not ftmatch 1 ftcpu
+ftfail ftusage 2
+end
+if gpu
+if not wdenv ftlock
+ftfail ftneed 3
+end
+if or ne get wdvn 0 1 ne get wdv 0 49
+ftfail ftneed 3
+end
+if not wdenv ftwindow
+ftfail ftneed 3
+end
+end
+ftpositive 8
+ftpositive 9
+ftpositive 10
+v = ftvocab
+wdpclr
+wdpa 7
+r = makedir wdp 0 get wdpn 0 448
+if ne r 0
+ftfail ftoutfail 3
+end
+ftpath ftlog
+fd = wdopen 193 384
+if lt fd 0
+exit 70
+end
+ftdata 5 fttrain v fd
+ftdata 6 ftheld v fd
+ftmeasure gpu false v fd
+ftstart fttune
+wdka 3
+ftpush ftck
+wdka 8
+wdka 9
+ftrun fd
+if gpu
+ftstart ftgtr
+else
+ftstart fttr
+end
+ftpush ftck
+ftpush fttrain
+wdka 8
+wdka 8
+ftrun fd
+ftmeasure gpu true v fd
+wdwrall fd ftcomplete len ftcomplete
+z = fclose fd
+if ne z 0
+exit 70
+end
+wdwrall 1 ftcomplete len ftcomplete
+ret 0
+end