code wiki / (root) / nx_zimage_ffn_down_verify.nx

nx_zimage_ffn_down_verify.nx

buildroot/runtime/nx_zimage_ffn_down_verify.nx

4455 B110 linesdepth 5pulls 11 transitivereach 0 importersview sourcekind orphan librarytopic zimage
docsdependenciesstructsconstsfunctions

about

nx_zimage_ffn_down_verify.nx -- SOVEREIGN Z-Image FFN sub-piece c (final): down-proj + norm + gate + residual. ff = ffh @ w2.T ; ff = rmsnorm(ff, fn2) * tanh(gl) ; out = ff + x_after_attn. Verifies vs oracle `out`. tanh built from exp (sign-stable). ff[] is a per-token local scratch. license_tier: ORIGINAL

dependencies 7 imports · 0 importers

nx_syscalls.nx nx_le.nx nx_f32.nx nx_f32_div.nx nx_f32_cvt.nx nx_f32_exp.nx nx_strconv.nx nx_zimage_ffn_down_verify.nx

imports: nx_syscalls.nxnx_le.nxnx_f32.nxnx_f32_div.nxnx_f32_cvt.nxnx_f32_exp.nxnx_strconv.nx

imported by: nobody (leaf or entry point)

structs

none

consts

11const K_MAGIC_3840: i64 = 3840
12const K_MAGIC_10240: i64 = 10240
13const K_MAGIC_100000: i64 = 100000

functions

15func zfd_load(name: *u8, nl: i64, n_floats: i64) -> *u8
40func zfd_tanh(x: i64) -> i64
51func main() -> i64