nx_gen_lora_verify.nx
buildroot/runtime/nx_gen_lora_verify.nx
about
nx_gen_lora_verify.nx -- prove the sovereign LoRA fold against an EXACT f64 reference.
★★★★★ WHY NOT GRADE AGAINST sd.cpp. We tried, and it cannot answer the question. sd.cpp applies
this adapter at RUNTIME (`apply lora at runtime` -> forward_with_lora), so its weight tap yields
the BASE weight and only its activations carry the adapter. Grading our fold against those
activations measured a LoRA delta of 0.86% of the signal through an oracle whose own Q8_0 error
is 0.6% median. A least-squares fit for the scale recovered 0.1725 against a true alpha/rank of
0.1667 -- consistent, but the confidence interval swallows the answer.
⇒ THE SAME REMEDY AS EVERY OTHER SCALE THIS SESSION: build the third, higher-precision reference.
exact = h @ (W + (alpha/rank) * up @ down)^T in f64, from the SAME dequantized bytes.
Now the only difference between us and the reference is OUR arithmetic, which is the thing under
test. sd.cpp is no longer a judge here -- it is a second defendant.
Usage: nx_gen_lora_verify <lora.safetensors> [multiplier_milli] [ref_fixture]
⚠THE REFERENCE IS AN ARGUMENT ON PURPOSE. A fold that ignored the multiplier entirely would pass
the mult=1.0 case perfectly and look green forever. ★ A GATE THAT ONLY TESTS THE EASY SIDE OF A
SWITCH DEFENDS NEITHER SIDE -- so the multiplier is graded against its OWN exact reference at
0.5 and at -1.0, and each must fail the others.
license_tier: ORIGINAL
dependencies 12 imports · 0 importers
diagram shows first 10 each side; +2 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_le.nxnx_f32.nxnx_f32_div.nxnx_f32_cvt.nxnx_f16.nxnx_strconv.nxnx_genfix.nxnx_genver.nxnx_genweights.nxnx_genblock.nxnx_genlora.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
| 35 | const LV_IN: i64 = 3840 |
| 36 | const LV_OUT: i64 = 11520 |
| 37 | const LV_TOK: i64 = 768 |
functions
| 39 | func lv_puts(s: *u8) -> i64 { |
| 45 | func main(argc: i64, argv: *i64) -> i64 { |