1. Load Both Stages (101.86 MB combined q8 WASM)
Stage 1 ยท msmarco-distilbert-base-v4 (67.66 MB ยท Apache-2.0)
Bi-encoder retriever (../worker.js, 768-d mean-pooled cosine)
Stage 2 ยท ms-marco-MiniLM-L-12-v2 (34.20 MB ยท Apache-2.0)
Cross-encoder reranker (../../ms-marco-minilm-l12/worker.js, 12-layer logits)
Initialise Stage 1 (msmarco-distilbert-base-v4) and Stage 2 (ms-marco-MiniLM-L-12-v2) above to run the 2-stage retrieve-then-rerank pipeline.
2. Retrieve Top-K (Stage 1) โ Cross-Attention Rerank (Stage 2)
.txt, .md, .csv, or .json list of candidate passages.
Stage 1 ยท DistilBERT Bi-Encoder Shortlist
Load Stage 1 to embed and shortlist candidates by 768-d cosine.
Stage 2 ยท MiniLM-L12 Cross-Encoder Reranked
Load Stage 2 to score joint [CLS] query [SEP] passage [SEP] logits.
Stage 1 โ Stage 2 Rank-Shift Waterfall
Rank-Shift Waterfall Table
| ID | S1 Rank | S1 Cos | S2 Rank | S2 Logit | S2 Prob ฯ(z) | Shift | Passage |
|---|---|---|---|---|---|---|---|
| Run both stages above to inspect live rank promotions and demotions. | |||||||