nx_q4k_linear_hp.nx
buildroot/runtime/nx_q4k_linear_hp.nx
about
nx_q4k_linear_hp.nx -- higher-precision integer linear (Q14 activation -> Q24 output).
sd-server -> Nishi migration (precision upgrade for the finding: Q10 activation quant is amplified by
SwiGLU -> FFN worst 3.3%). Uses a Q14 activation (4 more fractional bits) and keeps the output at Q24
(dot is Q24-weight x Q14-act = Q38 -> >>14 -> Q24) instead of collapsing to Q10. Test: on real
blk.0.attn_q, compare the Q14/Q24 path vs the Q10 path against the FULL-precision-activation f32 dot ->
the hp path's total error must be smaller (the precision knob works).
license_tier: ORIGINAL
dependencies 17 imports · 0 importers
diagram shows first 10 each side; +7 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_tier.nxnx_le.nxnx_strconv.nxnx_tensor.nxnx_gguf.nxnx_gguf_load.nxnx_gguf_meta.nxnx_placement.nxnx_gguf_load_lazy.nxnx_q4k_matmul.nxnx_dequant_iter.nxnx_q4k_linear.nxnx_q4k_to_f32.nxnx_f32.nxnx_f32_cvt.nxnx_f32_div.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
| 27 | func hp_q24_to_f32(q24: i64) -> i64 |
| 32 | func nx_q4k_linear_hp(buf: *u8, w_off: i64, out_dim: i64, in_dim: i64, |
| 50 | func hp_emit(fd: i64, key: *u8, kl: i64, v: i64) -> i64 |
| 64 | func main() -> i64 |