Instructions to use jinaai/jina-embeddings-v4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jinaai/jina-embeddings-v4 with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("jinaai/jina-embeddings-v4", trust_remote_code=True, dtype="auto") - ColPali
How to use jinaai/jina-embeddings-v4 with ColPali:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- sentence-transformers
How to use jinaai/jina-embeddings-v4 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("jinaai/jina-embeddings-v4", 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
Question about adapter choice on MTEB Retrieval (retrieval vs text-matching)
Hi Jina team, thanks a lot for releasing Jina Embeddings v4 — it’s a really impressive model.
I have a question about the adapter / task setting you used for the MTEB Retrieval evaluation.
In your technical report, Table A11: “Evaluation Results for Various Models on MTEB Retrieval Task” indicates that results on MTEB Retrieval are obtained using the text-matching adapter. This confused me a bit, because intuitively I would expect the retrieval adapter to be used for retrieval benchmarks.
To sanity-check this, I ran a small reproduction on a couple of MTEB Retrieval datasets and observed behavior that suggests the optimal adapter may differ by dataset:
FiQA: using the retrieval adapter I can reach the reported score (~47.678), while the text-matching adapter gives only ~34.3.
ArguAna: using the text-matching adapter I can reach the reported score (~67.07), while the retrieval adapter is noticeably lower.
So I’m wondering:
Did you actually run different adapters for different Retrieval datasets (even though Table A11 labels them under text-matching)?
If so, is there a recommended mapping (which Retrieval datasets should use retrieval vs text-matching)?
Or is Table A11 possibly mislabeled, and MTEB Retrieval was evaluated with the retrieval adapter (or a mixed strategy)?
Any clarification would be greatly appreciated — I’d love to make sure I’m using the intended setup correctly.
Thanks again!