Feature Extraction
Transformers
Safetensors
sentence-transformers
mistral_contrastive
brevitech
mirror
video-text-retrieval
text-to-video-retrieval
image-text-retrieval
zero-shot-classification
contrastive
embeddings
multilingual
custom_code
Instructions to use brevitech/Mistral-Multimodal-Embed-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use brevitech/Mistral-Multimodal-Embed-1B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="brevitech/Mistral-Multimodal-Embed-1B", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("brevitech/Mistral-Multimodal-Embed-1B", trust_remote_code=True, device_map="auto") - sentence-transformers
How to use brevitech/Mistral-Multimodal-Embed-1B with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("brevitech/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: 1,100 Bytes
08d2a21 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | {
"auto_map": {
"AutoConfig": "configuration_mistral_contrastive.MistralContrastiveConfig",
"AutoImageProcessor": "image_processing_mistral_contrastive.MistralContrastiveImageProcessor",
"AutoModel": "modeling_mistral_contrastive.MistralContrastiveModel"
},
"eos_token_id": 2,
"ln_pre": true,
"logit_scale_init": 2.659260036932778,
"model_type": "mistral_contrastive",
"num_channels": 3,
"patch_size": 14,
"projection_dim": 1024,
"spatial_merge_size": 2,
"temporal_mlp_ratio": 4,
"temporal_num_attention_heads": 8,
"temporal_num_hidden_layers": 4,
"temporal_rope_theta": 10000.0,
"text_dim": 1792,
"text_head_dim": 128,
"text_intermediate_size": 4864,
"text_norm_eps": 1e-05,
"text_num_attention_heads": 14,
"text_num_hidden_layers": 14,
"text_rope_theta": 1000000.0,
"text_vocab_size": 131072,
"transformers_version": "5.8.0",
"vision_dim": 1024,
"vision_head_dim": 128,
"vision_intermediate_size": 4096,
"vision_norm_eps": 1e-05,
"vision_num_attention_heads": 8,
"vision_num_hidden_layers": 24,
"vision_rope_theta": 10000.0
}
|