interplane.Get Omega
Read in your language

omega-helix

This project has not described itself yet.

Brought by drakestapleton

branch main Branches Tags History

omega-helix / docs / CONTRACT-V4.md

88 lines · 6564 bytes Raw Blame History Source

Omega Helix v4 Contract (OLLMCK04 Universal Zero-Cap Engine & Weight Interchange)

v4 removes all static model shape caps and adds multi-architecture support, streaming u8/u16/u32 token files, and bidirectional HuggingFace Safetensors & GGUF v3 weight interchange while keeping OLLMCK01/02/03 untouched for backward compatibility.

Two independent implementations verify every rule:

  1. Pure seeded Omega (native/univ/): ollm-univ (TARGET=univ) and ollm-interchange (TARGET=interchange).
  2. Independent Python-stdlib f64 referees: tests/oracle_universal.py and tests/test_interchange.py.

1. Shapes & Dynamic Zero-Cap Arenas

All array limits (VCAP, TCAP, DCAP, HCAP, FCAP, LCAP, BCAP, OCKCAP) are removed via enlarge dynamic arenas (native/univ/uarena.om) and UCH = 500,000 chunked loops. Verified shapes exceed all v1–v3 bounds (including V = 70,000 u32 vocabularies and V = 8,192, T = 512, D = 512, L = 20, 52.97M parameters).

Constraints enforced cleanly (exit 12):

Token storage width (tok_bytes) is determined solely by V:

2. arch_flags Bitmask & Built-In Presets

BitValueMeaning
01RoPE rotary embeddings (else learned absolute WPE[T, D])
12SwiGLU gated FFN (W1, Wup, W2)
24Untied LM head (lmh[V, D] stored after gf; else weight-tied to wte)
38QK-RMSNorm (qn[E], kn[E] per layer)
416AdamW + Cosine LR with linear warmup (else Adam + linear decay)
532GELU (tanh-approx) instead of ReLU on non-gated FFN
664GeGLU gated FFN (gelu(W1 x) * (Wup x))

Presets in ollm-univ init:

3. Binary Format (OLLMCK04 / OLLMGR04, 208-byte Header)

All header fields and f64 payloads are little-endian:

OffsetField
0..7Magic (OLLMCK04 or OLLMGR04)
8..63V, T, D, H, H_kv, F, L, B
64..95seed, step (B in OLLMGR04), total, lr_bits
96..111P (param_count), arch_flags
112..143rope_theta_milli, rms_eps_bits, wd_bits, warmup
144..167LP, LC, NP
168..199Reserved (0, future extensions)
200..207FNV-1a 64 checksum over payload bytes

Math constants in native/univ/umath.om (ufexp, uflog, ufsin, ufcos, ufgelu, ufgelu_d) are derived via WolframLanguageEvaluator, including Cody-Waite pi/2 (pi_2_hi = 1.5707963267341256, pi_2_lo = 6.0771005065061926e-11, inv_pi_2 = 0.63661977236758134) and Taylor coefficients 1/3!..1/15!, 1/2!..1/14!.

4. Universal Interchange (ollm-interchange, TARGET=interchange)


Sparse Top-K Distillation Shard (OLLMDK01)

Implemented in native/univ/udistill.om (ollm-univ commands dkemit, dtrain, dcheck):