Model reference · open weights
jina-embedding-s-en is an open-weight embedding model from jinaai. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | jinaai |
|---|---|
| Type | Embedding models |
| Task | Embeddings |
| Context | 512 tokens |
| Runs with | sentence-transformers |
| Released | 2023-07-06 |
| Popularity | 556 downloads / month |
| Licence | Open weights |
About
jina-embedding-s-en-v1 is a language model that has been trained using Jina AI's Linnaeus-Clean dataset.
This dataset consists of 380 million pairs of sentences, which include both query-document pairs.
These pairs were obtained from various domains and were carefully selected through a thorough cleaning process.
The Linnaeus-Full dataset, from which the Linnaeus-Clean dataset is derived, originally contained 1.6 billion sentence pairs.
The model has a range of use cases, including information retrieval, semantic textual similarity, text reranking, and more.
With a compact size of just 35 million parameters, the model enables lightning-fast inference while still delivering impressive performance. Additionally, we provide the following options:
jina-embedding-t-en-v1: 14 million parameters.jina-embedding-s-en-v1: 35 million parameters (you are here).jina-embedding-b-en-v1: 110 million parameters.jina-embedding-l-en-v1: 330 million parameters.jina-embedding-1b-en-v1: 1.2 billion parameters, 10 times bert-base (soon).jina-embedding-6b-en-v1: 6 billion parameters, 30 times bert-base (soon).Please checkout our technical blog.
We compared the model against all-minilm-l6-v2/all-mpnet-base-v2 from sbert and text-embeddings-ada-002 from OpenAI:
| Name | param | dimension |
|---|---|---|
| all-minilm-l6-v2 | 23m | 384 |
| all-mpnet-base-v2 | 110m | 768 |
| ada-embedding-002 | Unknown/OpenAI API | 1536 |
| jina-embedding-t-en-v1 | 14m | 312 |
| jina-embedding-s-en-v1 | 35m | 512 |
| jina-embedding-b-en-v1 | 110m | 768 |
| jina-embedding-l-en-v1 | 330m | 1024 |
| Name | STS12 | STS13 | STS14 | STS15 | STS16 | STS17 | TRECOVID | Quora | SciFact |
|---|---|---|---|---|---|---|---|---|---|
| all-minilm-l6-v2 | 0.724 | 0.806 | 0.756 | 0.854 | 0.79 | 0.876 | 0.473 | 0.876 | 0.645 |
| all-mpnet-base-v2 | 0.726 | 0.835 | 0.78 | 0.857 | 0.8 | 0.906 | 0.513 | 0.875 | 0.656 |
| ada-embedding-002 | 0.698 | 0.833 | 0.761 | 0.861 | 0.86 | 0.903 | 0.685 | 0.876 | 0.726 |
| jina-embedding-t-en-v1 | 0.717 | 0.773 | 0.731 | 0.829 | 0.777 | 0.860 | 0.482 | 0.840 | 0.522 |
| jina-embedding-s-en-v1 | 0.743 | 0.786 | 0.738 | 0.837 | 0.80 | 0.875 | 0.523 | 0.857 | 0.524 |
| jina-embedding-b-en-v1 | 0.751 | 0.809 | 0.761 | 0.856 | 0.812 | 0.890 | 0.606 | 0.876 | 0.594 |
| jina-embedding-l-en-v1 | 0.745 | 0.832 | 0.781 | 0.869 | 0.837 | 0.902 | 0.573 | 0.881 | 0.598 |
Use with Jina AI Finetuner
!pip install finetuner
import finetuner
model = finetuner.build_model('jinaai/jina-embedding-s-en-v1')
embeddings = finetuner.encode(
model=model,
data=['how is the weather today', 'What is the current weather like today?']
)
print(finetuner.cos_sim(embeddings[0], embeddings[1]))
Use with sentence-transformers:
from sentence_transformers import SentenceTransformer
from sentence_transformers.util import cos_sim
sentences = ['how is the weather today', 'What is the current weather like today?']
model = SentenceTransformer('jinaai/jina-embedding-s-en-v1')
embeddings = model.encode(sentences)
print(cos_sim(embeddings[0], embeddings[1]))
Please consider Finetuner.
jina-embedding-s-en-v2 is currently underway with two main objectives: improving performance and increasing the maximum sequence length.jina-embedding-s/b/l-de-v1.If you find Jina Embeddings useful in your research, please cite the following paper:
@misc{günther2023jina,
title={Jina Embeddings: A Novel Set of High-Performance Sentence Embedding Models},
author={Michael Günther and Louis Milliken and Jonathan Geuter and Georgios Mastrapas and Bo Wang and Han Xiao},
year={2023},
eprint={2307.11224},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
From the published model card. Full card on the HuggingFace links in the sidebar.
Benchmarks
As published on the model card — the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| Classification | MTEB AmazonCounterfactualClassification (en) | accuracy | 64.821 |
| Classification | MTEB AmazonCounterfactualClassification (en) | ap | 27.101 |
| Classification | MTEB AmazonCounterfactualClassification (en) | f1 | 58.335 |
| Classification | MTEB AmazonPolarityClassification | accuracy | 64.283 |
| Classification | MTEB AmazonPolarityClassification | ap | 60.351 |
| Classification | MTEB AmazonPolarityClassification | f1 | 62.063 |
| Classification | MTEB AmazonReviewsClassification (en) | accuracy | 30.624 |
| Classification | MTEB AmazonReviewsClassification (en) | f1 | 29.428 |
| Retrieval | MTEB ArguAna | map_at_1 | 22.119 |
| Retrieval | MTEB ArguAna | map_at_10 | 35.609 |
| Retrieval | MTEB ArguAna | map_at_100 | 36.935 |
| Retrieval | MTEB ArguAna | map_at_1000 | 36.957 |
| Retrieval | MTEB ArguAna | map_at_3 | 31.046 |
| Retrieval | MTEB ArguAna | map_at_5 | 33.574 |
| Retrieval | MTEB ArguAna | mrr_at_1 | 22.404 |
| Retrieval | MTEB ArguAna | mrr_at_10 | 35.695 |
| Retrieval | MTEB ArguAna | mrr_at_100 | 37.021 |
| Retrieval | MTEB ArguAna | mrr_at_1000 | 37.043 |
| Retrieval | MTEB ArguAna | mrr_at_3 | 31.093 |
| Retrieval | MTEB ArguAna | mrr_at_5 | 33.636 |
| Retrieval | MTEB ArguAna | ndcg_at_1 | 22.119 |
| Retrieval | MTEB ArguAna | ndcg_at_10 | 43.566 |
| Retrieval | MTEB ArguAna | ndcg_at_100 | 49.370 |
| Retrieval | MTEB ArguAna | ndcg_at_1000 | 49.901 |
Using it via the API
Once AxForge deploys jina-embedding-s-en for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (jina-embedding-s-en below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/embeddings \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"jina-embedding-s-en","input":"text to embed"}'
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.