code wiki / (root) / nx_q5_k_ggml_kat.nx

nx_q5_k_ggml_kat.nx

buildroot/runtime/nx_q5_k_ggml_kat.nx

2553 B55 linesdepth 7pulls 13 transitivereach 0 importersview sourcekind tooltopic q5
docsdependenciesstructsconstsfunctions

about

nx_q5_k_ggml_kat.nx -- permanent golden KAT for nx_q5_k_to_f32 vs a ggml Q5_K oracle. Embeds the real 176-byte super-block 0 of blk.0.attn_v (Q5_K) from the Huihui Q4_K_M model (file offset 1050331744) and asserts nx_q5k_block_to_f32 reproduces the ggml golden at POSITION-SENSITIVE points (element0/32/64 + a non-uniform dot) -- so a wrong nibble/sub-block layout (the Q4_K failure mode) is caught. Golden from a hand-rolled ggml dequantize_row_q5_K (scratchpad/q5k_golden.py): element0=-0.004717 (bits 3147470080), element32=-0.049673 (3175839104), element64=-0.022964 (3166445568), dot(sum y[i]*((i%5)+1))=-2.357033 (bits 3222722976). license_tier: ORIGINAL

dependencies 7 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_le.nx nx_f32.nx nx_f32_cvt.nx nx_f32_div.nx nx_q5_k_to_f32.nx nx_q5_k_ggml_kat.nx

imports: nx_syscalls.nxnx_tier.nxnx_le.nxnx_f32.nxnx_f32_cvt.nxnx_f32_div.nxnx_q5_k_to_f32.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 kat_hexval nx_q5k_block_to_f32 nx_le_read_u16 nx_f16_to_f32 nx_le_read_u8 nx_i32_to_f32 nx_f32_div nx_f32_classify nx_f32_exp_field nx_f32_mant_field nx_f32_sign nx_f32_mant_field ↻ nx_f32_exp_field ↻ nx_i32_to_f32 ↻ nx_f32_sub nx_f32_add nx_f32_classify ↻ nx_f32_sign ↻ nx_f32_mant_field ↻ nx_f32_exp_field ↻ nx_f32_neg nx_f32_add ↻ nx_f32_mul nx_f32_classify ↻ nx_f32_sign ↻ nx_f32_mant_field ↻ nx_f32_exp_field ↻

structs

none

consts

none

functions

18func kat_hexval(c: i64) -> i64
called by 1: main
24func main() -> i64