code wiki / _hdl_build / nx_nofloat_distill_gate.nx
nx_nofloat_distill_gate.nx
buildroot/runtime/_hdl_build/nx_nofloat_distill_gate.nx
about
nx_nofloat_distill_gate.nx -- R3 (cheap quality) from the sovereign-researcher roadmap
(knowledge/research/2026-06-23-nofloat-affordable-land-roadmap.md, grounded in nfs_hinton_distill.raw,
arXiv 1503.02531): DISTILLATION -- a student trained on a teacher's SOFT output distribution inherits the
full distribution ("dark knowledge": relative probabilities of the non-top classes), which one-hot HARD
labels throw away. Pure integer Q16; trains student logits W via softmax_rows(W) -> mse(target) (existing
gradcheck-verified ops, NO lib change -> zero regression risk to the other gates).
T1 the distilled student MATCHES the teacher's soft distribution (low total L1).
T2 (the point) distilled L1-to-teacher << hard-label student L1-to-teacher (soft targets > hard labels).
expect_exit: 0 Sovereign: nx_nofloat_autograd + nx_syscalls.
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
| 13 | const Q16: i64 = 65536 |
functions
| 16 | func g_abs(v: i64) -> i64 { if v<0 { return 0-v } return v } called by 1: l1_to_teacher |
| 19 | func train_student(tape: *i64, vals: *i64, grads: *i64, st: *i64, Wp: *i64, target: *i64, C: i64, V: i64, gb: *i64, steps: i64) -> i64 |
| 35 | func l1_to_teacher(tape: *i64, vals: *i64, st: *i64, Wp: *i64, T: *i64, C: i64, V: i64) -> i64 |
| 45 | func main() -> i64 |