code wiki / (root) / nx_f32_llama_layer_lazy_load.nx

nx_f32_llama_layer_lazy_load.nx

buildroot/runtime/nx_f32_llama_layer_lazy_load.nx

14871 B323 linesdepth 11pulls 47 transitivereach 45 importersview sourcekind librarytopic f32
docsdependenciesstructsconstsfunctions

about

nx_f32_llama_layer_lazy_load.nx -- bind one layer's 9 tensors into NxF32LlamaLayerLazy. For each tensor: * F32 source -> dequant once into f32 storage, wrap as NxF32LazyWeight tagged F32. * F16 source -> widen to f32, store, tag F32. * Q4_K source -> DO NOT DEQUANT. Record the GGUF buffer + byte offset directly, tag Q4_K. The forward path (v4 block) will stream Q4_K super-blocks during matmul. gamma_attn / gamma_ffn (RMSNorm scales) are always loaded as f32 raw bits (they're 1D vectors, small). genealogy_id: ggml_format_taxonomy + standard_layer_binding lineage_id: substrate_f32_llama_layer_lazy_load_v1

dependencies 16 imports · 35 importers

nx_syscalls.nx nx_tier.nx nx_dec_emit.nx nx_le.nx nx_gguf.nx nx_gguf_load.nx nx_gguf_load_f32.nx nx_f32_cvt.nx nx_f32_lazy_weight.nx nx_f32_llama_block_v4.nx nx_f32_llama_layer_lazy_load.n nx_batched_gate.nx nx_batched_tput.nx nx_chat_warmcache.nx nx_coder_gen_f32.nx nx_companion_chat.nx nx_companion_voice.nx nx_f32_llama_layer_lazy_load_test. nx_f32_llm_bench_test.nx nx_f32_llm_chat_test.nx nx_f32_llm_cohere_test.nx

diagram shows first 10 each side; +6 more imports, +25 more importers in the complete lists below.

imports: nx_syscalls.nxnx_tier.nxnx_dec_emit.nxnx_le.nxnx_gguf.nxnx_gguf_load.nxnx_gguf_load_f32.nxnx_f32_cvt.nxnx_f32_lazy_weight.nxnx_f32_llama_block_v4.nxnx_q5_k_to_f32.nxnx_q6_k_to_f32.nxnx_q4k_to_f32.nxnx_q8_0_to_f32.nxnx_q8_0_from_q5_0.nxnx_q8_0_from_f32.nx

imported by: nx_batched_gate.nxnx_batched_tput.nxnx_chat_warmcache.nxnx_coder_gen_f32.nxnx_companion_chat.nxnx_companion_voice.nxnx_f32_llama_layer_lazy_load_test.nxnx_f32_llm_bench_test.nxnx_f32_llm_chat_test.nxnx_f32_llm_cohere_test.nxnx_f32_llm_embed_diag_test.nxnx_f32_llm_live_gen_test.nxnx_f32_llm_live_load_only_test.nxnx_f32_llm_live_load_test.nxnx_f32_llm_probe.nxnx_f32_llm_run_v3_test.nxnx_f32_llm_serve.nxnx_f32_llm_v4.nxnx_f32_llm_v4_test.nxnx_f32_qwen_capital_gate.nxnx_llm_argmax_probe.nxnx_llm_batch_serve.nxnx_llm_diff_probe.nxnx_llm_forward_profile.nxnx_llm_france_probe.nxnx_llm_layerlens_probe.nxnx_llm_sched_gate.nxnx_lowrank_kv_real.nxnx_paged_fwd_gate.nxnx_qwen_native_gate.nxnx_qwen_wsl_timing_gate.nxnx_reason_paged_probe.nxnx_reason_probe.nxnx_reasoning_gate.nxnx_specdec_gate.nx

structs

none

consts

35const NX_FLLL_OK: nx_int = 0
36const NX_FLLL_ERR_BAD_LAYER: nx_int = 1
37const NX_FLLL_ERR_NOT_FOUND: nx_int = 2
38const NX_FLLL_ERR_NULL: nx_int = 3
39const NX_FLLL_ERR_BAD_TYPE: nx_int = 4
40const NX_FLLL_N_VERDICTS: nx_int = 5

functions

42func nx_flll_verdict_is_valid(v: nx_int) -> nx_int
called by 1: main
48func _flll_fmt_name(layer_idx: nx_int, suffix: *u8, suffix_len: nx_int,
68func _flll_build_lazy(buf: *u8, hdr: *NxGgufHeader,
169func _flll_load_gamma(buf: *u8, hdr: *NxGgufHeader,
181func nx_f32_llama_layer_lazy_load_from_gguf(buf: *u8, hdr: *NxGgufHeader,