code wiki / _hdl_build / nx_mt_core.nx
nx_mt_core.nx
buildroot/runtime/_hdl_build/nx_mt_core.nx
about
nx_mt_core.nx -- reusable CORE of the sovereign neural MT arc (GEN-WL-WL-NN-TRANSLATION).
A learned word-map W (T x S), SHARED across all sequence positions, trained by the team's
scalar-tape autograd (MSE to one-hot targets, full-batch gradient descent, zero-init).
Applied per-position it translates token SEQUENCES of any length. R0 (nx_mt_r0_gate) proved
the single-token atom inline; this factors that into a reusable organ and generalizes it to
multi-token sequences with weight-sharing. Because W is position-independent, the map
GENERALIZES to HELD-OUT sequences (combinations never trained). CONTEXT / reordering (an
output token depending on MORE THAN its own input token) is R2, via fnet_mix -- not here.
Shared-weight gradient note: a param W[j,s] is one tape leaf referenced by EVERY (sentence,
position) token whose source word is s, so backward accumulates m contributions -> the GD
update factor is (1 - 2*lr*m) where m = that word's occurrence count. Callers must pass an lr
with 2*lr*m_max < 2 (convergence) -- lr is a PARAMETER, never hardcoded (no magic numbers).
genealogy_id: rumelhart_1986_backprop (realized_in nx_autograd)
lineage_id: sovereign_neural_mt_core_shared_wordmap_v1
license_tier: ORIGINAL
dependencies 2 imports · 3 importers
imports: nx_autograd.nxnx_syscalls.nx
imported by: nx_mt_r1_gate.nxnx_mt_r2_gate.nxnx_mt_r3_gate.nx
structs
| none |
consts
| 20 | const K_MAGIC_8192: i64 = 8192 |
functions
| 24 | func mt_argmax(W: *i64, S: i64, T: i64, s: i64) -> i64 |
| 37 | func mt_seq_acc(W: *i64, S: i64, T: i64, srcs: *i64, tgts: *i64, n_sent: i64, L: i64) -> i64 |
| 51 | func mt_train(W: *i64, S: i64, T: i64, srcs: *i64, tgts: *i64, n_sent: i64, L: i64, epochs: i64, lr: i64, lfirst: *i64, llast: *i64) -> i64 |
| 95 | func main() -> i64 { return 0 } // library organ; proven by nx_mt_r1_gate |