Text Ranking
sentence-transformers
PyTorch
JAX
ONNX
Safetensors
OpenVINO
Transformers
English
roberta
text-classification
text-embeddings-inference
Instructions to use cross-encoder/stsb-roberta-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use cross-encoder/stsb-roberta-large with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("cross-encoder/stsb-roberta-large") 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 cross-encoder/stsb-roberta-large with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("cross-encoder/stsb-roberta-large") model = AutoModelForSequenceClassification.from_pretrained("cross-encoder/stsb-roberta-large", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Commit History
-
Revert inadvertent config, tokenizer updates
Tom AarsenThis reverts commit d6a867ee21ea12c29559eca07bd3c048e0577565.2b12c2c
-
Add exported openvino model 'openvino_model_qint8_quantized.xml'
Verified signatured3ca9c9 -
Add new CrossEncoder model
Verified signature0c8cf91 -
Add exported onnx model 'model_qint8_avx512_vnni.onnx'
Verified signature7d7f2b2 -
Add exported onnx model 'model_qint8_avx512.onnx'
Verified signature4d8d17d -
Add exported onnx model 'model_quint8_avx2.onnx'
Verified signature307e532 -
Add exported onnx model 'model_qint8_arm64.onnx'
Verified signatured967e8f -
Add exported onnx model 'model_O4.onnx'
Verified signature03d7825 -
Add exported onnx model 'model_O3.onnx'
Verified signaturebeaeed2 -
Add exported onnx model 'model_O2.onnx'
Verified signature238f7b0 -
Add exported onnx model 'model_O1.onnx'
Verified signaturefa0eaaa -
Add new CrossEncoder model
Verified signatured6a867e
-
Push tokenizer again (#2)
Verified signature- Push tokenizer again (a088788f9ded1eb2500a2aaf7fbd03ed91257248)0acc622
-
Update model metadata
Verified signaturec0ff899
-
Update README.md
Verified signature135e373
-
Adding `safetensors` variant of this model (#1)
Verified signature- Adding `safetensors` variant of this model (4eb65ac16c7ca57e3b630c5e713c9cdb07eec710) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>33b172f
-
Update README.md
9e35bf0
-
upload flax model
f4bd46a -
allow flax
63db5f8
-
upload
nreimers6ed5194 -
initial commit
2c71c6f