nx_f32_llama_block_test.nx
buildroot/runtime/nx_f32_llama_block_test.nx
about
nx_f32_llama_block_test.nx -- smoke for nx_f32_llama_block.nx.
Identity-with-zero-weights test:
All weight matrices are zero (mmap default).
gamma_attn and gamma_ffn can be anything; with zero W_q/k/v
the attention projections are 0; with zero W_o attn_proj=0.
x_mid = x + 0 = x. FFN similarly produces 0 with zero W_*.
out = x_mid + 0 = x.
This exercises the full forward pass (RMSNorm + matmul + RoPE
+ attn-with-cache + SwiGLU + residual) and verifies the residual
path preserves x bit-exact when weights are zero.
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_tier.nxnx_f32.nxnx_f32_rmsnorm.nxnx_f32_matmul.nxnx_f32_activations.nxnx_f32_rope.nxnx_f32_attn_multi.nxnx_f32_kv_cache.nxnx_f32_attn_cached.nxnx_f32_llama_block.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
| 26 | func main() -> i64 |