code wiki / (root) / nx_actor_role_llm_v2_real_autoreg_test.nx

nx_actor_role_llm_v2_real_autoreg_test.nx

buildroot/runtime/nx_actor_role_llm_v2_real_autoreg_test.nx

5107 B120 linesdepth 11pulls 38 transitivereach 0 importersview sourcekind gate/prooftopic actor
docsdependenciesstructsconstsfunctions

about

nx_actor_role_llm_v2_real_autoreg_test.nx -- multi-token REAL transformer forward through the v2 LLM actor adapter. Composes nx_gguf_fixture_tiny (fixture builder, sibling primitive) with nx_actor_role_llm_v2 (actor adapter) to drive THREE autoregressive iterations through the FULL Llama-class runner. Each iteration: 1. INIT -> RUN -> EMIT through the actor 2. RUN actually invokes nx_llm_generate_one_v2 (embedding + RMSNorm + multi-head attention + SwiGLU FFN + output projection + temperature + top_k + sample) 3. EMIT pushes LLM_TOKEN through the bus to the listener 4. reset_for_next_token rolls the adapter back to INIT, swaps the prompt to the previous generated token's byte Verifies: * 3 LLM_TOKEN messages reach the listener * All 3 tokens are in [0, vocab) and match the runner's return * Each iteration succeeds with NX_LR2_OK (no boundary-guard slip) * Scheduler state cycles READY -> RUNNING -> COMPLETED -> READY -> ... cleanly across iterations This closes the gap documented in nx_actor_role_llm_v2_autoreg_test.nx (where the GGUF fixture was inline and hit the nxc2 preprocessor edge). The fixture extraction puts the heavy primitive imports in their own file, so this smoke's preprocessor scope stays clean.

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_gguf_fixture_tiny.nx nx_actor.nx nx_message.nx nx_actor_role_llm_v2.nx nx_actor_role_llm_v2_real_auto

imports: nx_syscalls.nxnx_tier.nxnx_gguf_fixture_tiny.nxnx_actor.nxnx_message.nxnx_actor_role_llm_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_gft_build_tiny_llama sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ nx_le_write_u64 nx_le_write_u32 _gft_mk_blk_name _gft_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

structs

none

consts

none

functions

35func main() -> i64