Instructions to use jinaai/jina-embeddings-v3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jinaai/jina-embeddings-v3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="jinaai/jina-embeddings-v3", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("jinaai/jina-embeddings-v3", trust_remote_code=True, device_map="auto") - sentence-transformers
How to use jinaai/jina-embeddings-v3 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("jinaai/jina-embeddings-v3", 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 not found error
While loading the model I am getting this error please guide me through this FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\Ruturaj Patil\.cache\huggingface\modules\transformers_modules\jinaai\xlm-roberta-flash-implementation\2b6bc3f30750b3a9648fe9b63448c09920efe9be\mha.py
facing same error too
same
cd .cache\huggingface\modules\transformers_modules\jinaai\xlm-roberta-flash-implementation\2b6bc3f30750b3a9648fe9b63448c09920efe9be
git clone https://huggingface.co/jinaai/xlm-roberta-flash-implementation ./
Had the same issue. Removed directory .cache\huggingface and the issue is gone now
cd .cache\huggingface\modules\transformers_modules\jinaai\xlm-roberta-flash-implementation\2b6bc3f30750b3a9648fe9b63448c09920efe9be
git clone https://huggingface.co/jinaai/xlm-roberta-flash-implementation ./
D:\premodels\modules\transformers_modules\jinaai\xlm-roberta-flash-implementation\2b6bc3f30750b3a9648fe9b63448c09920efe9be>git clone https://huggingface.co/jinaai/xlm-roberta-flash-implementation ./
fatal: destination path '.' already exists and is not an empty directory.