code wiki / (root) / nx_q8_0_dot.nx

nx_q8_0_dot.nx

buildroot/runtime/nx_q8_0_dot.nx

2475 B69 linesdepth 6pulls 11 transitivereach 0 importersview sourcekind tooltopic q8
docsdependenciesstructsconstsfunctions

about

nx_q8_0_dot.nx -- sovereign Q8_0 dequant + fused integer dot, verified on a REAL Z-Image DiT block. Q8_0 (the DiT quant, simplest): block = 34 bytes = f16 scale d (2B) + 32 signed int8 quants. value = d*q. Integer path: d_q24 = f16->Q24; dot += (d_q24 * q_int8) * col_q10 -> Q34. (col_q10 = col*1024.) KAT: real cap_embedder.0.weight block0 (Python ggml oracle) dot with col[i]=(i%7)+1 = 6.159073. dot_q34>>24 = dot in Q10 ~= 6.159073*1024 ~= 6307. 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_dot.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_mmap q8_hexval nx_le_write_u8 nx_q8_0_dot _gguf_f16_to_q24 nx_le_read_u16 nx_le_read_u8 sys_openat_wr nx_strconv_format_i64 sys_write sys_close

structs

none

consts

none

functions

14func q8_hexval(c: i64) -> i64
called by 1: main
20func nx_q8_0_dot(buf: *u8, block_off: i64, n_blocks: i64, col_q10: *i64) -> i64
38func main() -> i64