Feature Extraction
sentence-transformers
Safetensors
Transformers
English
mistral
mteb
Eval Results (legacy)
text-embeddings-inference
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
getting error in transformer tokenizer
#4
by Vikash9601 - opened
Exception: data did not match any variant of untagged enum PyNormalizerTypeWrapper at line 61 column 3
I got this error when i try to run the provided code on huuging face for using of slaesforce/SFR-embedding-mistral
Hi @Vikash9601 ,
We didn't meet this issue on our end. Could you try the following package version:
torch==2.0.0
transformers>=4.31.0
Please make sure to load the model name correctly.