nx_text2motion.nx
buildroot/runtime/nx_text2motion.nx
about
nx_text2motion.nx -- TEXT-CONDITIONED neural motion (the MotionGPT headline, S6b): a description -> motion,
via LEARNED weights, no keyword if-else. Two learned stages, sovereign + integer-deterministic:
(1) TEXT ENCODER: bag-of-words over a small vocab -> a linear classifier (weight matrix W[class][word])
TRAINED by the perceptron rule (error-driven weight updates) on (caption -> move-class) pairs. This is
real supervised learning; the honest test is GENERALIZATION to captions never trained on (held-out).
(2) CLASS-CONDITIONED generator: per class, a token-transition model learned from that class's motion tokens
(composes with nx_motion_neural's VQ codebook), so text -> class -> a generated motion-token sequence.
The chain: caption -> t2m_encode (learned argmax) -> class -> t2m_gen_tokens (learned transitions) -> decode
via the VQ codebook -> drive the rig. Fixed vocab + fixed classes = data; grow by adding captions/moves.
license_tier: ORIGINAL
dependencies 2 imports · 2 importers
imports: nx_syscalls.nxnx_motion_neural.nx
imported by: nx_synth_serve.nxnx_text2motion_gate.nx
structs
| none |
consts
| 14 | const T2M_VOCAB: i64 = 32 // known word slots |
| 15 | const T2M_CLASSES: i64 = 10 // = MN_MOVES (wave/cheer/sway/kick/lookaround/armcircle/clap/punch/bow/jumpingjack) |
functions
| 20 | func t2m_word_id(w: *u8, off: i64, len: i64) -> i64 |
| 55 | func t2m_weq(w: *u8, off: i64, len: i64, s: *u8) -> i64 called by 1: t2m_word_id |
| 63 | func t2m_lc(c: i64) -> i64 { if c >= 65 { if c <= 90 { return c + 32 } } return c } called by 1: t2m_bow |
| 65 | func t2m_bow(cap: *u8, bow: *i64) -> i64 |
| 96 | func t2m_score(W: *i64, c: i64, bow: *i64) -> i64 called by 1: t2m_predict |
| 102 | func t2m_predict(W: *i64, bow: *i64) -> i64 |
| 116 | func t2m_train(W: *i64, cap_ptr: *i64, labels: *i64, ncap: i64, epochs: i64) -> i64 |
| 146 | func t2m_encode(W: *i64, cap: *u8) -> i64 |
| 154 | func t2m_class_bigram(tokens: *i64, cls: i64, trans_c: *i64) -> i64 |