code wiki / (root) / nx_f32_llm_test.nx

nx_f32_llm_test.nx

buildroot/runtime/nx_f32_llm_test.nx

5534 B152 linesdepth 11pulls 20 transitivereach 0 importersview sourcekind gate/prooftopic f32
docsdependenciesstructsconstsfunctions

about

nx_f32_llm_test.nx -- smoke for nx_f32_llm.nx. Build a 2-layer model with one-hot embed + zero block weights + zero lm_head. Verify: (a) Different token_ids run without segfault (b) logits is all zero (zero lm_head) (c) Argmax returns 0 (first token id) (d) Token-id out-of-range verdict

dependencies 7 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_f32.nx nx_f32_kv_cache.nx nx_f32_llama_block.nx nx_f32_llama_stack.nx nx_f32_llm.nx nx_f32_llm_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_f32.nxnx_f32_kv_cache.nxnx_f32_llama_block.nxnx_f32_llama_stack.nxnx_f32_llm.nx

imported by: nobody (leaf or entry point)

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

main nx_f32_llm_verdict_is_vali nx_f32_lt nx_f32_is_nan nx_f32_classify nx_f32_exp_field nx_f32_mant_field nx_f32_is_zero nx_f32_classify ↻ nx_f32_llama_model_alloc sys_mmap sys_mmap ↻ make_zero_layer nx_f32_llama_layer_alloc sys_mmap ↻ sys_mmap ↻ nx_f32_kv_cache_alloc sys_mmap ↻ nx_f32_llm_forward sys_mmap ↻ nx_f32_llama_stack_forward sys_mmap ↻ nx_f32_llama_block_forward sys_mmap ↻ nx_f32_rmsnorm nx_i32_to_f32 nx_f32_sqrt nx_f32_classify ↻ nx_f32_sign nx_f32_exp_field ↻ nx_f32_mant_field ↻ _f32_isqrt nx_f32_matmul nx_f32_kv_cache_get_seq_le nx_f32_rope_apply_vector nx_i32_to_f32 ↻ nx_f32_neg nx_f32_div nx_f32_classify ↻ nx_f32_sign ↻

structs

none

consts

none

functions

18func make_zero_layer(hidden_dim: nx_int, q_dim: nx_int,
39func main() -> i64