code wiki / (root) / nx_real_gguf_test.nx

nx_real_gguf_test.nx

buildroot/runtime/nx_real_gguf_test.nx

15958 B384 linesdepth 8pulls 14 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_real_gguf_test.nx -- LIVE FIRE on a real public-license GGUF. Reads /tmp/nx_real_model.gguf (Qwen2.5-0.5B-Instruct Q4_K_M, ~491 MB, Apache 2.0 license, downloaded from HuggingFace) through the substrate's own sys_read_file + nx_gguf_parse + nx_gguf_meta + nx_gguf_load_tensor_lazy. Pass criteria: 1. File reads in via sys_read_file (no truncation) 2. Magic + version match GGUF v3 3. tensor_count and metadata_count are non-zero and within sane bounds 4. nx_gguf_parse succeeds 5. At least one tensor lookup by name works (we look up "token_embd.weight" which every llama/qwen-class model has) 6. Lazy load returns a non-null handle with zero materialization Reports timing for each phase to /tmp/nx_real_gguf.tsv.

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_real_gguf_test.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)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap sys_now_ms sys_mmap ↻ sys_clock_gettime_mono sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close nx_gguf_parse nx_le_read_u32 nx_le_read_u64 nx_le_read_u32 ↻ _gguf_skip_value nx_le_read_u64 ↻ nx_le_read_u32 ↻ _gguf_skip_value ↻ sys_mmap ↻ nx_gguf_find_tensor nx_gguf_tensor_at nx_gguf_name_equals nx_gguf_tensor_at ↻ nx_gguf_load_tensor_lazy nx_gguf_find_tensor ↻ nx_gguf_tensor_at ↻ nx_gguf_tensor_n_values sys_mmap ↻ nx_placed_tensor_new_lazy sys_mmap ↻ nx_placed_tensor_is_live nx_placed_tensor_storage_b nx_gguf_meta_find nx_le_read_u64 ↻ nx_le_read_u32 ↻ _gmeta_bytes_equal nx_gguf_skip_value _gguf_skip_value ↻ nx_gguf_meta_read_string_l

structs

none

consts

none

functions

29func _emit_kv(fd: i64, key: *u8, key_len: nx_int, value: i64) -> i64
43func main() -> i64