code wiki / (root) / nx_zimage_gguf_arch.nx

nx_zimage_gguf_arch.nx

buildroot/runtime/nx_zimage_gguf_arch.nx

6867 B147 linesdepth 8pulls 14 transitivereach 0 importersview sourcekind orphan librarytopic zimage
docsdependenciesstructsconstsfunctions

about

nx_zimage_gguf_arch.nx -- extract the REAL Z-Image text-encoder architecture from its GGUF, sovereignly. sd-server -> Nishi migration: the real-scale assembly needs the REAL dims to scale our f32 organs to. This reads the actual `Z-Image_Qwen_3_4b-Q6_K.gguf` and pulls token_embd.weight's dims (hidden, vocab) + ggml quant type + tensor_count from the parsed header (metadata at the front -> bounded prefix read, no multi-GB tensor materialization), and writes them to /tmp/zimg_arch.txt for inspection. Composes the proven sovereign GGUF reader. Gate: opens, GGUF v3, token_embd found, hidden>0. license_tier: ORIGINAL

dependencies 10 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_le.nx nx_strconv.nx nx_tensor.nx nx_gguf.nx nx_gguf_load.nx nx_gguf_meta.nx nx_placement.nx nx_gguf_load_lazy.nx nx_zimage_gguf_arch.nx

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.nx

imported by: nobody (leaf or entry point)

structs

none

consts

none

functions

20func za_emit_kv(fd: i64, key: *u8, key_len: i64, value: i64) -> i64
35func za_blk_name(out: *u8, n: i64, suffix: *u8, suffix_len: i64) -> i64
55func za_emit_dims(ofd: i64, hdr: *NxGgufHeader, label: *u8, label_len: i64, suffix: *u8, suffix_len: i64) -> i64
74func main() -> i64