Feature Extraction
Transformers
Safetensors
sentence-transformers
mistral_contrastive
video-text-retrieval
text-to-video-retrieval
image-text-retrieval
zero-shot-classification
contrastive
embeddings
multilingual
custom_code
Instructions to use mistralai/Mistral-Multimodal-Embed-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mistralai/Mistral-Multimodal-Embed-1B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="mistralai/Mistral-Multimodal-Embed-1B", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mistralai/Mistral-Multimodal-Embed-1B", trust_remote_code=True, device_map="auto") - sentence-transformers
How to use mistralai/Mistral-Multimodal-Embed-1B with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mistralai/Mistral-Multimodal-Embed-1B", 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 size: 191 Bytes
06ba5d8 | 1 2 3 4 5 6 7 8 | {
"auto_map": {
"AutoImageProcessor": "image_processing_mistral_contrastive.MistralContrastiveImageProcessor"
},
"size": 448,
"transform": "keep_ratio",
"use_cv2_resize": true
} |