aien-train
Pre-alpha. Training my own language model on AIEN's own engine (Omega, no CUDA, no third-party training framework), starting on one DGX Spark (GB10).
The thesis under test: the big labs got where they are by pushing mass data and mass compute through a stack they built as they went. Their pitfalls are known now. If I go back through that history first, write the lessons down, and design the training run around the physics of the chip (keep the work on the math cores, stop streaming weights through slow memory every step), a small machine can train a real model the right way the first time.
Every claim in docs/ links to a source or to a receipt in evidence/. Numbers carry the chip they were measured on.
How it works
Problem. Train a language model with no CUDA and no third-party training framework. Every forward pass, gradient, optimizer step, tokenizer and checkpoint is first-party Omega (.om) source, compiled by the seeded Omega compiler omc from omega-mv.
Mechanism. Omega LLM is a decoder-only transformer in native/omegallm/.
- Build.
tests/omegallm/build.shconcatenatesmath.om data.om, a pool unit,model.om adam.om ckpt.om bpe.om cli.omand a platform unit into one program,ollm. - Train.
ollm trainreads u16 tokens and runs the forward pass, cross-entropy loss, backward pass and Adam step. It writes a checkpoint everyEVERYsteps. - Evaluate.
ollm evalreports held-out nats per token. - On the GB10.
gtrainfandgtrainbkeep the weights and Adam state on the chip (rung 4 onward). - Specs. CONTRACT.md, V1, V2, V3, BF16.
The earlier NL1 experiment, a learned numerical channel between two small networks, uses the same toolchain on a much smaller scale.
Design choices, and why.
- An outside referee for the math. The built-in
gcheckandadamckare smoke checks of the binary against itself. The gate for the gradient and the Adam step is a separate Python-stdlib referee:tests/omegallm/ORACLE.mdandevidence/OMEGALLM/oracle/. Deliberately broken builds (mutants) must fail it. - Exact checkpoints that refuse damage. Steps 0→40 in one run and 0→20→40 in two runs give byte-identical checkpoints. A truncated, flipped or overlong file exits 10–15 instead of loading (status table).
- The chip is checked against the CPU. In rung 10, the f64 CPU
evalprinted exactly the GB10 lineE 60000 2243 1204466 449322(evidence/OMEGALLM/gpu-r10/README.md). - BF16 training, f32 evaluation. This was Drake's decision, recorded in CONTRACT-BF16 §7.
Worked budget. All arithmetic is WolframLanguageEvaluator, and each figure is checked against a file. A checkpoint holds the parameters plus Adam's two moments, all f64, so it costs 3 × 8 = 24 bytes per parameter plus a header:
- v0, 119,104 parameters, MEASURED.
112+24*119104 -> 2858608B. This is the size of the fileollm initwrites (reproduced below). - v2, 15,833,472 parameters, MEASURED.
120+24*15833472 -> 380003448B, about 362.4 MiB.evidence/OMEGALLM/gpu-r7/cpu/ock-boundary.txtloads exactly that file. - Training time, rung 10 on the GB10, MEASURED. The summed
gtrainbwall time from step 250 to 60000 is 11,478.56 s.11478.56/(60000-250) -> 0.19211s per step, about 3.19 h in total. - Not counted: activations, scratch buffers and the CPU side.
- What fits on the chip's own storage, MODELED. The GB10 physics note estimates that a fully on-chip model has about 1–4 million parameters (
docs/physics/gb10-training.md).
Limitations and failed approaches.
- NL1 missed its main target. The learned channel reconstructed 14 of 16 inputs for every seed, not 16 of 16. The README records this as a FAIL of the target under the frozen schedule; it was not tuned away.
- A gradient check had to be replaced. At rung 5, the chip gradient check
gcmpfailed because of ReLU branch flips (evidence/OMEGALLM/gpu-max/gc-max.txt, rc 45) and was replaced bygcmp2. - The model is small. The best model is the v2 shape: 15,833,472 parameters, trained on TinyStories, held-out loss 1.204466 nats per token. It is not a chat model.
- The lessons summary is not written. The history studies are in
docs/history/; the distilleddocs/LESSONS.mdplanned in PLAN.md does not exist yet.
Reproduce on a CPU (offline, no model download, no GPU)
Requirements: AArch64 Linux, POSIX sh, git, sha256sum and cmp. The compiler is born from omega-mv's seed with no C toolchain.
git clone https://github.com/aien-dev/omega-mv && cd omega-mv
git checkout 1fe5976d398646b17acabbf6d9dfae96b017e439
sh seed/omega-from-seed.sh # ends RC=0
sha256sum seed/out/omc # d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84
OMC=$PWD/seed/out/omc; cd ..
git clone https://github.com/aien-dev/aien-train && cd aien-train/native/neuralese
cat hadamard.om io.om check.om > /tmp/nl1-fixed.om && "$OMC" < /tmp/nl1-fixed.om > /tmp/nl1-fixed && chmod +x /tmp/nl1-fixed
/tmp/nl1-fixed > /tmp/nl1-fixed.out; echo rc=$? # rc=0, last line NL1FIX PASS
cmp /tmp/nl1-fixed.out evidence/fixed.stdout && echo SAME # SAME
cat hadamard.om io.om affine.om learn.om > /tmp/nl1-learn.om && "$OMC" < /tmp/nl1-learn.om > /tmp/nl1-learn && chmod +x /tmp/nl1-learn
sha256sum /tmp/nl1-learn # ea8aeebe161bd3319a319de2d7cb836c3014a5d1ae887348ee3e5db768ef50bd
/tmp/nl1-learn > /tmp/nl1-learn.out; tail -1 /tmp/nl1-learn.out # NL1LEARN END, 15175 lines
- Positive case.
- The fixed-channel check reproduces
evidence/fixed.stdoutbyte for byte. - The learning binary has the recorded sha256.
- Its stream matches
evidence/learned-final.stdoutin every field except the measured host timings:Trows and theencoder_ns/decoder_nscolumns ofRrows (experiment.jsonresult_schema).
- The fixed-channel check reproduces
- Refusal case. Swap
affine.omfor a mutant inmutants/and build withgradientcheck.om(cat hadamard.om io.om mutants/gradient-sign.om gradientcheck.om). It compiles, then exits 61;update-sign.omexits 63. The recorded exits are inevidence/mutants.json.
The same CPU-only pattern works for Omega LLM itself, with omega-mv e5b32567's omc (sha256 2c824805…; see Build):
sh tests/omegallm/build.sh, thenollm adamckprintsA 5 3cd046ce38e38e38 0.- The mutant build
--mutant cexits 41. ollm init v0.ck 256 64 64 4 256 2 16 52 20000 3000printsI 119104and writes 2,858,608 bytes.- That file cut to 100,000 bytes makes
ollm evalexit 10.
Training at scale and the chip commands need TinyStories data and an authorized GB10 window. They are outside this recipe.
Layout:
native/first-party.omsource per experiment (omegallm,neuralese,si19,omegese45, …)tests/build and check scripts for those experimentsdocs/contracts and write-ups (docs/omegallm/,docs/si19/, …);docs/PLAN.mdstreams, directories, branchesevidence/receipts for every measurement- founding studies (written 2026-10-20, merged 2026-11-14), each with its working directory in
streams/and receipts inevidence/:docs/history/what OpenAI, NVIDIA and the other labs did (openai.md,nvidia.md,others.md) and the literature on training with little compute (efficiency.md). Published sources and arithmetic only; nothing in them was measured on our hardware.docs/physics/gb10-training.mdwhat fits inside the GB10 and how long compute-optimal training takes on one Spark, from ceilings measured with our own kernelsdocs/numerics/OWN_FP4.mdour own 4-bit training numerics; the small-model race in it was simulated in PyTorch and is labelled oracledocs/math/training by mathematics instead of mass compute (Drake's structure-constants idea, source indocs/ideas/), each experiment with a measured verdictstreams/data/the corpus fetch script, extractor and theaienbpebyte-level BPE tool (Rust)
docs/LESSONS.mdis planned in PLAN.md and not written
Human-Directed Agentic Engineering
Development follows Human-Directed Agentic Engineering (HDAE): humans define goals, architecture, constraints, acceptance criteria, and stopping points; agents implement, execute checks, diagnose failures, and revise within those boundaries. Human review retains responsibility for claims, acceptance, and release decisions.
For the documented method and a systems-software case study, see Gregory M. Kurtzer, Ginux: Building an Independent Kernel That Runs Linux Userspace through Human-Directed Agentic Engineering (2026). This is a development-method citation, not evidence that a training run or earlier experiment has passed.
Verified examples (DRA-122)
tools/verified_examples re-runs the scoreboard referee before admitting programs, emits deterministic JSONL provenance and exports continuation text accepted by the existing trainer prep command. Instruction-format training remains DRA-123. No training or GPU execution is part of this tool.