haiku.rag/haiku_rag_slim/haiku/rag/reranking
Yiorgis Gozadinos d63199d96d
Keep cross-encoder rerank scores apart when they saturate
mxbai-rerank-base-v2 ships a Sigmoid activation and evaluates it in bf16, so
every strongly-relevant candidate rounds to exactly 1.0. Ties then leave the
order to the stable sort, which preserves the incoming hybrid ranking: on 100
t2_finqa retrieval cases the reranker scored MAP 0.661 against 0.659 with no
reranker at all, and 0.742 once the scores separate.

Ask the model for logits and apply the sigmoid here, where it runs in float64.
Scores stay 0-1, matching the cohere, vllm and zeroentropy rerankers.

Also drop the remaining pyright references; the project type-checks with ty.
2026-08-07 14:07:53 +03:00
..
__init__.py Multimodal reranking: send picture chunks to vllm rerankers as images 2026-07-24 12:29:20 +03:00
base.py Pool HTTP clients for vLLM embedding and vLLM/Jina reranking 2026-07-09 10:32:44 +03:00
cohere.py Hoist reranker empty-input guard into base; stop factory tests loading models 2026-06-29 14:20:23 +03:00
cross_encoder.py Keep cross-encoder rerank scores apart when they saturate 2026-08-07 14:07:53 +03:00
jina.py Pool HTTP clients for vLLM embedding and vLLM/Jina reranking 2026-07-09 10:32:44 +03:00
jina_local.py Keep cross-encoder rerank scores apart when they saturate 2026-08-07 14:07:53 +03:00
vllm.py Set explicit 120s timeout on the vllm reranker HTTP client 2026-07-24 12:34:31 +03:00
zeroentropy.py Hoist reranker empty-input guard into base; stop factory tests loading models 2026-06-29 14:20:23 +03:00