nx_nofloat_arch.nx
buildroot/runtime/nx_nofloat_arch.nx
about
nx_nofloat_arch.nx -- ARCH-CONFIGURABLE inference: read a model's dims from GGUF METADATA instead of
hardcoding Qwen2.5-0.5B. The no-float forward (nx_nofloat_llm) is ALREADY cfg-parameterized -- only the
gate/serve main()s hardcode ne/n_layers/heads/ffn. This reader fills those from the metadata KVs that
llama.cpp's convert writes (`<arch>.embedding_length`, `.block_count`, `.attention.head_count`,
`.attention.head_count_kv`, `.feed_forward_length`), so ANY Qwen2/Llama-schema gguf runs -- the real
0.5B AND a small from-scratch model (closing the sovereign train->serve loop). Pure funcs, no main.
license_tier: ORIGINAL
dependencies 5 imports · 9 importers
imports: nx_syscalls.nxnx_le.nxnx_gguf.nxnx_gguf_meta.nxnx_nofloat_llm.nx
imported by: nx_llm_loopb_gate.nxnx_llm_ppl_bench_gate.nxnx_nofloat_arch_config_gate.nxnx_nofloat_arch_moe_gate.nxnx_nofloat_moe_real_gate.nxnx_nofloat_olmoe_forward_gate.nxnx_nofloat_olmoe_gate.nxnx_nofloat_serve_core.nxnx_olmoe_recon2_gate.nx
structs
| none |
consts
| none |
functions
| 16 | func nac_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 18 | func nac_key(prefix: *u8, plen: i64, suffix: *u8, out: *u8) -> i64 |
| 23 | func nac_u32(buf: *u8, len: i64, hdr: *NxGgufHeader, prefix: *u8, plen: i64, suffix: *u8) -> i64 |
| 30 | func nac_f32_int(buf: *u8, len: i64, hdr: *NxGgufHeader, prefix: *u8, plen: i64, suffix: *u8, dflt: i64) -> i64 |
| 40 | func nac_read_config(buf: *u8, len: i64, hdr: *NxGgufHeader, cfg: *i64, arch_out: *u8) -> i64 |