Multi-model · 55.5 MB Two-Stage Retrieval + Cross-Encoder Rerank

55.5 MB Hybrid RAG: Jina v2 Small EN → MS MARCO Cross-Encoder

Chain Stage 1: Jina Embeddings v2 Small EN (32.77 MB q8 WASM, ALiBi 512-d vectors) to shortlist Top-K candidates across long documents, then pass that shortlist to Stage 2: MS MARCO MiniLM-L-6-v2 (22.7 MB q8 WASM) to re-score with joint query-passage cross-attention logits.

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

Stage 1 · ALiBi Bi-Encoder Retriever (32.77 MB)

Stage 2 · MS MARCO Cross-Encoder Reranker (22.7 MB)

2. Live dense retrieval vs cross-encoder rank shifts

Stage 1 · Jina v2 Small EN Top-K (Bi-Encoder)

Load Stage 1 to embed the corpus and shortlist Top-K candidates.

    Stage 2 · MS MARCO MiniLM Rerank (Cross-Encoder)

    Load Stage 2 to score joint (query, candidate) cross-attention logits.

      Rank-shift comparison table

      Comparison of Stage 1 cosine rank and Stage 2 cross-encoder rank
      Document Stage 1 Jina cos Stage 2 Logit Prob Shift
      Run both stages above to inspect live rank promotions and demotions.

      Show the code

      Show the code: MS MARCO MiniLM cross-encoder Stage 2 logit scoring
      Show the code: two-stage rank shift & Spearman correlation calculation