Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/seed/helix/ollm_factory/ollm_train_jit.om # 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 Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / helix / ollm_factory / ollm_train_jit.om` 138 lines ยท 3280 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 2 note seed/helix/ollm_factory/ollm_train_jit.om: 3 note In-Process Proof-Carrying SM121 Evolutionary Training JIT bridge for Omega LLM (`ollm-helix-gb10`). 4 note Composed AFTER `bw_hazard_clean.om`, `helix_jit_core.om`, `gk.om`, and `gr.om` without modifying 5 note any file in `train/omega-llm/native/`. 6 note 7 note Intercepts ALL 46+ emitted SM121 training kernels in `gkcode` (F32 GEMMs, BF16 GEMMs, 8 note RMSNorm fwd/bwd, Softmax fwd/bwd, Cross-Entropy, and Adam) right before `gkopen` uploads 9 note `gkcode` to GB10 VRAM via `mapwrite`: 10 note - Reads active genome from `/tmp/helix_genome.cfg` (0=Monk, 1=Predator, 2=Mitosis Hybrid, 11 note 3=Mitosis 2-Pass, 5=Trickster Chaos, 6=Ascetic Overnight-Soak Energy) 12 note - Runs 3/3 in-process Strand A Monk mutant self-test on first kernel 13 note - Mechanically proves EVERY evolved training kernel via Strand A Monk (CFG dataflow + 14 note Antibodies #13 basic-block leaders, #14 rawFloor>=6, #15 I2F fixed-latency floor) 15 note BEFORE writing back to `gkcode` and uploading to GB10 VRAM! 16 17 global otjLen ulong 64 18 19 text otjTagA "OLLM_HELIX_JIT_SUMMARY genome=" 20 text otjTagB " slots=" 21 text otjTagC " proved=" 22 text otjTagD " rejected=" 23 text otjTagE " skipped=" 24 text otjTagF " swaps=" 25 text otjTagG " stalls_ref=" 26 text otjTagH " stalls_evolved=" 27 text otjTagI " yields_tuned=" 28 text otjTagJ " mutants_killed=3/3\n" 29 30 fn otjRecSlot id uint to void 31 if ge id 64 32 ret 33 end 34 base = mul ulong id 16384 35 cur = get gkat 0 36 if gt cur base 37 put otjLen ulong id sub cur base 38 else 39 put otjLen ulong id 0 40 end 41 end 42 43 fn otjRdU32 off ulong to ulong 44 b0 = ulong get gkcode off 45 b1 = ulong get gkcode add off 1 46 b2 = ulong get gkcode add off 2 47 b3 = ulong get gkcode add off 3 48 ret or or b0 shl b1 8 or shl b2 16 shl b3 24 49 end 50 51 fn otjWrU32 off ulong v ulong to void 52 put gkcode off uchar and v 255 53 put gkcode add off 1 uchar and shr v 8 255 54 put gkcode add off 2 uchar and shr v 16 255 55 put gkcode add off 3 uchar and shr v 24 255 56 end 57 58 fn otjWrtErr s view uchar * to void 59 r = write 2 s 0 len s 60 end 61 62 fn otjNumErr v ulong to void 63 b = new uchar 24 0 64 p = ulong 24 65 x = v 66 while true bound 24 67 p = sub p 1 68 put b p uchar add 48 rem x 10 69 x = div x 10 70 if eq x 0 71 break 72 end 73 end 74 r = write 2 b p sub 24 p 75 end 76 77 fn otjPrintSummary to void 78 otjWrtErr otjTagA 79 otjNumErr get hxGenome 0 80 otjWrtErr otjTagB 81 otjNumErr get hxStats 0 82 otjWrtErr otjTagC 83 otjNumErr get hxStats 1 84 otjWrtErr otjTagD 85 otjNumErr get hxStats 2 86 otjWrtErr otjTagE 87 otjNumErr get hxStats 3 88 otjWrtErr otjTagF 89 otjNumErr get hxStats 6 90 otjWrtErr otjTagG 91 otjNumErr get hxStats 4 92 otjWrtErr otjTagH 93 otjNumErr get hxStats 5 94 otjWrtErr otjTagI 95 otjNumErr get hxStats 7 96 otjWrtErr otjTagJ 97 end 98 99 fn otjEvolveOne id ulong to void 100 nb = get otjLen id 101 if eq nb 0 102 ret 103 end 104 if ne rem nb 16 0 105 put hxStats 3 add get hxStats 3 1 106 ret 107 end 108 cnt = div nb 16 109 if or eq cnt 0 gt cnt 2048 110 put hxStats 3 add get hxStats 3 1 111 ret 112 end 113 put hxStats 0 add get hxStats 0 1 114 base = mul id 16384 115 nw = mul cnt 4 116 for i ulong nw bound 8192 117 v = otjRdU32 add base mul i 4 118 put hxRef i v 119 put hxCand i v 120 end 121 if hxRunCore cnt 122 for i ulong nw bound 8192 123 otjWrU32 add base mul i 4 get hxCand i 124 end 125 end 126 end 127 128 fn otjEvolveAll to void 129 hxEnsureInit 130 if eq get hxGenome 0 0 131 otjPrintSummary 132 ret 133 end 134 for id ulong 64 135 otjEvolveOne id 136 end 137 otjPrintSummary 138 end