code wiki / (root) / nx_q8_0_linear_verify.nx

nx_q8_0_linear_verify.nx

buildroot/runtime/nx_q8_0_linear_verify.nx

2815 B83 linesdepth 6pulls 11 transitivereach 0 importersview sourcekind tooltopic q8
docsdependenciesstructsconstsfunctions

about

nx_q8_0_linear_verify.nx -- verify a full Q8_0 linear at REAL DiT scale vs a Python ggml golden. Reads the real Z-Image DiT layers.0.attention.out.weight (Q8_0, [3840,3840], dumped to dit_out_weight.q8) and computes output rows 0..3 = W[o,:] . x with x[i]=(i%7)+1, confirming the row stride (120 blocks * 34B = 4080B/row) + the Q8_0 dot at scale. Golden (Python): -20.6074, -1.0092, 22.8396, -16.1888. out_q34 / 2^24 = out in Q10 = out*1024. Golden*1024 ~= -21102, -1033, 23388, -16577. license_tier: ORIGINAL

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_le.nx nx_strconv.nx nx_gguf_load.nx nx_q8_0_linear_verify.nx

imports: nx_syscalls.nxnx_tier.nxnx_le.nxnx_strconv.nxnx_gguf_load.nx

imported by: nobody (leaf or entry point)

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

main sys_openat_rd sys_mmap sys_read sys_close sys_openat_wr q8v_dot _gguf_f16_to_q24 nx_le_read_u16 nx_le_read_u8 q8v_emit sys_mmap ↻ sys_write nx_strconv_format_i64

structs

none

consts

none

functions

14func q8v_dot(buf: *u8, block_off: i64, n_blocks: i64, col_q10: *i64) -> i64
32func q8v_emit(fd: i64, o: i64, v: i64) -> i64
44func main() -> i64