Text Classification
Transformers
Safetensors
sentence-transformers
multilingual
qwen2_vl
image-feature-extraction
vidore
reranker
custom_code
🇪🇺 Region: EU
Instructions to use jinaai/jina-reranker-m0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jinaai/jina-reranker-m0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="jinaai/jina-reranker-m0", trust_remote_code=True)# Load model directly from transformers import AutoProcessor, AutoModel processor = AutoProcessor.from_pretrained("jinaai/jina-reranker-m0", trust_remote_code=True) model = AutoModel.from_pretrained("jinaai/jina-reranker-m0", trust_remote_code=True) - sentence-transformers
How to use jinaai/jina-reranker-m0 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("jinaai/jina-reranker-m0", trust_remote_code=True) sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
File too large to display, you can check the raw version instead.