code wiki / (root) / nx_llm_capcheck.nx

nx_llm_capcheck.nx

buildroot/runtime/nx_llm_capcheck.nx

11212 B150 linesdepth 8pulls 19 transitivereach 0 importersview sourcekind tooltopic llm
docsdependenciesstructsconstsfunctions

about

nx_llm_capcheck.nx -- SOVEREIGN DEEP CAPABILITY CHECKER for the no-float Qwen2.5-0.5B (our own "Unsloth-style" harness: measure SPEED + ACCURACY together, reproducibly, on the REAL model -- no TSV, no strawman). For a suite of known-answer prompts it runs the full sovereign pipeline (BPE encode -> 24-layer integer forward -> final norm -> 151936-vocab LM head -> argmax -> BPE decode) and measures, via the sys_now_ms clock, isolated: * forward_ms -- the 24-layer integer stack (incl. on-the-fly weight dequant; no weight cache yet) * lmhead_ms -- the one full-vocab output projection * load_ms -- one-time model parse (amortized in real use) and CAPABILITY: does the decoded prediction contain the expected answer? -> accuracy X/N. HONEST: a measurement harness PASSES when it MEASURES correctly; the accuracy number is the finding, not gated -- it surfaces the known faithfulness gap (component-verified matmul/RoPE, full-stack H2H still open) so we can fix it. No hw writes (Rule 26). expect_exit: 0 license_tier: ORIGINAL

dependencies 10 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_tier.nx nx_le.nx nx_tensor.nx nx_gguf.nx nx_gguf_load.nx nx_gguf_meta.nx nx_nofloat_llm.nx nx_nofloat_tok.nx nx_llm_capcheck.nx

imports: nx_syscalls.nxnx_itoa_lib.nxnx_tier.nxnx_le.nxnx_tensor.nxnx_gguf.nxnx_gguf_load.nxnx_gguf_meta.nxnx_nofloat_llm.nxnx_nofloat_tok.nx

imported by: nobody (leaf or entry point)

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

main cc_puts sys_write sys_mmap sys_now_ms sys_mmap ↻ sys_clock_gettime_mono sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_exit nx_gguf_parse nx_le_read_u32 nx_le_read_u64 nx_le_read_u32 ↻ _gguf_skip_value nx_le_read_u64 ↻ nx_le_read_u32 ↻ _gguf_skip_value ↻ sys_mmap ↻ nx_gguf_meta_find nx_le_read_u64 ↻ nx_le_read_u32 ↻ _gmeta_bytes_equal nx_gguf_skip_value _gguf_skip_value ↻ cc_slen nx_gguf_meta_array_count nx_le_read_u64 ↻ nx_gguf_meta_array_first_e nx_gguf_find_tensor nx_gguf_tensor_at nx_gguf_name_equals nx_gguf_tensor_at ↻ load_named_q16 nx_gguf_find_tensor ↻ nx_gguf_tensor_at ↻

structs

none

consts

none

functions

23func cc_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
28func cc_num(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
29func cc_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: main
32func cc_contains(hay: *u8, hlen: i64, ndl: *u8, nlen: i64) -> i64
called by 1: main
44func main() -> i64