anmol-unitmole/03-cross-encoder-bi-encoder-ranking-system
DocRank360 — Two-Stage Transformer Search
Real browser-based Transformer inference: This application runs MiniLM bi-encoder retrieval and MS MARCO cross-encoder reranking directly in the visitor's browser using Transformers.js and ONNX Runtime Web. No server-side inference API or paid Hugging Face compute is used.
Browser models
- Bi-encoder:
Xenova/all-MiniLM-L6-v2 - Cross-encoder:
Xenova/ms-marco-MiniLM-L-6-v2 - Quantization: q8
- Hosting: Hugging Face Static Space
What the demo shows
- semantic candidate retrieval;
- cross-encoder reranking;
- cosine and relevance scores;
- original rank, final rank, and rank movement;
- Recall@K, MRR@10, and nDCG@10 for labelled samples;
- browser model-loading and inference latency;
- downloadable JSON ranking results;
- limitations and responsible-use guidance.
Portfolio links
- GitHub project:
https://github.com/unit-mole/transformer-projects/tree/main/03-cross-encoder-bi-encoder-ranking-system - Python implementation:
https://github.com/unit-mole/transformer-projects/tree/main/03-cross-encoder-bi-encoder-ranking-system/src - Evaluation notebook:
https://github.com/unit-mole/transformer-projects/blob/main/03-cross-encoder-bi-encoder-ranking-system/notebooks/retrieval_reranking_evaluation.ipynb - Model card:
https://github.com/unit-mole/transformer-projects/blob/main/03-cross-encoder-bi-encoder-ranking-system/MODEL_CARD.md
Verified BEIR benchmark
The lower evaluation section displays aggregate results generated by the Python benchmark pipeline:
These fixed benchmark values are separate from the live query-level metrics calculated in the browser.
Responsible use
This educational demo can return incomplete, biased, irrelevant, or misleading rankings. Do not enter private or confidential data. Do not use search or job matching scores as the sole basis for hiring, rejection, compensation, promotion, immigration, legal, or employment decisions.
