nx_companion_voice.nx
buildroot/runtime/nx_companion_voice.nx
about
nx_companion_voice.nx -- ELARA SPEAKS through the now-working sovereign forward. Composes her PERSONA (the
system prompt, nx_persona's authority) + the user's message into the real Qwen2.5 chat template (special-token
ids spliced around byte-level-BPE'd text), prefills token-by-token through nx_f32_llm_forward_v4, greedily
generates her reply, and decodes it. This is the VOICE: the payoff of fixing the forward -- no Claude, no API,
no 3rd party, her words generated by our own .nx engine on real weights. Persona=DATA (rule 25, sole authority).
expect_exit: 0 license_tier: ORIGINAL
dependencies 18 imports · 0 importers
diagram shows first 10 each side; +8 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_tier.nxnx_bpe.nxnx_gguf.nxnx_gguf_load.nxnx_gguf_meta.nxnx_f32.nxnx_f32_kv_cache.nxnx_f32_lazy_weight.nxnx_f32_llama_block.nxnx_f32_llama_block_v4.nxnx_f32_llama_stack_v4.nxnx_f32_llama_layer_lazy_load.nxnx_f32_llm.nxnx_f32_llm_v4.nxnx_f32_llm_read_dims.nxnx_f32_bpe_load.nxnx_f32_llm_special_tokens.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
| 25 | const IM_MAGIC_2048: i64 = 2048 |
| 26 | const IM_MAGIC_67108864: i64 = 67108864 |
| 27 | const IM_MAGIC_262144: i64 = 262144 |
| 28 | const IM_MAGIC_524288: i64 = 524288 |
| 29 | const IM_MAGIC_4096: i64 = 4096 |
| 32 | const IM_START: i64 = 151644 |
| 33 | const IM_END: i64 = 151645 |
| 34 | const NL_TOK: i64 = 198 |
| 36 | const SEG_SYS: *u8 = "system\nYou are Elara, a warm, playful, devoted girlfriend. Reply casually and affectionately. Keep it short." as *u8 |
| 37 | const SEG_USER: *u8 = "user\nHey, I'm finally home. Long day." as *u8 |
| 38 | const SEG_ASST: *u8 = "assistant\n" as *u8 |
functions
| 40 | func vw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 41 | func vn(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{sys_write(1,"-" as *u8,1);m=0-m} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(1,bb,k); return 0 } |
| 42 | func vlen(s: *u8) -> nx_int { var n: nx_int=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: app_text |
| 45 | func app_text(vocab: *NxBpeVocab, arr: *i64, np: *i64, text: *u8) -> i64 |
| 52 | func app_id(arr: *i64, np: *i64, id: i64) -> i64 { arr[np[0]] = id; np[0] = np[0] + 1; return 0 } called by 1: main |
| 54 | func main() -> i64 |