code wiki / _hdl_build / nx_nofloat_prose_gate.nx
nx_nofloat_prose_gate.nx
buildroot/runtime/_hdl_build/nx_nofloat_prose_gate.nx
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 3 imports · 0 importers
imports: nx_nofloat_autograd.nxnx_syscalls.nxnx_gate_emit_lib.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
| 12 | const Q16: i64 = 65536 |
functions
| 15 | func slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: main |
| 16 | func 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 |
| 18 | func 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 called by 2: do_trainmain calls 12: nfa_leafnfa_embednfa_rmsnorm_rowsnfa_matmulnfa_ropenfa_matmul_nt+6 |
| 58 | func step_all(tape: *i64, grads: *i64, W: *i64, WN: *i64, leaves: *i64, nW: i64, lr: i64, clip: i64, gb: *i64) -> i64 |
| 64 | func 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 |
| 77 | func main() -> i64 |