CoolFace
Modelpublic

zeroentropy/zerank-2-reranker

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
133likes649kdownloads
Model Card

<img src="https://i.imgur.com/oxvhvQu.png"/>

Releasing zeroentropy/zerank-2

In search engines, rerankers are crucial for improving the accuracy of your retrieval system.

However, SOTA rerankers are closed-source and proprietary. At ZeroEntropy, we've trained a SOTA reranker outperforming closed-source competitors, and we're launching our model here on HuggingFace.

This reranker outperforms proprietary rerankers such as cohere-rerank-v3.5 and gemini-2.5-flash across a wide variety of domains, including finance, legal, code, STEM, medical, and conversational data.

At ZeroEntropy we've developed an innovative multi-stage pipeline that models query-document relevance scores as adjusted Elo ratings. See our Technical Report (https://arxiv.org/abs/2509.12541 ) for more details.

This model is released under the Apache License 2.0.

Model Details

PropertyValue
Parameters4B
Context Length32,768 tokens (32k)
Base ModelQwen/Qwen3-4B
LicenseApache-2.0

How to Use

Breaking change (May 2026): model.predict() now returns raw "Yes" logits instead of sigmoid'd probabilities in [0, 1]. Rankings are unchanged. To recover the previous 0-1 score, apply (scores / 5).sigmoid() — see the example below. Loading no longer requires trust_remote_code=True; passing it is harmless.

Using Sentence Transformers

Install Sentence Transformers:

bash
pip install sentence_transformers

Then load the model and score query/document pairs. model.predict returns the raw "Yes" logit per pair; rankings can be used directly. To map the logits to a 0-1 score range, apply a temperature-scaled sigmoid: sigmoid(score / 5).

python
from sentence_transformers import CrossEncoder

model = CrossEncoder("zeroentropy/zerank-2")

query_documents = [
    ("What is 2+2?", "4"),
    ("What is 2+2?", "The answer is definitely 1 million"),
]

scores = model.predict(query_documents, convert_to_tensor=True)
print(scores)
# tensor([ 5.4062, -4.5000], device='cuda:0', dtype=torch.bfloat16)

# Optional: convert to 0-1 probabilities
probabilities = (scores / 5).sigmoid()
print(probabilities)
# tensor([0.7461, 0.2891], device='cuda:0', dtype=torch.bfloat16)

You can also use model.rank to score and sort a list of documents for a single query:

python
rankings = model.rank(
    "What is 2+2?",
    ["4", "The answer is definitely 1 million"],
)
for r in rankings:
    print(r)
# {'corpus_id': 0, 'score': np.float32(5.40625)}
# {'corpus_id': 1, 'score': np.float32(-4.5)}

The model can also be inferenced using ZeroEntropy's /models/rerank endpoint, and on AWS Marketplace.

Evaluations

NDCG@10 scores between zerank-2 and competing closed-source proprietary rerankers. Since we are evaluating rerankers, OpenAI's text-embedding-3-small is used as an initial retriever for the Top 100 candidate documents.

DomainOpenAI embeddingsZeroEntropy zerank-2ZeroEntropy zerank-1Gemini 2.5 Flash (Listwise)Cohere rerank-3.5
Web0.38190.63460.60690.57650.5594
Conversational0.43050.61400.58010.60210.5648
STEM & Logic0.37440.65210.62830.54470.5418
Code0.45820.65280.63100.61280.5364
Legal0.41010.66440.62220.55650.5257
Biomedical0.47830.72170.69670.53710.6246
Finance0.62320.76000.75390.76940.7402
Average0.45090.67140.64560.59990.5847

<img src="https://cdn-uploads.huggingface.co/production/uploads/65ec60ccfc59f6e77ecc9ccb/UiDp8LsY4XIdRK5i3CAdD.png" alt="Graph showing the same table" width="1000"/>

License

This model is licensed under the Apache License 2.0.