Instructions to use jinaai/jina-embeddings-v2-base-en with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use jinaai/jina-embeddings-v2-base-en with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("jinaai/jina-embeddings-v2-base-en", 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
Missing 1_Pooling/config.json and tokenizer.json
Amazing work!
Looking forward to see the coming large-en variant.
Just one small problem here:
I am trying to use huggingface/text-embedding-inference to test it out. But it seems to need 1_Pooling/config.json and tokenizer.json to function correctly.
Thanks! The team has really been enjoying all the feedback and we are excited for our large-en release too!
Anyways, regarding your issue:
I am not familiar with huggingface/text-embedding-inference. It might not support trust_remote_code, in which case, the model will not be loaded correctly (you will get a bunch of warnings like this).
More details in this PR:
https://huggingface.co/jinaai/jina-embeddings-v2-base-en/discussions/11
huggingface/text-embeddings-inference released their v0.3.0 which supports jina-bert model.