nx_gen_swiglu_verify.nx
buildroot/runtime/nx_gen_swiglu_verify.nx
about
nx_gen_swiglu_verify.nx -- SOVEREIGN SwiGLU feed-forward activation, verified vs the oracle.
ffn_act == silu(ffn_w1) * ffn_w3 elementwise
SwiGLU is the FFN gate in Z-Image, Flux, SD3/MMDiT and every Llama-class text encoder, so this
organ is named for the OP and takes the model as an argument. Nothing about it is Z-Image.
Usage: nx_gen_swiglu_verify <model_id> <tap_scope>
model_id fixture directory under the gen fixture root, e.g. zimage_turbo_2602_q8
tap_scope block scope the oracle tap emitted, e.g. layers.0
Every SHAPE is read from the oracle's manifest.tsv. Pointing this at a different model or
block needs no rebuild, and an organ that cannot silently keep a stale dimension cannot
silently verify the wrong model.
This is the cheapest real differential test in the lane -- pure elementwise, no weight
matrices, no GGUF. Its job is to prove the harness end to end so the expensive organs above
it fail for their own reasons rather than the harness's.
license_tier: ORIGINAL
dependencies 10 imports · 0 importers
imports: nx_syscalls.nxnx_le.nxnx_f32.nxnx_f32_div.nxnx_f32_cvt.nxnx_f32_exp.nxnx_f32_activations.nxnx_strconv.nxnx_genfix.nxnx_genver.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 K_ROWS_CHECK: i64 = 4 |
functions
| 36 | func main(argc: i64, argv: *i64) -> i64 |