code wiki / (root) / nx_zimage_layout.nx

nx_zimage_layout.nx

buildroot/runtime/nx_zimage_layout.nx

3126 B71 linesdepth 8pulls 14 transitivereach 0 importersview sourcekind orphan librarytopic zimage
docsdependenciesstructsconstsfunctions

about

nx_zimage_layout.nx -- dump the REAL Z-Image/Qwen GGUF tensor layout (offsets/dims/types), sovereignly. sd-server -> Nishi migration: to run a REAL transformer op we must know where blk.0's weights live in the file and their shapes. This parses the real `Z-Image_Qwen_3_4b-Q6_K.gguf` metadata (bounded prefix) and writes, for token_embd + blk.0 attention/ffn tensors, their data offset (hdr.data_off + ti.offset), dim_0, dim_1, and ggml_type -- so the next organ sizes the read + matmul correctly. Metadata only; no materialize. 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_layout.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

19func zl_emit(fd: i64, key: *u8, key_len: i64, value: i64) -> i64
34func zl_dump(fd: i64, hdr: *NxGgufHeader, name: *u8, name_len: i64,
46func main() -> i64