Instructions to use zeroentropy/zerank-2-reranker with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use zeroentropy/zerank-2-reranker with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("zeroentropy/zerank-2-reranker") query = "Which planet is known as the Red Planet?" passages = [ "Venus is often called Earth's twin because of its similar size and proximity.", "Mars, known for its reddish appearance, is often referred to as the Red Planet.", "Jupiter, the largest planet in our solar system, has a prominent red spot.", "Saturn, famous for its rings, is sometimes mistaken for the Red Planet." ] scores = model.predict([(query, passage) for passage in passages]) print(scores) - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse filesflag breaking change in `predict()` return semantics.
README.md
CHANGED
|
@@ -40,6 +40,7 @@ This model is released under a non-commercial license. If you'd like a commercia
|
|
| 40 |
| License | CC-BY-NC-4.0 |
|
| 41 |
|
| 42 |
## How to Use
|
|
|
|
| 43 |
|
| 44 |
### Using Sentence Transformers
|
| 45 |
|
|
|
|
| 40 |
| License | CC-BY-NC-4.0 |
|
| 41 |
|
| 42 |
## How to Use
|
| 43 |
+
> **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.
|
| 44 |
|
| 45 |
### Using Sentence Transformers
|
| 46 |
|