Instructions to use zeroentropy/zerank-1-small-reranker with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use zeroentropy/zerank-1-small-reranker with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("zeroentropy/zerank-1-small-reranker", trust_remote_code=True) 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
Add Sentence Transformers library_name
Hello!
Preface
Congratulations on the release, I missed this when it was originally published! The scores look very impressive - do you want to share your rough training approach? I'm pretty curious.
Details
I added the Sentence Transformers library_name, to make it easier for users to find this model when searching for a Sentence Transformers-compatible reranker here: https://huggingface.co/models?pipeline_tag=text-ranking&library=sentence-transformers&sort=trending
- Tom Aarsen
Thanks for the congratulations! Your original articles on hard negatives were actually how we started to fine-tune embeddings and rerankers at first, love your contributions to the space.
We'll be releasing a technical report in the coming days with a very detailed description of our training pipeline. Will ping you when it's released!
Please do! I'm looking forward to it.
I also made a PR over here: https://huggingface.co/zeroentropy/zerank-1/discussions/1 π€
- Tom Aarsen