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 <rafidzenn@users.noreply.huggingface.co>233902d
-
Fix training code link
Verified signaturec5ee24c
-
Revert inadvertent config, tokenizer updates
Tom AarsenThis reverts commit 9cc09816f0a7a8aaceefa40a3cfbb843c1bfa579.ce0834f
-
Add exported openvino model 'openvino_model_qint8_quantized.xml'
Verified signature739bce8 -
Add new CrossEncoder model
Verified signaturedf500e5 -
Add exported onnx model 'model_qint8_avx512_vnni.onnx'
Verified signatureeeed17e -
Add exported onnx model 'model_qint8_avx512.onnx'
Verified signature96d22cf -
Add exported onnx model 'model_quint8_avx2.onnx'
Verified signaturebab1d76 -
Add exported onnx model 'model_qint8_arm64.onnx'
Verified signaturef31d79b -
Add exported onnx model 'model_O4.onnx'
Verified signature7e04a31 -
Add exported onnx model 'model_O3.onnx'
Verified signature72c7337 -
Add exported onnx model 'model_O2.onnx'
Verified signature16ca3b0 -
Add exported onnx model 'model_O1.onnx'
Verified signaturec5f2b38 -
Add new CrossEncoder model
Verified signature9cc0981
-
Push tokenizer again (#8)
Verified signature- Push tokenizer again (ea544c0d555d5dc1da5acc4dc40237fff15d928c)3941140
-
Update model metadata
Verified signaturefbf9045
-
Update README.md
Verified signature86f4be3
-
L-\d -> L\d
Verified signaturec41b396
-
Adding `safetensors` variant of this model (#1)
Verified signature- Adding `safetensors` variant of this model (f130f2b05c9b70e021b4833afe43c6993e2c7563) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>4bebbd5 -
fix with actual model name (#4)
Verified signature- fix with actual model name (cb57fa9d84c4c389f7e121cece7c52af992e1787) Co-authored-by: Venkatachalam Natchiappan <venkyyuvy@users.noreply.huggingface.co>d604262
-
Update README.md
b2cfda5
-
upload flax model
d3c87ff -
allow flax
251097b
-
up
nreimers588b01a -
upload
nreimers5ada194 -
initial commit
6efbd6a