Text Ranking
sentence-transformers
Safetensors
Transformers
Polish
roberta
text-classification
information-retrieval
text-embeddings-inference
Instructions to use sdadas/polish-reranker-roberta-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use sdadas/polish-reranker-roberta-v2 with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("sdadas/polish-reranker-roberta-v2") 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) - Transformers
How to use sdadas/polish-reranker-roberta-v2 with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("sdadas/polish-reranker-roberta-v2") model = AutoModelForSequenceClassification.from_pretrained("sdadas/polish-reranker-roberta-v2") - Notebooks
- Google Colab
- Kaggle
fix: invalid variable
#2
by wwydmanski - opened
Before: If user tries to run the code with float32 setting and flash_attention, they will encounter an undefined variable error, due to misspelling of self.query.
After: If user tries to run the code with float32 setting and flash_attention, they will correctly get a float32 not supported error
sdadas changed pull request status to merged