nx_hybrid_moe_cascade_gate.nx
buildroot/runtime/nx_hybrid_moe_cascade_gate.nx
about
nx_hybrid_moe_cascade_gate.nx -- THE SYSTEM-LEVEL MoE the operator actually wants (2026-07-15): NOT a
monster model, but a two-expert CASCADE that spends the FEWEST tokens. Expert 1 = the local sovereign
no-float model (free, deterministic, and VERIFIABLE by the LCF kernel). Expert 2 = the lightest Claude
(Haiku) -- invoked ONLY for the residual the local model can't self-certify. The router:
task -> LOCAL PROPOSE (no-float model) -> SOVEREIGN VERIFY (af_decide, kernel-checked) ->
certified => RETURN local answer, 0 Claude tokens (the local expert handled it, PROVABLY correct)
refuted => ESCALATE to Haiku (local was WRONG -- caught, never shipped)
unsupported=> ESCALATE to Haiku (out of local scope)
The KEY SOTA property = SOUND token-minimization: a local answer is returned ONLY when kernel-certified, so
it is NEVER wrong; every uncertain case escalates to the cheapest tier. Better local model => more certified
=> fewer escalations => fewer tokens (this is why the MoE/MLA arch work pays off HERE). Teeth:
T1 SOUNDNESS: every LOCAL-routed answer is kernel-certified (0 wrong answers shipped locally)
T2 ROUTING CORRECT: verifiable-and-right => LOCAL; wrong-or-out-of-scope => ESCALATE
T3 TOKEN SAVINGS MEASURED: zero-Claude-token fraction reported; escalations go to the LIGHTEST tier
T4 ESCALATION CONTRACT: each escalation emits a real Haiku-bound prompt (wired, not hand-waved)
T5 DETERMINISM: the whole routing decision is byte-stable on repeat
Requires /home/elderwesto/nx_stage/nx_real_model.gguf. Heavy (~1 min: local model + per-task gen). Return
from main. No hw writes (Rule 26). expect_exit: 0 license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_propose_verify_lib.nxnx_gate_verdict.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 23 | func hc_w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 24 | func hc_n(v: i64) -> i64 |
| 38 | func main() -> i64 |