nx_llm_argmax_probe.nx
buildroot/runtime/nx_llm_argmax_probe.nx
about
nx_llm_argmax_probe.nx -- PURE-FORWARD correctness test. Bypasses run_v3's sampler + repetition-penalty:
manual sequential prefill of "The capital of France is", then reads the RAW top-5 logits of the final position
and decodes them. If top-1 = " Paris" (or coherent), the FORWARD is correct and the "are are are" loop was a
SAMPLER artifact (debt in nx_f32_sampler/run_v3), not the forward. If top-1 is garbage, the forward residual is
real. Decisive isolation of forward-vs-sampler. expect_exit: 0
dependencies 18 imports · 0 importers
diagram shows first 10 each side; +8 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_tier.nxnx_bpe.nxnx_gguf.nxnx_gguf_load.nxnx_gguf_meta.nxnx_f32.nxnx_f32_kv_cache.nxnx_f32_lazy_weight.nxnx_f32_llama_block.nxnx_f32_llama_block_v4.nxnx_f32_llama_stack_v4.nxnx_f32_llama_layer_lazy_load.nxnx_f32_llm.nxnx_f32_llm_v4.nxnx_f32_llm_read_dims.nxnx_f32_bpe_load.nxnx_f32_llm_special_tokens.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
| 25 | func pr_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 26 | func pr_num(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{sys_write(1,"-" as *u8,1);m=0-m} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(1,bb,k); return 0 } |
| 28 | func main() -> i64 |