Multi-model · Stage 1 MPNet CLS Dot QA Retrieval → Stage 2 Cross-Encoder Reranking

QA Retrieval + Precision Reranking: multi-qa-mpnet-base-dot-v1 → MS MARCO MiniLM-L-12-v2

Chain Stage 1: Xenova/multi-qa-mpnet-base-dot-v1 (110.80 MB 768-d CLS dot-product QA bi-encoder) into Stage 2: Xenova/ms-marco-MiniLM-L-12-v2 (34.20 MB joint [CLS] query [SEP] passage [SEP] cross-encoder) to inspect how cross-attention resolves negation and keyword traps locally on CPU WASM.

1. Load both stages (145.00 MB total WASM q8)

Stage 1 · Xenova/multi-qa-mpnet-base-dot-v1 (110.80 MB · CLS Dot Retriever)

Stage 2 · Xenova/ms-marco-MiniLM-L-12-v2 (34.20 MB · Cross-Encoder)

2. Stage 1 CLS dot shortlist vs Stage 2 cross-encoder reranking

Stage 1 · multi-qa-mpnet-base-dot-v1 (CLS Dot)

  • Initialise Stage 1 above to embed & shortlist candidates by dot product.

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

  • Initialise Stage 2 above to rerank the Stage 1 shortlist.

Stage 1 → Stage 2 Rank-Shift Bump Chart

Rank delta audit table comparing MPNet CLS dot retriever and MS MARCO cross-encoder
ID Candidate Stage 1 rank (dot / cos) Stage 2 rank (logit) Rank delta Sigmoid σ(z)
Run both stages to populate the rank-delta audit table.

Show the code

Show the code: Spearman ρ & Stage 1 → Stage 2 rank-shift audit (multi-qa-mpnet-core.mjs)
Show the code: Stage 2 cross-encoder worker reuse client (multi-qa-mpnet.js)