nx_gguf_load_f32.nx
buildroot/runtime/nx_gguf_load_f32.nx
about
nx_gguf_load_f32.nx -- load a GGUF tensor and dequantize to f32 bits.
Composes nx_gguf_find_tensor + nx_gguf_tensor_at + the source-type
specific dequant primitives:
F32 -> read 4 bytes per value, store as i64-extended raw bits
F16 -> nx_f16_to_f32 per value (composes nx_f32_cvt)
Q4_K -> nx_q4k_to_f32 (composes nx_q4k_to_f32 brick)
Returns a freshly-allocated *i64 buffer holding n_values f32-raw-bit
values (one per logical tensor element). Caller owns the buffer.
This is the bridge between the L4.5 quant-aware GGUF loader and the
L8 f32-only forward-pass substrate. The new NxF32LlamaModel
consumes *i64 buffers of f32 raw bits; this function produces them.
genealogy_id: standard_gguf_tensor_load_and_dequant
lineage_id: substrate_gguf_load_f32_v1
dependencies 10 imports · 10 importers
imports: nx_syscalls.nxnx_tier.nxnx_le.nxnx_gguf.nxnx_gguf_load.nxnx_f32_cvt.nxnx_q4k_to_f32.nxnx_q5_0_to_f32.nxnx_q6_k_to_f32.nxnx_q8_0_to_f32.nx
imported by: nx_f32_llama_layer_lazy_load.nxnx_f32_llama_layer_lazy_load_test.nxnx_f32_llama_layer_load.nxnx_f32_llama_layer_load_test.nxnx_f32_llm_load.nxnx_f32_llm_load_test.nxnx_f32_llm_v4.nxnx_f32_llm_v4_test.nxnx_gguf_load_f32_test.nxnx_lowrank_weight_spectrum.nx
structs
| none |
consts
| 30 | const NX_GLF_OK: nx_int = 0 |
| 31 | const NX_GLF_ERR_NOT_FOUND:nx_int = 1 |
| 32 | const NX_GLF_ERR_BAD_TYPE: nx_int = 2 |
| 33 | const NX_GLF_ERR_BAD_SHAPE:nx_int = 3 |
| 34 | const NX_GLF_ERR_OOM: nx_int = 4 |
| 35 | const NX_GLF_N_VERDICTS: nx_int = 5 |
functions
| 37 | func nx_glf_verdict_is_valid(v: nx_int) -> nx_int called by 1: main |
| 47 | func nx_gguf_load_tensor_to_f32(buf: *u8, hdr: *NxGgufHeader, |