TL;DR: A 598M-parameter dense embedding model trained without any labeled data that ranks #1 among single-vector dense models under 1B parameters on the MTEB BEIR benchmark (58.37 average NDCG@10 over 15 tasks) and #2 among models under 1B parameters on MTEB(eng, v2) (73.76 Mean (Task)), within 1.5 points of the nearly 13x larger Qwen3-Embedding-8B.
We introduce opensearch-neural-embed-v1, the first open source dense embedding model trained by OpenSearch Project. OpenSearch supports dense vector search with k-NN indexes. The indexing and search can be performed with the OpenSearch high-level API.
| Model | Model Parameters | Embedding Dimension | BEIR-15 AVG NDCG@10 (MTEB) | MTEB(eng, v2) Mean (Task) |
|---|---|---|---|---|
| opensearch-neural-embed-v1 | 598M | 2048 | 58.37 | 73.76 |
opensearch-neural-embed-v1 is a dense (single-vector) text-embedding model for English. It encodes queries and documents independently into 2048-dimensional, L2-normalized vectors, and relevance is their cosine similarity (equivalently, their inner product).
We initialize the student model with Qwen3-Embedding-0.6B and we distill two strong embedding models, which excel at retrieval and text similarity, into a small student embedding model. We train the student to learn a 2048-dimensional teacher space, built by concatenating the leading 1024 dimensions of each teacher's embedding.
Training proceeds in two stages, with objectives that each transfer a different aspect of the teachers' knowledge:
The whole pipeline needs no labeled data: training uses only about 17M unlabeled English texts and the teachers' embeddings, with no relevance labels, no hard-negative mining and no contrastive retrieval fine-tuning. Notably, it:
Scores for this model are from our own evaluation; scores for the other models come from the MTEB leaderboard or their model cards (see Detailed Search Relevance).
Instruct: {task description}\nQuery: for queries; no prompt for documentsFirst install the Sentence Transformers library:
pip install -U sentence-transformers
Then you can load this model and run inference. Queries use an instruction prompt; documents are encoded without a prompt.
from sentence_transformers import SentenceTransformer
# Download from the huggingface Hub
model = SentenceTransformer("opensearch-project/opensearch-neural-embed-v1")
queries = ["What's the weather in ny now?", "how many ounces is one u.s. dry pint"]
documents = [
"Currently New York is rainy.",
"One US dry pint equals about 18.6 US fluid ounces.",
"The Eiffel Tower is located in Paris.",
]
# encode_query applies the default query prompt:
# "Instruct: Given a web search query, retrieve relevant passages that answer the query\nQuery:"
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape)
# (2, 2048)
similarity = model.similarity(query_embeddings, document_embeddings)
print(similarity)
# tensor([[0.7344, 0.2696, 0.2185],
# [0.2891, 0.8442, 0.1954]])
For a specific task you can replace the default query instruction with a task description in the same format:
query_embeddings = model.encode(
["vitamin D reduces the risk of influenza"],
prompt="Instruct: Given a scientific claim, retrieve documents that support or refute the claim\nQuery:",
)
The model can also be used with the transformers library: mean-pool the last hidden states, apply the 1024 --> 2048 projection stored in 2_Dense/, then L2-normalize.
import torch
import torch.nn.functional as F
from huggingface_hub import hf_hub_download
from safetensors.torch import load_file
from transformers import AutoModel, AutoTokenizer
repo = "opensearch-project/opensearch-neural-embed-v1"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModel.from_pretrained(repo).eval()
dense = load_file(hf_hub_download(repo, "2_Dense/model.safetensors"))
query_prompt = "Instruct: Given a web search query, retrieve relevant passages that answer the query\nQuery:"
def embed(texts):
batch = tokenizer(texts, padding=True, truncation=True, max_length=8192, return_tensors="pt")
with torch.no_grad():
hidden = model(**batch).last_hidden_state
mask = batch["attention_mask"].unsqueeze(-1).to(hidden.dtype)
pooled = (hidden * mask).sum(1) / mask.sum(1) # mean pooling
return F.normalize(pooled @ dense["linear.weight"].T + dense["linear.bias"], dim=-1)
queries = ["What's the weather in ny now?", "how many ounces is one u.s. dry pint"]
documents = [
"Currently New York is rainy.",
"One US dry pint equals about 18.6 US fluid ounces.",
"The Eiffel Tower is located in Paris.",
]
query_embeddings = embed([query_prompt + q for q in queries])
document_embeddings = embed(documents)
print(query_embeddings @ document_embeddings.T)
# tensor([[0.7344, 0.2696, 0.2185],
# [0.2891, 0.8442, 0.1954]])
Scores from the MTEB BEIR benchmark (15 tasks, MS MARCO on the dev split), for single-vector dense models under 1B parameters.
| Model | Parameters | Average | ArguAna | Climate FEVER | CQADupStack | DBPedia | FEVER | FiQA | HotpotQA | MS MARCO | NFCorpus | NQ | Quora | SCIDOCS | SciFact | Trec Covid | Touche |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| opensearch-neural-embed-v1 | 598M | 58.37 | 65.3 | 45.7 | 42.8 | 44.3 | 90.9 | 52.8 | 71.9 | 42.4 | 37.2 | 59.9 | 89.3 | 28.3 | 76.2 | 92.0 | 36.6 |
| stella_en_400M_v5 | 435M | 57.86 | 60.9 | 43.5 | 41.5 | 49.9 | 91.0 | 56.1 | 71.7 | 43.7 | 41.5 | 69.1 | 89.6 | 23.2 | 78.2 | 76.6 | 31.5 |
| jina-embeddings-v5-text-small | 596M | 56.67 | 65.1 | 41.5 | 46.7 | 44.4 | 90.0 | 49.6 | 69.8 | 42.1 | 39.8 | 64.0 | 89.1 | 23.0 | 76.5 | 78.5 | 29.9 |
| Qwen3-Embedding-0.6B | 596M | 55.52 | 71.0 | 42.1 | 46.0 | 39.5 | 88.1 | 46.6 | 65.7 | 38.0 | 36.7 | 53.5 | 87.8 | 24.4 | 69.7 | 90.5 | 33.2 |
| snowflake-arctic-embed-l-v2.0 | 568M | 55.22 | 59.1 | 41.8 | 45.9 | 43.4 | 91.5 | 45.3 | 68.1 | 44.9 | 35.1 | 63.7 | 88.8 | 20.3 | 70.9 | 83.6 | 25.9 |
| Model | Parameters | Mean (Task) | Mean (Type) | Classification | Clustering | PairClassification | Reranking | Retrieval | STS | Summarization |
|---|---|---|---|---|---|---|---|---|---|---|
| Jasper-Token-Compression-600M | 607M | 74.75 | 68.46 | 90.35 | 59.44 | 90.15 | 50.61 | 66.19 | 88.79 | 33.66 |
| opensearch-neural-embed-v1 | 598M | 73.76 | 67.72 | 90.41 | 59.02 | 89.07 | 50.51 | 63.06 | 88.50 | 33.51 |
| jina-embeddings-v5-text-small | 596M | 71.78 | 65.68 | 90.75 | 54.69 | 84.95 | 49.38 | 60.07 | 88.13 | 31.77 |
| Yuan-embedding-2.0-en | 596M | 71.74 | 65.22 | 84.35 | 51.70 | 81.96 | 53.27 | 70.69 | 84.89 | 29.71 |
| Qwen3-Embedding-0.6B | 596M | 70.47 | 64.72 | 84.58 | 54.05 | 84.37 | 48.18 | 61.83 | 86.57 | 33.43 |
| stella_en_400M_v5 | 435M | 69.39 | 64.84 | 88.25 | 57.65 | 87.17 | 49.60 | 52.73 | 83.93 | 34.53 |
| snowflake-arctic-embed-l-v2.0 | 568M | 63.60 | 59.81 | 73.36 | 44.37 | 82.99 | 47.47 | 58.56 | 78.05 | 33.83 |
The distillation objectives are inspired by Jasper and Stella: distillation of SOTA embedding models.
This project is licensed under the Apache v2.0 License.
Copyright OpenSearch Contributors. See NOTICE for details.
model.safetensors 2.4 GB2_Dense/model.safetensors 8 MBQwen/Qwen3-Embedding-0.6B