code wiki / _hdl_build / nx_nofloat_prose_gate.nx

nx_nofloat_prose_gate.nx

buildroot/runtime/_hdl_build/nx_nofloat_prose_gate.nx

8863 B154 linesdepth 3pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic nofloat
docsdependenciesstructsconstsfunctions

about

nx_nofloat_prose_gate.nx -- CAP-NF-PROSE: the no-float char-LM trains on REAL ENGLISH PROSE (words + spaces, not the alphabet) at a LARGER scale (dm=24/ffn=48). Real prose is genuinely harder than a periodic sequence: the space char precedes many different words, so the model MUST use causal-attention history to disambiguate. Trains the full pre-norm transformer block (all weights) with clipped SGD. Honest: an INCREMENTAL step into CAP-AI-FRONTIER (real corpus + scale), not a claim to finish it. T1 started untrained (CE > 0) ; T2 CE drops substantially (>= 60%) ; T3 next-char accuracy >> chance (1/V) + prints the model's predicted text vs target (visible evidence it learned the prose). Lean: 2 clm_fwd call sites (train-loop + accuracy/print). Sovereign: nx_nofloat_autograd + nx_syscalls. expect_exit: 0

dependencies 4 imports · 0 importers

nx_nofloat_autograd.nx nx_syscalls.nx nx_gate_emit_lib.nx nx_gate_verdict.nx nx_nofloat_prose_gate.nx

imports: nx_nofloat_autograd.nxnx_syscalls.nxnx_gate_emit_lib.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main g_puts sys_write slen 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 ↻ g_pn sys_mmap ↻ sys_write ↻ dini do_train clm_fwd nfa_leaf nfa_new nfa_embed nfa_new ↻ nfa_rmsnorm_rows nfa_new ↻ nfa_qmul nfa_isqrt vm_isqrt nfa_matmul nfa_new ↻ nfa_rope nfa_new ↻ nfa_fxexp nfa_cosf

structs

none

consts

13const Q16: i64 = 65536

functions

16func slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: main
17func dini(a: *i64, n: i64, sd: i64) -> i64 { var i: i64=0; while i<n { a[i]=(((i*7+sd*13+1)%11)-5)*13107; i=i+1 } return 0 }
called by 1: main
19func clm_fwd(tape: *i64, vals: *i64, st: *i64, W: *i64, ids: *i64, tgt: *i64, T: i64, dm: i64, ffn: i64, V: i64, scale: i64, leaves: *i64) -> i64
59func step_all(tape: *i64, grads: *i64, W: *i64, WN: *i64, leaves: *i64, nW: i64, lr: i64, clip: i64, gb: *i64) -> i64
called by 1: do_train calls 2: nfa_gradnfa_sgd
65func do_train(tape: *i64, vals: *i64, grads: *i64, st: *i64, W: *i64, WN: *i64, ids: *i64, tgt: *i64, T: i64, dm: i64, ffn: i64, V: i64, scale: i64, leaves: *i64, gb: *i64, steps: i64, cf: *i64, cl: *i64) -> i64
78func main() -> i64