nx_motion_neural.nx
buildroot/runtime/nx_motion_neural.nx
about
nx_motion_neural.nx -- the NEURAL-MOTION FOUNDATION (S6, MotionGPT/T2M-GPT thesis "motion as language",
sovereign + no 491MB LLM load): a motion is discretized into TOKENS by a codebook LEARNED from data (vector
quantization = k-means, the exact VQ-VAE quantizer), and a learned token-TRANSITION model GENERATES novel
motion-token sequences. This is real learning-from-data (not the parametric keyword->recipe of nx_movelib):
the codebook is trained (Lloyd iterations reduce distortion) and the generator composes sequences it was never
given whole. Integer fx (rad4096 joint angles) => deterministic, VM-vettable. The token-LM here is an n-gram
(the bootstrap); the transformer/our-Qwen over these tokens is the deeper rung. license_tier: ORIGINAL
dependencies 2 imports · 4 importers
imports: nx_syscalls.nxnx_movelib.nx
imported by: nx_motion_neural_gate.nxnx_synth_serve.nxnx_text2motion.nxnx_text2motion_gate.nx
structs
| none |
consts
| 10 | const MN_MAGIC_1103515245: i64 = 1103515245 |
| 11 | const MN_MAGIC_12345: i64 = 12345 |
| 13 | const MN_D: i64 = 7 // pose vector dims (the joints the move vocabulary drives) |
| 14 | const MN_FR: i64 = 16 // frames sampled per move (over one stride) |
| 15 | const MN_MOVES: i64 = 10 // wave/cheer/sway/kick/lookaround/armcircle/clap/punch/bow/jumpingjack |
| 16 | const MN_N: i64 = 160 // corpus rows = MN_MOVES * MN_FR |
| 17 | const MN_K: i64 = 16 // codebook size (bumped for the richer 10-move pose space) |
functions
| 21 | func pose_read(sk: i64, out: *i64) -> i64 |
| 32 | func pose_apply(sk: i64, v: *i64) -> i64 |
| 44 | func mn_build_corpus(sk: i64, corpus: *i64) -> i64 called by 3: mainsv_do_text2motionmain calls 6: sys_mmapmove_bytesmove_genmv_hdrmove_pose_atpose_read |
| 68 | func mn_dist(a: *i64, ao: i64, b: *i64, bo: i64) -> i64 |
| 75 | func mn_encode(src: *i64, so: i64, cb: *i64) -> i64 |
| 87 | func mn_distortion(corpus: *i64, cb: *i64) -> i64 |
| 98 | func mn_init_cb(corpus: *i64, cb: *i64) -> i64 |
| 109 | func mn_train(corpus: *i64, cb: *i64, iters: i64) -> i64 |
| 139 | func mn_tokenize(corpus: *i64, cb: *i64, tokens: *i64) -> i64 |
| 145 | func mn_bigram(tokens: *i64, trans: *i64) -> i64 called by 1: main |
| 161 | func mn_lcg(st: *i64) -> i64 { st[0] = (st[0] * MN_MAGIC_1103515245 + MN_MAGIC_12345) & 0x7fffffff; return st[0] } called by 1: mn_generate |
| 163 | func mn_generate(trans: *i64, seed: i64, st: *i64, out: *i64, len: i64) -> i64 |