code wiki / _hdl_build / nx_nofloat_arch_config_gate.nx
nx_nofloat_arch_config_gate.nx
buildroot/runtime/_hdl_build/nx_nofloat_arch_config_gate.nx
about
nx_nofloat_arch_config_gate.nx -- proves ARCH-CONFIGURABLE inference: read the model's dims from GGUF
METADATA (nac_read_config) instead of hardcoding, then run the REAL no-float forward with those read dims
and confirm it STILL generates ' Paris' (id 12095). This is the keystone that lets our inference run ANY
Qwen2/Llama-schema gguf -- the real 0.5B AND a small from-scratch model -> closes the sovereign train->serve
loop (our f32 trainer -> gguf writer -> THIS inference). expect_exit: 0 license_tier: ORIGINAL
D001 MIGRATION 2026-08-25. This gate hand-rolled its verdict: a pass/total pair, inline PASS/FAIL prints and
a prose "verdict=" line, with main returning a bare 0 or 1. A gate whose EXIT CODE does not carry its verdict
can print FAIL and still exit 0, silently blessing every failure it finds -- so it now inherits
nx_gate_verdict. gv_ctr makes declared and executed tooth counts ONE number (a tooth that stops running can
no longer read GREEN), gv_check names every tooth, and gv_verdict owns the exit code: 0 GREEN / 1 RED / 3 SKIP.
THE MODEL FILE IS A PRECONDITION, NOT A SUBJECT. If the fixture gguf is absent this gate proves NOTHING about
arch-configurable inference; it used to return 1, which reports its own environment in the same word it
reports a regression. It now SKIPs. SKIP is not a pass -- it blocks any claim that this works.
The old single compound T1 (seven dims nested in one if) is decomposed into one tooth per dimension. The
predicate set is unchanged; what changes is that a failure now NAMES the dim that drifted instead of saying
"config mismatch" and leaving the reader to guess which of the seven conjuncts fired.
dependencies 11 imports · 0 importers
diagram shows first 10 each side; +1 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_gate_verdict.nxnx_tier.nxnx_le.nxnx_tensor.nxnx_gguf.nxnx_gguf_load.nxnx_gguf_meta.nxnx_nofloat_llm.nxnx_nofloat_tok.nxnx_nofloat_arch.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
| 34 | const ACG_EXPECT_EMBED_DIM: i64 = 896 |
| 35 | const ACG_EXPECT_LAYERS: i64 = 24 |
| 36 | const ACG_EXPECT_HEADS: i64 = 14 |
| 37 | const ACG_EXPECT_KV_HEADS: i64 = 2 |
| 38 | const ACG_EXPECT_HEAD_DIM: i64 = 64 |
| 39 | const ACG_EXPECT_FFN_DIM: i64 = 4864 |
| 40 | const ACG_EXPECT_ROPE_SCALE_Q16: i64 = 8192 |
| 43 | const ACG_VOCAB_LO: i64 = 151000 |
| 44 | const ACG_VOCAB_HI: i64 = 152500 |
| 46 | const ACG_EXPECT_NEXT_TOKEN_ID: i64 = 12095 |
| 48 | const ACG_PROMPT_SLOTS: i64 = 8 |
functions
| 50 | func acg_eq(got: i64, want: i64) -> i64 { if got == want { return 1 } return 0 } called by 1: main |
| 51 | func acg_in(v: i64, lo: i64, hi: i64) -> i64 { if v < lo { return 0 } if v > hi { return 0 } return 1 } called by 1: main |
| 52 | func aslen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: main |
| 54 | func main() -> i64 |