Multi-model · 3-Layer Ultra-Light Recall → 12-Layer Cross-Encoder Rerank

paraphrase-MiniLM-L3-v2 → MS MARCO MiniLM-L-12-v2

Compare 3-layer bi-encoder speed against 12-layer cross-encoder precision in a compact ~51.7 MB weights pipeline (53.08 MB first visit, q8 WASM): Stage 1 Xenova/paraphrase-MiniLM-L3-v2 (18.16 MB) embeds candidates independently for fast recall, then Stage 2 Xenova/ms-marco-MiniLM-L-12-v2 (34.20 MB ONNX via ../../ms-marco-minilm-l12/worker.js) scores joint [CLS] query [SEP] passage [SEP] attention.

1. Load Both Stages (~51.7 MB weights · 53.08 MB first visit)

Stage 1 · paraphrase-MiniLM-L3-v2 (3L · 18.16 MB · Apache-2.0)

Stage 2 · MS MARCO MiniLM-L-12-v2 (12L · 34.20 MB ONNX · Apache-2.0)

Initialise Stage 1 (paraphrase-MiniLM-L3-v2) and Stage 2 (MS MARCO MiniLM-L-12-v2) above to benchmark 3-layer recall vs 12-layer cross-attention reranking.

2. Recall Shortlist (Stage 1) → Cross-Attention Rerank (Stage 2)

Drop, paste, or upload a .txt, .md, .csv, or .json list (line 1 = query, rest = passages).

Stage 1 · 3-Layer Bi-Encoder Recall

Load Stage 1 to embed query + candidates with paraphrase-MiniLM-L3-v2.

    Stage 2 · 12-Layer Cross-Encoder Rerank

    Load Stage 2 to score joint (query, passage) cross-attention with MS MARCO L12.

      Stage 1 (3L Bi-Encoder) → Stage 2 (12L Cross-Encoder) Rank-Shift Bump Chart

      Two-Stage Audit Table (Cosine vs Cross-Encoder Logit & Shift)

      Two-stage recall and cross-encoder rerank scores
      ID S1 Rank (3L) Cosine S2 Rank (12L) Logit (Prob) Shift Candidate
      Run both stages above to compare 3-layer recall vs 12-layer precision.

      Show the Code

      Show the code: Stage 1 3-layer bi-encoder embed worker (worker.js)
      Show the code: Reused Stage 2 12-layer MS MARCO cross-encoder worker (ms-marco-minilm-l12/worker.js)
      Show the code: Stage 1 → Stage 2 rank-shift, MRR@5 & speedup comparator (l3-core.mjs)