nx_f32_llm_e2e_test.nx
buildroot/runtime/nx_f32_llm_e2e_test.nx
about
nx_f32_llm_e2e_test.nx -- end-to-end bits-up text-to-text smoke.
Composes the entire f32 LLM pipeline on the tiny-Llama fixture:
1. Build fixture (12-tensor GGUF + BPE vocab + spec)
2. Allocate NxF32LlamaModel + populate dims from fixture
3. Load weights via nx_f32_llm_load_weights_from_gguf
4. Tokenize 'ab' via nx_bpe_encode -> [0, 1]
5. Allocate KV cache
6. Run nx_f32_llm_forward over the 2 prompt tokens
7. Argmax last token's logits -> next token id
8. Detokenize -> byte
Zero-weight fixture means logits are all zero -> argmax returns 0
(the first token id 'a' = byte 0x61). This proves the entire
pipeline executes without segfault and produces a deterministic
known-good result.
dependencies 12 imports · 0 importers
diagram shows first 10 each side; +2 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_tier.nxnx_bpe.nxnx_gguf.nxnx_gguf_fixture_tiny.nxnx_f32_kv_cache.nxnx_f32_llama_block.nxnx_f32_llama_stack.nxnx_f32_llama_layer_load.nxnx_f32_llm.nxnx_f32_llm_load.nxnx_f32_sampler.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 31 | func main() -> i64 |