Text Ranking
sentence-transformers
PyTorch
JAX
ONNX
Safetensors
OpenVINO
Transformers
English
bert
text-classification
text-embeddings-inference
Instructions to use cross-encoder/ms-marco-TinyBERT-L2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use cross-encoder/ms-marco-TinyBERT-L2 with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("cross-encoder/ms-marco-TinyBERT-L2") 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-TinyBERT-L2 with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("cross-encoder/ms-marco-TinyBERT-L2") model = AutoModelForSequenceClassification.from_pretrained("cross-encoder/ms-marco-TinyBERT-L2") - Notebooks
- Google Colab
- Kaggle
Commit History
Revert inadvertent config, tokenizer updates ed629aa
Tom Aarsen commited on
Add exported openvino model 'openvino_model_qint8_quantized.xml' 4af3341 verified
Add new CrossEncoder model b5c7e5e verified
Add exported onnx model 'model_qint8_avx512_vnni.onnx' 6c0a596 verified
Add exported onnx model 'model_qint8_avx512.onnx' 2a80079 verified
Add exported onnx model 'model_quint8_avx2.onnx' fd22621 verified
Add exported onnx model 'model_qint8_arm64.onnx' c60734f verified
Add exported onnx model 'model_O4.onnx' cce0729 verified
Add exported onnx model 'model_O3.onnx' fd66467 verified
Add exported onnx model 'model_O2.onnx' f61a476 verified
Add exported onnx model 'model_O1.onnx' a895f92 verified
Add new CrossEncoder model 0f14cfa verified
Add link to v2 model 09b0ed5 verified
Update model metadata 522ffbc verified
Update README.md b2509b8 verified
Update README.md c4379fe verified
L-\d -> L\d 8bf1a30 verified
Adding `safetensors` variant of this model (#1) 95cc886 verified
Update README.md e9ed047
upload flax model 33b6f71
allow flax dd98073
up e81a587
nreimers commited on
upload d87548d
nreimers commited on