code wiki / (root) / nx_llm_run_v2_test.nx

nx_llm_run_v2_test.nx

buildroot/runtime/nx_llm_run_v2_test.nx

9450 B243 linesdepth 10pulls 34 transitivereach 0 importersview sourcekind gate/prooftopic llm
docsdependenciesstructsconstsfunctions

about

nx_llm_run_v2_test.nx -- end-to-end smoke for nx_llm_run_v2.nx. Builds the FULL Llama-shape GGUF (12 tensors) for n_layers=1 with all-zero F32 weights, builds a tiny BPE vocab, and runs nx_llm_generate_one_v2. With all-zero weights the forward yields uniform logits and the sampler returns a token in [0, vocab_size). This is the integration proof: every loader + composer brick shipped this session walks end-to-end from text prompt to emitted token ID via pure NishiLang.

dependencies 10 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_le.nx nx_tensor.nx nx_bpe.nx nx_model_spec.nx nx_prng.nx nx_gguf.nx nx_gguf_load.nx nx_llm_run_v2.nx nx_llm_run_v2_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_le.nxnx_tensor.nxnx_bpe.nxnx_model_spec.nxnx_prng.nxnx_gguf.nxnx_gguf_load.nxnx_llm_run_v2.nx

imported by: nobody (leaf or entry point)

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

main nx_lr2_verdict_is_valid sys_mmap nx_le_write_u64 nx_le_write_u32 _mk_blk_name _write_ti nx_le_write_u64 ↻ nx_le_write_u32 ↻ 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_model_spec_new sys_mmap ↻ nx_model_spec_validate nx_norm_is_valid nx_act_is_valid nx_pos_is_valid nx_ffn_is_valid nx_bpe_vocab_new sys_mmap ↻ nx_intern_new nx_intern_next_pow2 nx_hash_new nx_bpe_add_token nx_intern_get nx_hash_fnv1a_bytes nx_hash_get nx_hash_probe nx_hash_fnv1a_i64 nx_intern_bytes_eq nx_hash_put nx_hash_probe ↻ nx_prng_init

structs

none

consts

none

functions

23func _write_ti(buf: *u8, off: i64,
called by 1: main calls 2: nx_le_write_u64nx_le_write_u32
40func _mk_blk_name(suffix: *u8, suffix_len: nx_int, out: *u8) -> nx_int
called by 1: main
52func main() -> i64