MicroLoRA-NCM demo loading…

Deterministic case canonicalization + 8-dimensional NCM re-ranking + a tiny online-learned LoRA + a deterministic guard — all inside this browser.
🌐 日本語
🔒 ✓ Zero external transmission ── You can verify this in the Network tab of your browser's DevTools.

What this box shows

The answer stays verbatim (bit-exact); only the lookup is made "semantically tolerant." Caches miss because matching is deterministic and exact. We loosen that in two stages: ① case canonicalization — fold word-order and particle variation into a single key, deterministically (zero false hits). ② MicroLoRA — learn only the lexical paraphrases that case folding cannot reach, thinly, from your 👍 (a rank-r adapter on the 8-dimensional NCM = a few hundred parameters). Finally ③ a deterministic guard confirms equivalence before any verbatim answer is returned, stopping false hits.
Honest scope: the embedding here is a lightweight toy feature map built for this demo (production uses bge-m3, on-prem/WASM). Case canonicalization (T0), NCM re-ranking and MicroLoRA all really run, as Rust→WASM (badge at the top right; zero-dependency crate slime-canon, a faithful port of wordorder-lora + ncm.py that is bit-identical to the JS; particle matching is a simplified version that does not use fugashi). If the WASM fails to load, the page falls back to JS automatically (graceful). For other languages the case labels are attached by Gemma 4 as a teacher, for one moment only; what runs in production is the distilled deterministic student — Gemma 4 never crosses the boundary. Japanese = deterministic parsing from case particles / English = caseless, so role attributes are injected (the English injection here is a simple heuristic standing in for the distilled student). Note: matching across JA↔EN needs a multilingual embedding (bge-m3); the toy feature map can only match within one language (an English query hits the English cache).

Try it

① Word order swapped (→ deterministic hit) ② Paraphrase (→ MicroLoRA learns) ③ False-hit canary (→ guard) ④ Out of scope (→ honestly defer to generation) JA (case-marked → particle parse)
Cached (canonical queries) — EN: reimburse the receipt as expense / apply for paid leave to your manager / reissue the password from IT / reserve a meeting room on the calendar / settle expense on an overseas trip | JA: 領収書を経費で精算 / 有給を上司に申請 / パスワードを情シスに再発行 / 会議室をカレンダーで予約 / 経費を海外出張で精算

Live instruments

Cache hit rate (deterministic + tolerant)0 / 0
‖ΔW‖F / ε (blast radius of a false hit)0.00 / 0.80
MicroLoRA size (rank 2, α included)513 params ≈ int8 513B
Specification (the actual numbers in this implementation)
NCM: 128 reals of the embedding → an 8×8 complex operator (Hermitian / traceless / Frobenius-normalized) → score = α·cosine + (1-α)·(1 − ‖[Q,D]‖F/2).
MicroLoRA: a low-rank adapter placed just before the operator step, v' = v + B·(A·v) (A: r×128, B: 128×r, params = 2·r·128+1). Training = pairwise over hit / shown-but-not-chosen, online updates, ‖ΔW‖F ≤ ε clamp, cold start at ΔW = 0.
Guard: a verbatim answer is returned only when the canonical forms match exactly, or the canonical content tokens overlap ≥ 1 and the adapted-score margin ≥ δ. Deep paraphrase equivalence cannot be settled deterministically — the guard bounds false hits, it does not prove semantic identity (the honest line).