Instructions to use Salesforce/SFR-Embedding-Mistral with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Salesforce/SFR-Embedding-Mistral with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Salesforce/SFR-Embedding-Mistral") 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] - Transformers
How to use Salesforce/SFR-Embedding-Mistral with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Salesforce/SFR-Embedding-Mistral")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("Salesforce/SFR-Embedding-Mistral") model = AutoModel.from_pretrained("Salesforce/SFR-Embedding-Mistral") - Notebooks
- Google Colab
- Kaggle
Mistral model embeddings?
I would like to play around with the embeddings produced by the Mistral model on standard datasets like those in MTEB. Are these embeddings available somewhere? They must have been computed to produce the eval results. Unfortunately running many inferences on the model is out of my budget.
Hi @SandeepSilwal ,
Unfortunately, we haven't planned to release the Mistral model embeddings due to their large size. We understand this might be inconvenient for those with budget constraints for running inferences. We recommend you explore smaller subsets of MTEB like classification, STS et al tasks to verify the performance.