AI SeedbankHelp preserve open and free AI for humanity's future

← All models

sentence-transformers_multi-qa-mpnet-base-dot-v1

sentence-transformers · View on Hugging Face ↗

Get this model

Download TorrentMagnet Link

Seeders: · Leechers:

Model card

The complete upstream card, rendered from this payload's README.md — the same hash-verified bytes the torrent distributes. Images and off-site links are removed; the original card on Hugging Face carries them.


language:

  • en library_name: sentence-transformers tags:
  • sentence-transformers
  • feature-extraction
  • sentence-similarity
  • transformers
  • text-embeddings-inference datasets:
  • flax-sentence-embeddings/stackexchange_xml
  • ms_marco
  • gooaq
  • yahoo_answers_topics
  • search_qa
  • eli5
  • natural_questions
  • trivia_qa
  • embedding-data/QQP
  • embedding-data/PAQ_pairs
  • embedding-data/Amazon-QA
  • embedding-data/WikiAnswers pipeline_tag: sentence-similarity

multi-qa-mpnet-base-dot-v1

This is a sentence-transformers model: It maps sentences & paragraphs to a 768 dimensional dense vector space and was designed for semantic search. It has been trained on 215M (question, answer) pairs from diverse sources. For an introduction to semantic search, have a look at: SBERT.net - Semantic Search

Usage (Sentence-Transformers)

Using this model becomes easy when you have sentence-transformers installed:

pip install -U sentence-transformers

Then you can use the model like this:

from sentence_transformers import SentenceTransformer, util

query = "How many people live in London?"
docs = ["Around 9 Million people live in London", "London is known for its financial district"]

# Load the model
model = SentenceTransformer('sentence-transformers/multi-qa-mpnet-base-dot-v1')

# Encode query and documents
query_emb = model.encode(query)
doc_emb = model.encode(docs)

# Compute dot score between query and all document embeddings
scores = util.dot_score(query_emb, doc_emb)[0].cpu().tolist()

# Combine docs & scores
doc_score_pairs = list(zip(docs, scores))

# Sort by decreasing score
doc_score_pairs = sorted(doc_score_pairs, key=lambda x: x[1], reverse=True)

# Output passages & scores
for doc, score in doc_score_pairs:
    print(score, doc)

Usage (HuggingFace Transformers)

Without sentence-transformers, you can use the model like this: First, you pass your input through the transformer model, then you have to apply the correct pooling-operation on-top of the contextualized word embeddings.

from transformers import AutoTokenizer, AutoModel
import torch

# CLS Pooling - Take output from first token
def cls_pooling(model_output):
    return model_output.last_hidden_state[:,0]

# Encode text
def encode(texts):
    # Tokenize sentences
    encoded_input = tokenizer(texts, padding=True, truncation=True, return_tensors='pt')

    # Compute token embeddings
    with torch.no_grad():
        model_output = model(**encoded_input, return_dict=True)

    # Perform pooling
    embeddings = cls_pooling(model_output)

    return embeddings


# Sentences we want sentence embeddings for
query = "How many people live in London?"
docs = ["Around 9 Million people live in London", "London is known for its financial district"]

# Load model from HuggingFace Hub
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/multi-qa-mpnet-base-dot-v1")
model = AutoModel.from_pretrained("sentence-transformers/multi-qa-mpnet-base-dot-v1")

# Encode query and docs
query_emb = encode(query)
doc_emb = encode(docs)

# Compute dot score between query and all document embeddings
scores = torch.mm(query_emb, doc_emb.transpose(0, 1))[0].cpu().tolist()

# Combine docs & scores
doc_score_pairs = list(zip(docs, scores))

# Sort by decreasing score
doc_score_pairs = sorted(doc_score_pairs, key=lambda x: x[1], reverse=True)

# Output passages & scores
for doc, score in doc_score_pairs:
    print(score, doc)

Usage (Text Embeddings Inference (TEI))

Text Embeddings Inference (TEI) is a blazing fast inference solution for text embedding models.

  • CPU:
docker run -p 8080:80 -v hf_cache:/data --pull always ghcr.io/huggingface/text-embeddings-inference:cpu-latest \
  --model-id sentence-transformers/multi-qa-mpnet-base-dot-v1 \
  --pooling cls \
  --dtype float16
  • NVIDIA GPU:
docker run --gpus all -p 8080:80 -v hf_cache:/data --pull always ghcr.io/huggingface/text-embeddings-inference:cuda-latest \
  --model-id sentence-transformers/multi-qa-mpnet-base-dot-v1 \
  --pooling cls \
  --dtype float16

Send a request to /v1/embeddings to generate embeddings via the OpenAI Embeddings API:

curl http://localhost:8080/v1/embeddings \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sentence-transformers/multi-qa-mpnet-base-dot-v1",
    "input": "How many people live in London?"
  }'

Or check the Text Embeddings Inference API specification instead.


Technical Details

In the following some technical details how this model must be used:

Setting Value
Dimensions 768
Produces normalized embeddings No
Pooling-Method CLS pooling
Suitable score functions dot-product (e.g. util.dot_score)

Background

The project aims to train sentence embedding models on very large sentence level datasets using a self-supervised contrastive learning objective. We use a contrastive learning objective: given a sentence from the pair, the model should predict which out of a set of randomly sampled other sentences, was actually paired with it in our dataset.

We developed this model during the Community week using JAX/Flax for NLP & CV, organized by Hugging Face. We developed this model as part of the project: Train the Best Sentence Embedding Model Ever with 1B Training Pairs. We benefited from efficient hardware infrastructure to run the project: 7 TPUs v3-8, as well as intervention from Google's Flax, JAX, and Cloud team members about efficient deep learning frameworks.

Intended uses

Our model is intended to be used for semantic search: It encodes queries / questions and text paragraphs in a dense vector space. It finds relevant documents for the given passages.

Note that there is a limit of 512 word pieces: Text longer than that will be truncated. Further note that the model was just trained on input text up to 250 word pieces. It might not work well for longer text.

Training procedure

The full training script is accessible in this current repository: train_script.py.

Pre-training

We use the pretrained mpnet-base model. Please refer to the model card for more detailed information about the pre-training procedure.

Training

We use the concatenation from multiple datasets to fine-tune our model. In total we have about 215M (question, answer) pairs. We sampled each dataset given a weighted probability which configuration is detailed in the data_config.json file.

The model was trained with MultipleNegativesRankingLoss using CLS-pooling, dot-product as similarity function, and a scale of 1.

Dataset Number of training tuples
WikiAnswers Duplicate question pairs from WikiAnswers 77,427,422
PAQ Automatically generated (Question, Paragraph) pairs for each paragraph in Wikipedia 64,371,441
Stack Exchange (Title, Body) pairs from all StackExchanges 25,316,456
Stack Exchange (Title, Answer) pairs from all StackExchanges 21,396,559
MS MARCO Triplets (query, answer, hard_negative) for 500k queries from Bing search engine 17,579,773
GOOAQ: Open Question Answering with Diverse Answer Types (query, answer) pairs for 3M Google queries and Google featured snippet 3,012,496
Amazon-QA (Question, Answer) pairs from Amazon product pages 2,448,839
Yahoo Answers (Title, Answer) pairs from Yahoo Answers 1,198,260
Yahoo Answers (Question, Answer) pairs from Yahoo Answers 681,164
Yahoo Answers (Title, Question) pairs from Yahoo Answers 659,896
SearchQA (Question, Answer) pairs for 140k questions, each with Top5 Google snippets on that question 582,261
ELI5 (Question, Answer) pairs from Reddit ELI5 (explainlikeimfive) 325,475
Stack Exchange Duplicate questions pairs (titles) 304,525
Quora Question Triplets (Question, Duplicate_Question, Hard_Negative) triplets for Quora Questions Pairs dataset 103,663
Natural Questions (NQ) (Question, Paragraph) pairs for 100k real Google queries with relevant Wikipedia paragraph 100,231
SQuAD2.0 (Question, Paragraph) pairs from SQuAD2.0 dataset 87,599
TriviaQA (Question, Evidence) pairs 73,346
Total 214,988,242

Magnet link

Opens the swarm directly in your torrent client — no file download needed. Copy-paste works too:

magnet:?xt=urn:btih:6525b5718b4a9fbaefb6d04fd4aeea0773656853&dn=sentence-transformers_multi-qa-mpnet-base-dot-v1

Open magnet in torrent client · infohash 6525b5718b4a9fbaefb6d04fd4aeea0773656853

Files & hashes

PathSizesha1sha256
1_Pooling/config.json190 B (190 B)da5bfd57e34ca45582e4bdbaa3e6deb9efffa08dc9bef85e8bbf4b2eab4941b3fb62bd33f88686748b478f2e264d256472d9643b
README.md9.7 KB (9,946 B)336f609ea8da240f19d118fcc6c45b4c7de25fd0904a407141d81b13888f75322c9815bb82efa57d101494b5e914c562e0b6c017
config.json571 B (571 B)b9fd4298819da011007a6a4ceb728c860914fc88d46a3e04ded82bba22528424480697d394eeda6a27484e08c5bb2bdf5906cfa0
config_sentence_transformers.json212 B (212 B)603924ec712207f1bf1635f26ceef820b3bfc4e2a0bd26d1ab4b225b2caefc40bef21c2a6e3e57da466df01a85f56d0dd9acc071
data_config.json24.9 KB (25,457 B)a3294881c9834ac6fb99d420008f30b741fe7e86163295fe27834a12a37d9ef1a6175a6c1c530a48ee42b640149b518e0bedae62
model.safetensors417.7 MB (437,971,872 B)6fa2cf7082964d43448abc3949aa5768666979f6d0338d7385e2717ca4eddb7bbec3b9950d3b8dff47dedef0ad556d1c314076bf
modules.json229 B (229 B)f7640f94e81bb7f4f04daf1668850b38763a13d98f4b264b80206c830bebbdcae377e137925650a433b689343a63bdc9b3145460
openvino/openvino_model.bin415.4 MB (435,583,684 B)06c9b03b8c7e486366e914fcb3ff84a3e657ce012a0cd47f057c45d290a0ddae22e580255ef24ea1cb01300803da5eed110beaa5
openvino/openvino_model.xml422.2 KB (432,342 B)7a7384f43c3c46a825b02d4fbac3d6963391e8c363b6dbdca206773ec92caa0f28d28d4f12d43fc4494c9d3c29303073001735c7
openvino/openvino_model_qint8_quantized.bin104.9 MB (109,974,792 B)7a4cb8214d36a96f1c8caaf8dbfe8c90dba128f0365a9b02c7036689710901b6ddb4f26d39c317966d1e41dc95a469f23b53da30
openvino/openvino_model_qint8_quantized.xml724.1 KB (741,445 B)74e1ddb47e35213e2a6598525a0665d986651213d75ce00244236f69b4abcf2c8b678e5872399288bbbe59431e32ca97fcc1762d
pytorch_model.bin417.7 MB (438,011,953 B)e58264addade65103fa69de41c80b6bd813244af9e1e76b7a067f72e49c7f571cd8e811f7a1567bec49f17e5eaaea899e7bc2c9e
sentence_bert_config.json53 B (53 B)f789d99277496b282d19020415c5ba9ca79ac875ec8e29d6dcb61b611b7d3fdd2982c4524e6ad985959fa7194eacfb655a8d0d51
special_tokens_map.json239 B (239 B)378d4fa393d5eaccf69c437a20f1cda6ac65c14d9ef40e9c160511bf3f46ceb71f1471dafa1e9473d5120bb816c36b2efa75f8ba
tokenizer.json455.1 KB (466,021 B)99ab0363136b2901455b583971ad62829c311cfe0930eac956e241b04141ce21b990a5d818feb3be3c559357a4ef5cf261d086ce
tokenizer_config.json363 B (363 B)20ae1276042f43d1c80f4f7b7f084a8704592c1d67f2ff7e223518e729869bb3a70f0caf8368fe549383fc11cfe2dfb42fffc268
train_script.py13.6 KB (13,898 B)a2664ed3d9b29e800c50c3abd613e17e187c5bafd92a1322be389cb6fb0c999030c7354837eed74445a9926ca8f6f83099a7dc97
vocab.txt226.1 KB (231,536 B)1c51ab79a2298a340952d3e6012042a9c84bbe4ddbd90cb94e2247bd4d4ccaecbf616d2290e66691d7d5e5bb81f063c2d0649ada

Cite this release

Canonical URL
https://aiseedbank.org/models/sentence-transformers_multi-qa-mpnet-base-dot-v1/
Slug
sentence-transformers_multi-qa-mpnet-base-dot-v1
Infohash
6525b5718b4a9fbaefb6d04fd4aeea0773656853
License
no license recorded
Signing key fingerprint
85a3b32c3712427b

Every file carries a locally computed sha256 — verify a download against the signed sums: sentence-transformers_multi-qa-mpnet-base-dot-v1.SHA256SUMS (+ minisign signature).

Provenance

Upstream repositorysentence-transformers/multi-qa-mpnet-base-dot-v1
Revision (pinned)17997f24dca0df1a4fed68894fb0e1e133e60482
Fetched at2026-09-04T05:37:33Z
License at fetchno license recorded
Snapshot toolhuggingface · seedbank 0.1.0

Trackers

✓ verified · rehash-vs-hf-metadata at 2026-09-04T05:37:48Z

no license recorded1.33 GB (1,423,464,803 bytes)sentence-transformerspytorchonnxsafetensorsopenvinompnetfill-maskfeature-extractionsentence-similaritytransformerstext-embeddings-inferenceendpoints_compatible1 language (en)