Instructions to use sentence-transformers/multi-qa-mpnet-base-dot-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use sentence-transformers/multi-qa-mpnet-base-dot-v1 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("sentence-transformers/multi-qa-mpnet-base-dot-v1") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use sentence-transformers/multi-qa-mpnet-base-dot-v1 with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/multi-qa-mpnet-base-dot-v1") model = AutoModelForMaskedLM.from_pretrained("sentence-transformers/multi-qa-mpnet-base-dot-v1") - Inference
- Notebooks
- Google Colab
- Kaggle
Is this model multilingual?
Hi there, I was wondering whether this model works well for multilingual semantic search.
Thank you.
Giorgio
We have the same concern +1
Depends on the language, I haven't had great success. Only potential solution which has increased recall rate for me is translating the source to english using Google's AJAX api.
It works well for German.
Doesn't seem to perform very well on Thai
Seem to work in French
Seems to work good in Italian
To the best of my knowledge, both the pretrained model and the finetuning dataset are English only. In short, the model is intended to be used for English texts, but that does not imply that it cannot generalize to other languages per se. I'll close this for now, but let me know if there's additional questions.