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

branch main Branches Tags History

omega-mv / train / omega-llm / docs / OM-BUNDLES.md

225 lines · 16776 bytes Raw Blame History Source

.om Specialist Chains, DNA-Style Chain Clipping & Local omc Feedback Loop

Architecture, measured corpus inventory, chain-organized dataset/refusal-pair builder, and local compile-retry loop for turning Omega LLM (ollm) + OLLMSP01 swappable specialist packs (SPECIALISTS.md) into composable DNA-style Specialist Chains for native .om coding.

1. Three-Bottleneck Architecture

Bottleneck vs PythonNative Omega TargetMechanism
1. Large active weights / slow decodeSmaller active weights and higher decode throughput on GB10Freeze base layers (0..base_L-1) and attach thin OLLMSP01 specialist links (14.1 MB per 1 added layer / 28.3 MB per 2 added layers on v2 D=384, F=1536) instead of serving one monolithic general model. Grow vertical Merkle chains and clip sibling strands together on a shared trunk.
2. Out-of-distribution .om overheadZero writing-omega prompt warmup; target 0–1 compile retries instead of 2–4Train chain links directly on deduplicated first-party .om code plus live omc refusal-repair pairs spanning all 30 compiler error codes (1..30), using completion-only masking (fcachem) so loss is computed only on .om completions.
3. Slow edit-check-fix loopMillisecond local omc feedback loopGenerate candidate .om via ollm spsamp / spchainsamp / spclip -> compile via stdin with local omc in single-digit milliseconds -> on refusal (rc != 0), inject exact omc: line N: error K stderr back into the retry prompt. Never execute refused output.

2. DNA-Style Specialist Chains & Chain Clipping

Rather than stopping at flat single-layer bundles, .om specialists are organized as Vertical Merkle Chains (Strands) that clip together with sibling strands via Hybridization (spclip) and Residual Ligation (spstack + optional ligase bridge).

A. Vertical Merkle Chains (Strands)

                    base.ck (L0..7, frozen)
                              │  base_hash_0
                              ▼
                    om-core.sp (L8..9)            [Link 1: core .om + 30-error omc refusals]
                              │  base_hash_1
                              ▼
                 aienux-kernel.sp (L10..11)       [Link 2: Aienux OS / EFI / MMU / drivers]
                        ╱            ╲  base_hash_2 (shared trunk)
                       ▼              ▼
          gb20b-mmio.sp (L12..13)   libos-rpc.sp (L12..13)
          [Strand A: GB20B/GSP/     [Strand B: LibosLog / RPC /
           SEC2/MMIO/CUDApp]         HTTP / JSON / wire IPC]

B. DNA-Style Chain Clipping (Multi-Strand Hybridization & Ligation)

  1. Shared-Trunk Multi-Helix Clipping (spclip, S = 2..4 strands — double, triple, or quad helix):
    • Two to four strands sharing a frozen trunk hash (e.g., Double Helix clipping gb20b-mmio ⊕ libos-rpc over base -> om-core -> aienux-kernel, or Triple Helix clipping aienux-kernel ⊕ gb20b-mmio ⊕ libos-rpc over base -> om-core) evaluate the longest common shared prefix across all S strands once per token (H_trunk), then evaluate each strand's divergent tail layers over H_trunk:
      • MODE=0 (Prior-Weighted Product-of-Experts): normalized weights alpha_s = w_s / sum(w), fused sum_s alpha_s * log P_s.
      • MODE=1 (Entropy-Gated Multi-Helix): computes per-token Shannon entropy H_s = -sum P_s log P_s for each strand, sets u_s = w_s / (H_s + 0.001) and alpha_s = u_s / sum(u), and fuses sum_s alpha_s * log P_s so whichever specialized strand is most certain on the current token (e.g., aienux-kernel on page-table flags, gb20b-mmio on MMIO register offsets, or libos-rpc on RPC framing) naturally dominates.
  2. Residual Ligation / Sticky-End Ligase:
    • Clips Strand B sequentially after Strand A via ollm spstack (L_out <= 16, with per-pack (Wo, W2) residual scaling), optionally followed by a 1-layer fcachem-trained ligase bridge pack (L_out -> L_out + 1) trained on cross-domain examples (e.g., GSP RPC over GB20B MMIO queues) to align the ligated representation while keeping both strands bit-identically frozen.

3. Verification Status (EXERCISED vs NOT_RUN)

CapabilityStatusPlatform / Evidence
Local .om corpus audit & SHA-256 deduplicationEXERCISEDApple Silicon M2 (Darwin arm64 CPU), tools/om_bundle_data.py audit
Live omc refusal-repair pair generation (all 30 error codes 1..30)EXERCISEDApple Silicon M2 (Darwin arm64 CPU), local omc (sha256: 68a590c3…feb9c), 38/38 pairs compiled & verified
Chain-organized zero-leakage splits + ollm bpeenc + ollm fcachem verificationEXERCISEDApple Silicon M2 (Darwin arm64 CPU), all 4 chain links verified leakage_hashes=0 and FCACHE 2 256 384 8
Local omc compile latency benchmark (20 runs per unit)EXERCISEDApple Silicon M2 (Darwin arm64 CPU), tools/om_compile_loop.py bench --runs 20
Local single-pack ollm spsamp + omc compile-retry harnessEXERCISEDApple Silicon M2 (Darwin arm64 CPU), tools/om_compile_loop.py selftest (deterministic refusal->repair + live omega-code_pro.sp loop)
Full M2 CPU multi-link chain training (om-core -> aienux-kernel -> gb20b-mmio / libos-rpc)NOT_RUNExact chain recipes specified below; only dataset splits + fcachem compatibility exercised here
Pure-Omega spchainapp / spchaineval / spchainsamp / spclip (S=2..4) execution on trained .om chainsNOT_RUNEngine verbs implemented in parallel branch feat/ollm-chain-clip; .om chain weights not yet trained
Sticky-end ligase bridge pack training (L -> L+1)NOT_RUNArchitectural recipe documented below
On-chip GB10 frozen-core specialist training & GB10 decode throughputNOT_RUNFrozen-core GPU training is not yet implemented in native/omegallm/gpu/gg.om (CPU-only via trainf/trainfc); full-chip gtrainf/gtrainb mutates base layers and requires an authorized spark-window
Aienux / GB20B live inference & hardware-in-the-loop codingNOT_RUNRequires authorized hardware window; no GPU or Aienux runtime touched

4. Measured Local .om Corpus Inventory

Measured on Apple Silicon M2 CPU via python3 tools/om_bundle_data.py audit:

Audit Breakdown by Domain Category (SHA-256 Deduplicated)

CategoryUnique FilesUnique LOCClean Positive FilesClean Positive LOCChain Link
om-core4,0231,173,2263,9441,172,390Link 1: om-core.sp (L8..9)
ollm (CPU/native trainer)15680,74415680,744Link 1: om-core.sp (L8..9)
aienux-kernel (Aienux/EFI/MMU/drivers)249102,658243102,081Link 2: aienux-kernel.sp (L10..11)
gb20b-mmio (Blackwell/GPU/CUDApp/GSP/SEC2/MMIO)907276,096907276,096Link 3A: gb20b-mmio.sp (L12..13)
libos-rpc (LibosLog/RPC/HTTP/JSON/wire/net)20794,69520794,695Link 3B: libos-rpc.sp (L12..13)
Total5,5421,727,4195,4571,726,006—

Chain-Organized Dataset Splits & fcachem Compatibility Check (Apple Silicon M2 CPU)

tools/om_bundle_data.py build --max-examples 400 --verify-fcachem --include-err24 verified deterministic SHA-256 hash splitting (int(sha256[:8], 16) % 10 == 0 -> held-out), zero hash overlap, BPE encoding via ollm bpeenc + merges4096.bin, chain topology metadata in manifest.json, and live OLLMFH01 cache creation:

Chain LinkParent PrefixLayersStrandTrain FilesHeld FilesLeakageTrain Wins (T=256)Held Wins (T=256)ollm fcachem Check
om-corebase (L0..7)8->10trunk3,656395021834FCACHE 2 256 384 8
aienux-kernelom-core (L0..9)10->12trunk20229019438FCACHE 2 256 384 8
gb20b-mmioaienux-kernel (L0..11)12->14branch-a77593019740FCACHE 2 256 384 8
libos-rpcaienux-kernel (L0..11)12->14branch-b18126020045FCACHE 2 256 384 8

5. Measured Local omc Compile Latency (Apple Silicon M2 CPU)

Measured via python3 tools/om_compile_loop.py bench --runs 20 against local Darwin ARM64 omc (sha256: 68a590c37dfb1ec37a183f0032e02db1570db299266f574f65556edfc70feb9c):

UnitLOCRunsMin (ms)Median (ms)P95 (ms)Max (ms)Output Binary (bytes)
small_6loc6204.4775.3596.7646.764248
hello.om9204.0694.9146.9926.992396
om2_tour.om43204.0774.8756.8106.810716
medium_67loc67204.2585.98980.56480.564960
large_564loc565205.5417.26711.66111.6616,020
ollm-darwin.om (full OLLM)6,4232032.11636.044126.225126.225214,816

Typical single-function and module-sized .om edits (6–565 LOC) compile in 4.9–7.3 ms median on M2 CPU, and the entire 6,423-LOC ollm binary compiles in 36.0 ms median.

Local Compile-Retry Harness Self-Test (Apple Silicon M2 CPU)

python3 tools/om_compile_loop.py selftest exercised both:

  1. Deterministic refusal -> repair: x = 5 refused by omc (rc=11, omc: line 2: error 11) in 5.947 ms; repaired x = int 5 compiled cleanly (rc=0, 212 bytes) in 4.831 ms.
  2. Live ollm spsamp + omc retry loop (omega-code_pro.sp on omega-v2.ck): 3 attempts (3.95–5.57 s CPU spsamp + 5.80–6.86 ms omc check per attempt), capturing real omc refusals (error 16 -> error 4) and feeding them back into each retry prompt.

6. Exact Commands

A. Audit Corpus, Verify 30-Error Refusals, and Build Chain-Organized Datasets

# 1. Audit local .om corpus (total + SHA-256 deduplicated)
python3 tools/om_bundle_data.py audit --workspace "$HOME/workspace"

# 2. Generate and live-verify all 30 omc refusal-repair pairs (errors 1..30)
python3 tools/om_bundle_data.py refusals \
  --omc "$HOME/.local/bin/omc" \
  --include-err24 \
  --out "$OUT/refusals.jsonl"

# 3. Build deterministic, zero-leakage .tok + .msk chain splits and verify fcachem
python3 tools/om_bundle_data.py build \
  --workspace "$HOME/workspace" \
  --omc "$HOME/.local/bin/omc" \
  --ollm "$HOME/.local/bin/ollm" \
  --merges "$HOME/workspace/aien-train-macbook/local-mac/merges4096.bin" \
  --base-ck "$HOME/workspace/aien-train-macbook/local-mac/omega-v2.ck" \
  --out-dir "$OUT/bundles" \
  --verify-fcachem \
  --include-err24

B. Train Vertical Merkle Chains on M2 CPU (growpro + fcachem + trainfc + spext)

Each link pins the frozen prefix beneath it via OLLMSP01 base_hash:

OLLM="$HOME/.local/bin/ollm"
BASE_CK="$HOME/workspace/aien-train-macbook/local-mac/omega-v2.ck"
MERGES="$HOME/workspace/aien-train-macbook/local-mac/merges4096.bin"
DATA="$OUT/bundles"

# --- Link 1: base (L0..7) -> om-core.sp (L8..9) ---
"$OLLM" fcachem "$BASE_CK" "$DATA/om-core_aligned.tok" "$DATA/om-core_aligned.msk" 160 "$OUT/om-core.hc"
"$OLLM" growpro "$BASE_CK" "$OUT/prefix_l10.ck" 10 400 3500
"$OLLM" trainfc "$OUT/prefix_l10.ck" "$OUT/om-core.hc" 400 50 8 1
"$OLLM" spext   "$BASE_CK" "$OUT/prefix_l10.ck" "$OUT/om-core.sp"

# --- Link 2: prefix_l10 (L0..9) -> aienux-kernel.sp (L10..11) ---
"$OLLM" fcachem "$OUT/prefix_l10.ck" "$DATA/aienux-kernel_aligned.tok" "$DATA/aienux-kernel_aligned.msk" 160 "$OUT/aienux-kernel.hc"
"$OLLM" growpro "$OUT/prefix_l10.ck" "$OUT/prefix_l12.ck" 12 400 3500
"$OLLM" trainfc "$OUT/prefix_l12.ck" "$OUT/aienux-kernel.hc" 400 50 10 1
"$OLLM" spext   "$OUT/prefix_l10.ck" "$OUT/prefix_l12.ck" "$OUT/aienux-kernel.sp"

# --- Link 3A (Strand A): prefix_l12 (L0..11) -> gb20b-mmio.sp (L12..13) ---
"$OLLM" fcachem "$OUT/prefix_l12.ck" "$DATA/gb20b-mmio_aligned.tok" "$DATA/gb20b-mmio_aligned.msk" 160 "$OUT/gb20b-mmio.hc"
"$OLLM" growpro "$OUT/prefix_l12.ck" "$OUT/gb20b_l14.ck" 14 400 3500
"$OLLM" trainfc "$OUT/gb20b_l14.ck" "$OUT/gb20b-mmio.hc" 400 50 12 1
"$OLLM" spext   "$OUT/prefix_l12.ck" "$OUT/gb20b_l14.ck" "$OUT/gb20b-mmio.sp"

# --- Link 3B (Strand B, sibling): prefix_l12 (L0..11) -> libos-rpc.sp (L12..13) ---
"$OLLM" fcachem "$OUT/prefix_l12.ck" "$DATA/libos-rpc_aligned.tok" "$DATA/libos-rpc_aligned.msk" 160 "$OUT/libos-rpc.hc"
"$OLLM" growpro "$OUT/prefix_l12.ck" "$OUT/libos_l14.ck" 14 400 3500
"$OLLM" trainfc "$OUT/libos_l14.ck" "$OUT/libos-rpc.hc" 400 50 12 1
"$OLLM" spext   "$OUT/prefix_l12.ck" "$OUT/libos_l14.ck" "$OUT/libos-rpc.sp"

C. Compose & Clip Chains (spchain*, spclip S=2..4, and Sticky-End Ligation — NOT_RUN on .om chains yet)

# Single-strand in-memory chain eval & sample (3 links: L0..7 -> L8..9 -> L10..11 -> L12..13)
"$OLLM" spchaineval "$BASE_CK" "$DATA/gb20b-mmio_held.tok" 20 "$MERGES" \
  3 "$OUT/om-core.sp" "$OUT/aienux-kernel.sp" "$OUT/gb20b-mmio.sp"

"$OLLM" spchainsamp "$BASE_CK" 64 200 "fn gsp_submit " 42 "$MERGES" \
  3 "$OUT/om-core.sp" "$OUT/aienux-kernel.sp" "$OUT/gb20b-mmio.sp"

# Double-Helix DNA clip (S=2, MODE=1 entropy-gated):
# Shared trunk (base -> om-core -> aienux-kernel) runs ONCE; gb20b-mmio + libos-rpc fuse in parallel:
"$OLLM" spclip "$BASE_CK" 1 "fn gsp_rpc_send " 64 200 42 "$MERGES" 2 \
  500 3 "$OUT/om-core.sp" "$OUT/aienux-kernel.sp" "$OUT/gb20b-mmio.sp" \
  500 3 "$OUT/om-core.sp" "$OUT/aienux-kernel.sp" "$OUT/libos-rpc.sp"

# Triple-Helix DNA clip (S=3, MODE=1 entropy-gated):
# Shared trunk (base -> om-core) runs ONCE; aienux-kernel + gb20b-mmio + libos-rpc fuse in parallel:
"$OLLM" spclip "$BASE_CK" 1 "fn aienux_gsp_rpc " 64 200 42 "$MERGES" 3 \
  334 2 "$OUT/om-core.sp" "$OUT/aienux-kernel.sp" \
  333 3 "$OUT/om-core.sp" "$OUT/aienux-kernel.sp" "$OUT/gb20b-mmio.sp" \
  333 3 "$OUT/om-core.sp" "$OUT/aienux-kernel.sp" "$OUT/libos-rpc.sp"

# Residual ligation + optional 1-layer sticky-end ligase bridge (L14 -> L15):
"$OLLM" spchainapp "$BASE_CK" "$OUT/prefix_l12.ck" 2 "$OUT/om-core.sp" "$OUT/aienux-kernel.sp"
"$OLLM" spstack "$OUT/prefix_l12.ck" "$OUT/gb20b-mmio.sp" "$OUT/libos-rpc.sp" 1000 1000 "$OUT/ligated_l16.sp"

D. Run the Local ollm spsamp + omc Feedback Loop on M2 CPU

# 20-run omc latency benchmark
python3 tools/om_compile_loop.py bench --runs 20

# End-to-end self-test (deterministic refusal->repair + live spsamp->omc retry)
python3 tools/om_compile_loop.py selftest

# Single-prompt compile-retry loop with any trained pack
python3 tools/om_compile_loop.py loop \
  --pack "$OUT/om-core.sp" \
  --prompt "note return sum of two ulong values\nfn add2 a ulong b ulong to ulong\n" \
  --max-retries 3 \
  --tokens 64 \
  --temp-milli 200

E. GB10 GPU Path (NOT_RUN — Frozen-Core GPU Training Not Yet Implemented)

Do not execute any GPU command without an explicitly authorized DGX Spark spark-window.