code wiki / (root) / nx_jina_embed_gate.nx

nx_jina_embed_gate.nx

buildroot/runtime/nx_jina_embed_gate.nx

10869 B269 linesdepth 10pulls 21 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_jina_embed_gate.nx -- E-ARC e2: JINA-WEIGHT ORACLE gate (2026-07-15). Runs the SAME sovereign integer embed path (nsv_embed, last-token pooled final-norm, i8 mode) on the DOWNLOADED jina-code-embeddings-0.5b Q8_0 weights (sha256-verified vs origin ETag; arch-identical Qwen2.5-Coder backbone) and grades our pipeline against the model card's bf16 2x2 cosine oracle 817/124/120/553 pm. cc-by-nc-4.0 weights -> BENCHMARK ORACLE ONLY (like gcc), never the production embedder. GATES: A ORDER cos(q1,p1)>cos(q1,p2) AND cos(q2,p2)>cos(q2,p1) A2 SEPARATION tuned margins (c11-c12) and (c22-c21) must EXCEED 300 pm -- the discriminating test vs BASE-coder arm (nx_code_embed_gate measured margins 72/49 pm): only truly-loaded tuned weights can show the oracle's ~693/433 pm class separation. B DETERM re-embed q1 after all other texts -> BITWISE identical (KV/state-leak liar killer) C SELF cos(q1,q1') >= 999 pm D RETRIEVE Nishi 3x3 NL->code diagonal 3/3 (vs base arm for margin comparison) F DISTRACTOR unrelated prose passage must lose to the true match on BOTH queries (NEG control) license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 1 imports · 0 importers

nx_nofloat_serve_core.nx nx_jina_embed_gate.nx

imports: nx_nofloat_serve_core.nx

imported by: nobody (leaf or entry point)

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

main ce_ws nsv_init sys_now_ms sys_mmap sys_clock_gettime_mono nsv_log sys_write nf_pool nx_pool_new nx_hw_worker_count nx_hw_cpu_count sys_mmap ↻ sys_munmap sys_mmap ↻ nx_chan_new sys_mmap ↻ _nx_chan_cell sys_thread_create nx_thread_spawn sys_mmap ↻ nx_thread_spawn_fn sys_mmap ↻ sys_mmap ↻ nsv_load_meta sys_mmap ↻ nsv_log ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close 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 ↻

structs

none

consts

18const CE_NE: i64 = 896
19const CE_SLOTS: i64 = 12

functions

21func ce_ws(s: *u8) -> i64
28func ce_wdec(v: i64) -> i64
called by 1: ce_kv calls 1: ce_ws
42func ce_kv(label: *u8, v: i64) -> i64
called by 2: ce_embedmain calls 2: ce_wsce_wdec
50func ce_isqrt(v: i64) -> i64
called by 1: ce_cos_pm
60func ce_cos_pm(a: *i64, b: *i64) -> i64
called by 1: main calls 1: ce_isqrt
93func ce_bytes_eq(a: *i64, b: *i64) -> i64
called by 1: main
99func ce_maxabs(a: *i64) -> i64
called by 1: main
112func ce_embed(vecs: *i64, slot: i64, pre: *u8, content: *u8) -> i64
129func ce_vp(vecs: *i64, slot: i64) -> *i64
called by 1: main
134func main() -> i64