code wiki / _hdl_build / nx_nofloat_k3interleave_gate.nx

nx_nofloat_k3interleave_gate.nx

buildroot/runtime/_hdl_build/nx_nofloat_k3interleave_gate.nx

5607 B123 linesdepth 10pulls 23 transitivereach 0 importersview sourcekind gate/prooftopic nofloat
docsdependenciesstructsconstsfunctions

about

nx_nofloat_k3interleave_gate.nx -- gate: the 3:1 KDA:MLA interleaved K3 block structure, assembled from the proven KDA + MLA organs, deterministic at depth. T1 the 4-layer interleave [KDA,KDA,KDA,MLA] runs end-to-end + transforms the input T2 BOTH attention types are LIVE: perturbing ONLY an MLA weight changes the output, AND perturbing ONLY a KDA weight changes the output (neither path is dead / optimized away) T3 DEPTH-STABLE: output bounded through the interleaved stack (RMSNorm holds) T4 DETERMINISTIC bit-identical at depth (float interleaved stacks drift + compound) T5 the schedule is mechanically 3:1: layer_type over 8 layers == [0,0,0,1,0,0,0,1] (6 KDA : 2 MLA) license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_nofloat_k3interleave.nx nx_gate_verdict.nx nx_syscalls.nx nx_nofloat_k3interleave_gate.n

imports: nx_nofloat_k3interleave.nxnx_gate_verdict.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap gv_head gv_puts sys_write sys_mmap ↻ ig_fill k3il_stack sys_mmap ↻ k3il_layer_type k3_matmul kda_forward sys_mmap ↻ la_zero kda_gate kda_write la_readout la_accum la_readout ↻ k3_add nmla_forward_latent nmla_downproj mm_out_in nmla_upproj mm_out_in ↻ mm_out_in ↻ nmla_mha qmul fx_exp k3_relu ks_rmsnorm ks_isqrt gv_check gv_puts ↻ k3il_layer_type ↻ gv_verdict gv_puts ↻ gv_num sys_mmap ↻

structs

none

consts

14const IG_T: i64 = 4
15const IG_D: i64 = 4
16const IG_DFF: i64 = 8
17const IG_NH: i64 = 2
18const IG_HD: i64 = 2
19const IG_LC: i64 = 2
20const IG_L: i64 = 4
21const IG_Q: i64 = 65536
22const IG_SCALE: i64 = 46341 // 1/sqrt(hd=2) in Q16

functions

24func ig_fill(m: *i64, n: i64, seed: i64) -> i64
called by 1: main
30func main() -> i64