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 AutoModelForMultimodalLM model = AutoModelForMultimodalLM.from_pretrained("jinaai/jina-embeddings-v3", trust_remote_code=True, dtype="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
how can i realize late_chunking parameter?
hello i'am confused with late_chunking feature。in the huggingface repo, there is no keyword about late_chunking .like this https://huggingface.co/jinaai/jina-embeddings-v3 But some official blogs had instructed this parameter,like this https://jina.ai/news/late-chunking-in-long-context-embedding-models/. how can i realize this parameter throw the huggingface model?using transformer
Hey, indeed the our model code does not implement late-chunking. So you have to implement it yourself. I put some explanation here: https://huggingface.co/jinaai/jina-embeddings-v3/discussions/92#678e0cb99b2b91375e446336 and you can also take a look at the github repository we created for reproducing the late chunking experimets that we conducted for our paper: https://github.com/jina-ai/late-chunking There we also use the v3 mdoel.
thank u very much i have realized the feature with transformer.