Text Ranking
sentence-transformers
PyTorch
JAX
ONNX
Safetensors
OpenVINO
Transformers
English
bert
text-classification
text-embeddings-inference
Instructions to use cross-encoder/ms-marco-MiniLM-L6-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use cross-encoder/ms-marco-MiniLM-L6-v2 with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("cross-encoder/ms-marco-MiniLM-L6-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 cross-encoder/ms-marco-MiniLM-L6-v2 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("cross-encoder/ms-marco-MiniLM-L6-v2") model = AutoModelForSequenceClassification.from_pretrained("cross-encoder/ms-marco-MiniLM-L6-v2", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Commit History
-
Update README.md (#20)
- Update README.md (36ab6bed23aef983909fa6d797e1339c3669d5b1) Co-authored-by: Rafid Islam <[email protected]>233902d
-
Fix training code link
Verified signaturec5ee24c
-
Revert inadvertent config, tokenizer updates
Tom AarsenThis reverts commit 9cc09816f0a7a8aaceefa40a3cfbb843c1bfa579.ce0834f
-
Add new CrossEncoder model
Verified signature9cc0981
-
Update model metadata
Verified signaturefbf9045
-
Update README.md
Verified signature86f4be3
-
L-\d -> L\d
Verified signaturec41b396
-
fix with actual model name (#4)
Verified signature- fix with actual model name (cb57fa9d84c4c389f7e121cece7c52af992e1787) Co-authored-by: Venkatachalam Natchiappan <[email protected]>d604262
-
Update README.md
b2cfda5
-
upload
nreimers5ada194