Multi-model · 24-Layer AnglE Bi-Encoder Recall → 12-Layer Cross-Encoder Rerank

UAE-Large-V1 → MS MARCO MiniLM-L-12-v2

Pair 24-layer 1024-d [CLS] bi-encoder recall with 12-layer cross-encoder precision in a 371.18 MB weights pipeline (372.62 MB first visit, q8 WASM): Stage 1 Xenova/UAE-Large-V1 (337.70 MB, Prompts.C query prefix) shortlists top passages, 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] token cross-attention.

1. Load Both Stages (371.18 MB weights · 372.62 MB first visit)

Stage 1 · UAE-Large-V1 (24L · 337.70 MB · MIT)

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

Initialise Stage 1 (UAE-Large-V1) and Stage 2 (MS MARCO MiniLM-L-12-v2) above to run two-stage retrieve-then-rerank locally.

2. Retrieve 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 · UAE-Large-V1 (24L Bi-Encoder Recall)

Load Stage 1 to embed query (Prompts.C) + passages with UAE-Large-V1.

    Stage 2 · MS MARCO MiniLM-L-12-v2 (Cross-Encoder)

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

      Stage 1 (UAE-Large-V1) → Stage 2 (MS MARCO L12) 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 (UAE) Cosine S2 Rank (L12) Logit (Prob) Shift Candidate
      Run both stages above to compare 24-layer bi-encoder recall vs cross-attention precision.

      Show the Code

      Show the code: Stage 1 UAE-Large-V1 24-layer [CLS] 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 (uae-core.mjs)