Feature Extraction
Transformers
PyTorch
ONNX
Safetensors
sentence-transformers
sentence-similarity
mteb
custom_code
Eval Results (legacy)
Eval Results
🇪🇺 Region: EU
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, 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
Returning all hidden states
#97
by carolinmschuster - opened
Hi there,
currently the model is only returning the last hidden state when loaded with model = AutoModel.from_pretrained("jinaai/jina-embeddings-v3", output_hidden_states=True). For research purposes it would be very helpful if returning all hidden states was also supported for this model.
Best regards!
Ok I implemented this function, if you want you can take a look if this is what you wanted. We will probably merge it soon: https://huggingface.co/jinaai/xlm-roberta-flash-implementation/discussions/56
michael-guenther changed discussion status to closed