code wiki / (root) / nx_gen_embed_verify.nx

nx_gen_embed_verify.nx

buildroot/runtime/nx_gen_embed_verify.nx

4401 B115 linesdepth 9pulls 24 transitivereach 0 importersview sourcekind tooltopic gen
docsdependenciesstructsconstsfunctions

about

nx_gen_embed_verify.nx -- SOVEREIGN F16 linear-with-bias (an embedder), verified vs the oracle. y[t][o] = sum_i x[t][i] * W[o][i] + b[o] The DiT's front-end projections -- x_embedder (patchified latent -> hidden) and cap_embedder.1 (text-encoder output -> hidden) -- are stored F16 WITH A BIAS, unlike the Q8_0, bias-free projections inside the blocks. Two differences, either of which silently produces a finite wrong tensor if assumed away, so this is its own organ rather than a flag on the block linear. Usage: nx_gen_embed_verify <model_id> <gguf> <x_name> <w_tensor> <bias_tensor|-> <y_name> [rows] pass "-" for <bias_tensor> when the projection has none Weights come from the GGUF, activations and the reference from the oracle fixtures: this grades ONE op, so its inputs should be the oracle's, exactly as the per-op bench does. license_tier: ORIGINAL

dependencies 13 imports · 0 importers

nx_syscalls.nx nx_le.nx nx_f32.nx nx_f32_div.nx nx_f32_cvt.nx nx_f16.nx nx_f32_exp.nx nx_f32_activations.nx nx_strconv.nx nx_genfix.nx nx_gen_embed_verify.nx

diagram shows first 10 each side; +3 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_f32_exp.nxnx_f32_activations.nxnx_strconv.nxnx_genfix.nxnx_genver.nxnx_genweights.nxnx_genblock.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main ev_puts sys_write sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ nx_strconv_parse_i64 nx_ascii_is_digit nx_gw_open sys_mmap ↻ sys_map_file sys_openat_rd sys_lseek sys_close stl_header_len stl_u64le stl_data_start stl_u64le ↻ nx_gguf_parse nx_le_read_u32 nx_le_read_u64 nx_le_read_u32 ↻ _gguf_skip_value nx_le_read_u64 ↻ nx_le_read_u32 ↻ _gguf_skip_value ↻ sys_mmap ↻ nx_gw_find

structs

none

consts

none

functions

31func ev_puts(s: *u8) -> i64
called by 1: main calls 1: sys_write
37func main(argc: i64, argv: *i64) -> i64