Omega LLM Frozen-Core Specialists & Swappable Packs (spec.om)
Pure seeded Omega extensions in native/omegallm/spec.om (with hooks in model.om, adam.om, and cli.om) that let ollm learn new specialist capabilities (such as tool calling) without overwriting or degrading the base model.
Commands
1. Frozen-Core Specialist Training (trainf, fcache, fcachem, trainfc, growpro)
ollm growpro INPUT.ck OUTPUT.ck LAYERS TOTAL LRMICRO
ollm trainf CK TOKS UNTIL EVERY FREEZE_LAYERS [BATCH]
ollm fcache BASE.ck TOKS W OUT.hc
ollm fcachem BASE.ck TOKS MASK W OUT.hc
ollm trainfc CK CACHE.hc UNTIL EVERY FREEZE_LAYERS [BATCH]
growpro(LLaMA-Pro block-expansion growth) clones the last base layer's trained(g1, Wq, Wk, Wv, g2, W1)into each added specialist layer while zeroing only(Wo, W2). Step-0 output remains bit-identical to the base checkpoint (GP OLD_L NEW_L P), while starting at the base layer's operating weight scale (~44×sharper initialQ*Klogits than randomoinitonomega-v2.ck).- Freezes embeddings (
W_e,W_p) and layers0 .. FREEZE_LAYERS - 1bit-identically:ofzlayinmodel.omskipsolaybfor layers< FREEZE_LAYERSand skipsobwde(cutting backward compute proportionally to frozen depth while preserving identical gradients for unfrozen layers).ofreezeinadam.omzeroes frozen gradients before global-norm clipping and skips Adam updates fori < ofreeze.
fcache/fcachem/trainfc(formatOLLMFH01) precomputes the frozen base's output hidden statesHF[0..T*D)+ targetsy[0..T)once forWwindows (bindingT, D, base_L, base_hashwith FNV-1a 64; mismatched base refusedrc=62) and trains unfrozen specialist layers (flay .. L-1) directly from the cache, skipping layers0..flay-1in both forward and backward (bit-identical totrainf, verified onL2→3andL2→4viacmp).fcachemapplies a 1-byte-per-token completion-only mask (y | 65536when masked), skippingoheadrandohbwdon prompt/padding tokens.- Optional
[BATCH](1..64) overrides batch size during host CPU training and restores the checkpoint's originalBandGbefore saving. - Prints
F STEP FREEZE_LAYERS LOSS_MICRONATS(trainf) orFC STEP FREEZE_LAYERS LOSS_MICRONATS(trainfc) at each save point.
2. Swappable Specialist Layer Packs (spext, spapp, spsamp, speval, format OLLMSP01)
ollm spext BASE.ck SPEC.ck PACK.sp
ollm spapp BASE.ck PACK.sp OUT.ck
ollm spsamp BASE.ck PACK.sp N TEMPMILLI PROMPT SEED [MERGES]
ollm speval BASE.ck PACK.sp HELD W [MERGES]
spexthashesBASE.ck's shapes (V,T,D,H,F,base_L) and all frozen base weightsow[0 .. lay0 + base_L * lstr)with FNV-1a 64, verifiesSPEC.ckhasL > base_Land a bit-identical frozen base, and writes only the added specialist layers + final norm gaingfintoPACK.sp(for 1 specialist layer on v2D=384, F=1536, ~14.1 MB vs 403 MB full checkpoint).spappverifiesPACK.spmagic, exact size, base FNV-1a 64 hash, and payload FNV-1a 64 hash, attaches the specialist weights ontoBASE.ck, and savesOUT.ck.spsamp/spevalverify and attachPACK.spontoBASE.ckdirectly in memory and run sampling or held-out evaluation with zero temporary checkpoint write.
OLLMSP01 Binary Layout (little-endian)
| Offset | Size | Field |
|---|---|---|
0 | 8 | Magic "OLLMSP01" (3544421225449933903) |
8 | 8 | base_L (frozen base layer count) |
16 | 8 | spec_L (total layer count, > base_L) |
24 | 8 | base_hash (FNV-1a 64 over V,T,D,H,F,base_L + ow[0 .. fz)) |
32 | 8 | n_spec_params (P_spec - fz) |
40 | 8 | pack_hash (FNV-1a 64 over payload bytes) |
48 | 8 * n_spec_params | Raw f64 LE specialist weights ow[fz .. P_spec) |
Refusal Exit Codes
60: malformed magic, truncated, or overlong.spfile61:.sppayload FNV-1a 64 mismatch (corrupted pack)62: base checkpoint mismatch (shape, layer count, or frozen base weights differ frombase_hash)
3. Pure-Omega Specialist Fusion & Ensembling (spmerge, spstack, spens)
ollm spmerge BASE.ck MODE OUT.sp W1 P1.sp W2 P2.sp [W3 P3.sp [W4 P4.sp]]
ollm spstack BASE.ck P1.sp P2.sp S1_MILLI S2_MILLI OUT.sp
ollm spens BASE.ck P1.sp P2.sp W1_MILLI PROMPT N TEMPMILLI SEED [MERGES]
spmergeverifies all input packs againstBASE.ck'sbase_hash(rc=62on mismatch) and merges 2–4 same-depth packs into a freshOLLMSP01pack (W_kin milli-units):MODE=0: Weighted Linear Soup ((1000, 0)reproducesP1bit-for-bit).MODE=1: Task-Arithmetic Sum over exactgrowinitW_0.MODE=2: TIES Trimmed Sign-Consensus (0.5×RMSdelta trim + sign election + agreeing weighted mean).
spstackvertically stacksP1's layers followed byP2's layers (L_out <= 16) with per-pack(Wo, W2)residual scaling (S_MILLI / 1000.0) and averaged final norm gaingf.spensruns frozen base layers0..base_L-1once per step and evaluatesP1andP2in parallel over the sharedH_base, fusingw1 * log_softmax(z1) + (1 - w1) * log_softmax(z2)(Product-of-Experts, works across different initialization basins such asgrow⊕growpro).
4. Multi-Link Merkle Specialist Chains & DNA-Style Multi-Helix Clipping (spchainapp, spchaineval, spchainsamp, spclip)
ollm spchainapp BASE.ck OUT.ck K P1.sp ... PK.sp
ollm spchaineval BASE.ck HELD W MERGES K P1.sp ... PK.sp
ollm spchainsamp BASE.ck N TEMPMILLI PROMPT SEED MERGES K P1.sp ... PK.sp
ollm spclip BASE.ck MODE PROMPT N TEMPMILLI SEED MERGES S W1 K1 A1..AK1 W2 K2 B1..BK2 [W3 K3 C1..CK3 [W4 K4 D1..DK4]]
- Multi-link Merkle chains (
spchainapp,spchaineval,spchainsamp) loadBASE.ckand sequentially verify and attachK(1..8, totalL <= 16)OLLMSP01packs in memory:- Link
iverifiesP_i.base_L == cur_L,P_i.base_hash == FNV1a64(shapes, ow[0..cur_fz)), exactn_spec_params, andP_i.pack_hash(rc=60/61/62on refusal), then updatesow[cur_fz .. new_P)andcur_L = P_i.spec_Lso Linki+1cryptographically pins the exact chain0..ibeneath it. - Pass
-forMERGESwhenV <= 256(loaded viaobloadwhenV > 256). spchainappprintsSPCHAPP BASE_L FINAL_L K Pand savesOUT.ck;spchainevalprintsE step W loss_micro bpb_micromatchingeval;spchainsampstreams decoded tokens directly from memory.
- Link
- DNA-style multi-helix chain clipping (
spclip,S = 2..4strands, e.g. double, triple, or quad helix):- Detects the longest common prefix of identical verified packs across all
Sstrands (verifying every strand's pack headers and payload FNV-1a 64 hashes) and runs the shared trunk layers0..trunk_L-1once per token into cachedH_trunk. - Evaluates each strand's remaining layers (
trunk_L .. L_s - 1, supporting asymmetric strand depths up toL <= 16) overH_trunk, computeslog_softmaxand Shannon entropyH_s = -sum P_s log P_s, and fuses allSstrands in log-probability space:MODE=0: Normalized prior Product-of-Experts (alpha_s = w_s / sum(w)).MODE=1: Entropy-gated multi-helix (u_s = w_s / (H_s + 0.001),alpha_s = u_s / sum(u), fusedsum_s alpha_s * log P_s) so whichever specialized strand is more confident on the current token dominates.
- Detects the longest common prefix of identical verified packs across all
5. Bank-B KV Cache (okvkv in model.om) & Inference-Time Experiments (ttteval, tttsamp, dolaeval)
okvkv(model.om) restores/saves only theoak/oauK/V slices inoabfor bank-B layers (l >= LAA) without clobberingoahin, enabling exact KV-cached decode forL = 8..16(verified 0 mismatched logits viaollm kvcmponL=8andL=10).ollm ttteval CK HELD W PREFIX STEPS LRMICRO LAYER_FROM— strictly-causal test-time fast-weight adaptation on[0..PREFIX), scored on[PREFIX..T), restoring base weights after every window.ollm tttsamp CK SEED N TEMPMILLI PROMPT MERGES STEPS LRMICRO LAYER_FROM— ephemeral test-time adaptation onPROMPTbefore sampling, then restoring base weights.ollm dolaeval CK HELD W EARLY_LAYER BETA_MILLI— layer-contrastive decoding evaluation (log P_final - beta * log P_early).
Measured Host Results (Apple Silicon M2, Darwin 25.6.0 arm64, f64 CPU)
- Cross-target build: compiles cleanly to Darwin ARM64 Mach-O (
mio.om, 247,840 B), Linux AArch64 static ELF (lio.om, 405,436 B), andgb10(lio.om+gpu/*, 706,536 B) with 0 errors. Linux/x86/UEFI execution and GB10 GPU execution remainNOT_RUN. - Multi-link Merkle chains & multi-helix
spclip(V=256, T=16, D=32, H=2, F=64, L=2→3→4):- Built 2-link chains (
base L=2→P1.sp L=2→3→P2_{a,b,c}.sp L=3→4pinned tobase + P1). spchainapp(SPCHAPP 2 4 2 41760) and in-memoryspchainevalmatched the trained 4-layer checkpointevalbit-identically (E 5 4 5492684 7924269); greedy (TEMPMILLI=0) and stochastic (TEMPMILLI=800)spchainsampmatchedsamplebit-for-bit viacmp.- Negative controls caught with exact refusal codes: swapped link order
P2 P1(rc=62), skippedP1(rc=62), 1-bit flip inP2payload (rc=61), 1-bit flip in shared trunkP1on strand 2 inspclip(rc=61), truncated pack (rc=60), and invalidS/MODE(rc=2). spclipidentity & multi-helix checks: double-helixS=2 (A,A), triple-helixS=3 (A,A,A), quad-helixS=4 (A,A,A,A), and zero-weight isolation(A@1000, B@0)all matched single-strandspchainsampbit-identically in bothMODE=0andMODE=1. DistinctS=2 (A,B),S=3 (A,B,C),S=4 (A,B,C,trunk), asymmetric-depth(L=3, L=4), and direct-base fork (common_links=0) all executed cleanly (rc=0, finite 32-byte outputs).
- Built 2-link chains (
- Frozen-core preservation (2→3 layer host test):
trainfkept 100% of embeddings + layers0..1bit-identical while updating layer 2 (F 5 2 5486997, identical before and after theofzlaybackward-skip optimization). Negative control: standardtrainmutated layers0..1. spext/spappround-trip & negative controls: rebuilt checkpoint matched trainedevalbit-for-bit (E 5 5 5445549 7856267vsE 0 5 5445549 7856267). Negative controls caught: wrong base (rc=62), 1-bit flipped payload (rc=61), truncated pack (rc=60), non-frozen checkpoint passed tospext(rc=62).- v2 (
omega-v2.ck, 15.8M → 17.6M, 8→9 layers) tool-call specialist run (25 steps,FREEZE_LAYERS=8,B=2,lr=0.005):- Held-out tool-call loss fell from
7.740902(E 0 3 7740902 7100033) to5.323565nats/token (E 25 3 5323565 4882828) during initial warmup steps (F 5..25: 7.771 -> 7.509 -> 6.983 -> 6.213 -> 5.357). spextverified all 8 base layers + embeddings bit-identical toomega-v2.ckand extracted a14 MB(1,770,624params)OLLMSP01pack vs403 MBfull checkpoint;spappre-applied it onto untouchedomega-v2.ckwith bit-identical held-out eval (E 60000 3 5323565 4882828).
- Held-out tool-call loss fell from
- v2 (
omega-v2.ck, 15.8M → 17.6M, 8→9 layers) longergrowpro+fcachem+trainfctool-call run (150 steps,W=160,FREEZE_LAYERS=8,B=1,lr=0.0035):- Full receipt in evidence/OMEGALLM/specialists/tool-call-growpro-l9-150-20261119/README.md: step-0
growpromatched base held-out eval bit-identically (7.183552 nats/tok,W=9); masked train loss fell5.512 → 0.439 nats/tok, unmasked held-out NLL reached4.528072 nats/tok(-36.97%) at step 50 and4.954553 nats/tokat step 150;spext(14.17 MBvs422.49 MBcheckpoint,29.8×smaller),speval/spappround-trip, independent126.66 MBfrozen-base byte check, and negative controls (rc=60/61/62) all passed.
- Full receipt in evidence/OMEGALLM/specialists/tool-call-growpro-l9-150-20261119/README.md: step-0
- TTT-Omega (
ttteval,W=5,PREFIX=128):steps=0controlΔ=0; in-distribution TinyStories plain SGD slightly overfit prefix (+7to+3945µnats); on an out-of-distribution tool prompt,tttsampadapted format without altering base weights. - DoLa (
dolaeval,W=5):beta=0controlΔ=0;beta=0.05..0.10worsened calibrated NLL (+2755to+12260µnats) on the 8-layer model.