alt.freeweights.embed / all-mpnet-base-v1
From: sentence-transformers <huggingface.co/sentence-transformers>Newsgroups: alt.freeweights.embedSubject:

all-mpnet-base-v1

Date: 2026-11-15Commit: 3958fb5Signed: 2DC28CC7B26A283B ✓

Sentence similarity model with 109M parameters. Onnx and openvino and safetensors weights, 3.82 GB in all. Published by sentence-transformers under Apache-2.0.

109M params3.82GBall-mpnet-base-v1onnx openvino safetensorspermissive
FactsParams109MSize3.82 GBFormatsonnx, openvino, safetensorsTasksentence similarityLicenseApache-2.0From sourcepermissive
$ fw get sentence-transformers/all-mpnet-base-v1
# manifest sha256 c829e2df3a6d… · 3.82 GB · 28 files
$ fw verify ./all-mpnet-base-v1 sentence-transformers/all-mpnet-base-v1
From sourceHosted (signed)sentence-transformers/all-mpnet-base-v1Last check: 2026-11-15 03:37 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Evaluate with

Overview

Size
3.82 GB
Weights
438 MB (safetensors)
Parameters
109M
Formats
onnx, openvino, safetensors
Task
sentence similarity
License
Apache-2.0 (permissive)
Files
28, each with a sha256
Publisher
sentence-transformers
Added
2026-11-15
Section
alt.freeweights.embed
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 03:37 UTCpassed

Model card

From the publisher at commit 3958fb5. Shown as plain text with links; images open at the publisher.

all-mpnet-base-v1#

This is a sentence-transformers model: It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or 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
sentences = ["This is an example sentence", "Each sentence is converted"]

model = SentenceTransformer('sentence-transformers/all-mpnet-base-v1')
embeddings = model.encode(sentences)
print(embeddings)

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 right pooling-operation on-top of the contextualized word embeddings.

from transformers import AutoTokenizer, AutoModel
import torch
import torch.nn.functional as F

#Mean Pooling - Take attention mask into account for correct averaging
def mean_pooling(model_output, attention_mask):
    token_embeddings = model_output[0] #First element of model_output contains all token embeddings
    input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float()
    return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9)


# Sentences we want sentence embeddings for
sentences = ['This is an example sentence', 'Each sentence is converted']

# Load model from HuggingFace Hub
tokenizer = AutoTokenizer.from_pretrained('sentence-transformers/all-mpnet-base-v1')
model = AutoModel.from_pretrained('sentence-transformers/all-mpnet-base-v1')

# Tokenize sentences
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')

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

# Perform pooling
sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask'])

# Normalize embeddings
sentence_embeddings = F.normalize(sentence_embeddings, p=2, dim=1)

print("Sentence embeddings:")
print(sentence_embeddings)

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/all-mpnet-base-v1 --pooling mean --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/all-mpnet-base-v1 --pooling mean --dtype float16

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

curl http://localhost:8080/v1/embeddings \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sentence-transformers/all-mpnet-base-v1",
    "input": ["This is an example sentence", "Each sentence is converted"]
  }'

Or check the Text Embeddings Inference API specification instead.


Background#

The project aims to train sentence embedding models on very large sentence level datasets using a self-supervised contrastive learning objective. We used the pretrained microsoft/mpnet-base model and fine-tuned in on a 1B sentence pairs dataset. 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 as a sentence and short paragraph encoder. Given an input text, it outputs a vector which captures the semantic information. The sentence vector may be used for information retrieval, clustering or sentence similarity tasks.

By default, input text longer than 128 word pieces is truncated.

Training procedure#

Pre-training#

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

Fine-tuning#

We fine-tune the model using a contrastive objective. Formally, we compute the cosine similarity from each possible sentence pairs from the batch. We then apply the cross entropy loss by comparing with true pairs.

Hyperparameters#

We trained our model on a TPU v3-8. We train the model during 920k steps using a batch size of 512 (64 per TPU core). We use a learning rate warm up of 500. The sequence length was limited to 128 tokens. We used the AdamW optimizer with a 2e-5 learning rate. The full training script is accessible in this current repository: train_script.py.

Training data#

We use the concatenation from multiple datasets to fine-tune our model. The total number of sentence pairs is above 1 billion sentences. We sampled each dataset given a weighted probability which configuration is detailed in the data_config.json file.

DatasetPaperNumber of training tuples
Reddit comments (2015-2018)paper726,484,430
S2ORC Citation pairs (Abstracts)paper116,288,806
WikiAnswers Duplicate question pairspaper77,427,422
PAQ (Question, Answer) pairspaper64,371,441
S2ORC Citation pairs (Titles)paper52,603,982
S2ORC (Title, Abstract)paper41,769,185
Stack Exchange (Title, Body) pairs-25,316,456
MS MARCO tripletspaper9,144,553
GOOAQ: Open Question Answering with Diverse Answer Typespaper3,012,496
Yahoo Answers (Title, Answer)paper1,198,260
Code Search-1,151,414
COCO Image captionspaper828,395
SPECTER citation tripletspaper684,100
Yahoo Answers (Question, Answer)paper681,164
Yahoo Answers (Title, Question)paper659,896
SearchQApaper582,261
Eli5paper325,475
Flickr 30kpaper317,695
Stack Exchange Duplicate questions (titles)304,525
AllNLI (SNLI and MultiNLI)paper SNLI, paper MultiNLI277,230
Stack Exchange Duplicate questions (bodies)250,519
Stack Exchange Duplicate questions (titles+bodies)250,460
Sentence Compressionpaper180,000
Wikihowpaper128,542
Altlexpaper112,696
Quora Question Triplets-103,663
Simple Wikipediapaper102,225
Natural Questions (NQ)paper100,231
SQuAD2.0paper87,599
TriviaQA-73,346
Total1,124,818,467

Files

28 files · 3.82 GBWeights 438 MB (safetensors). Sizes and sha256 from the signed manifest.
Show all 28 files with their sha256
FileSizesha256
.gitattributes791 Beedaa232843a5fee706aa818a601221bf17acb6c304888d1f69c04725e03ebb7
1_Pooling/config.json190 Ba37f83ada23e7887be6b88f4998927dbeac0038af301553c7cd5461413bf1a56
README.md11.0 KBdee25b09b20484327e5e12d303efde824fb0cf1a9624a924ca6611beb4b2910b
config.json591 B9f68a94c3e08b46fefc9fe790658400085681c48065a91f7fedb58794ff84df1
config_sentence_transformers.json116 B061ca9d39661d6c6d6de5ba27f79a1cd5770ea247f8d46412a68a498dc5ac9f3
data_config.json15.7 KB2ba682c372ee7ac37d519df39571ec0543f55ae31273844be05f8a5acdf92e2a
model.safetensors438 MBfe3fc5248610ed8c279c12d6d2b39096ca561a4466ae7c28120907d76b3490c1
modules.json349 B84e40c8e006c9b1d6c122e02cba9b02458120b5fb0c87b746c41e0207cf642cf
onnx/model.onnx436 MBd19f08fdc6bc1167579632d7abf4245aa585481a3fe56244d0881b5ceb8abb3f
onnx/model_O1.onnx436 MB1931b467c3be6f8a18a3a49ea8200666a1d3bcfeb25623262af729de702a2a8a
onnx/model_O2.onnx436 MBe1ad0ba062414dbcb00f976301e8d075eaa121a84e79d9c967105c374937fab2
onnx/model_O3.onnx436 MBcd736b6c2d5155604abc3a0d75d1e189ac3ebb52742721ab767568095a10b340
onnx/model_O4.onnx218 MB4d27a1eba3e675dcdc92fb98814d22d0c539ff3b0d6d956001de8f927d9b1bd4
onnx/model_qint8_arm64.onnx110 MB5bc4a4496698dc2ab3870a13643a4f89bb0dfa6bed19a1e8cfa6b712f2c436b8
onnx/model_qint8_avx512.onnx110 MB5bc4a4496698dc2ab3870a13643a4f89bb0dfa6bed19a1e8cfa6b712f2c436b8
onnx/model_qint8_avx512_vnni.onnx110 MB5bc4a4496698dc2ab3870a13643a4f89bb0dfa6bed19a1e8cfa6b712f2c436b8
onnx/model_quint8_avx2.onnx110 MB0961f660b1b49816f0fc102651e89554eff5e1373d6575003a3a82fcc7496d3b
openvino/openvino_model.bin436 MBd2af7433327ca44c114b6703dafa88e1ee273bb71f1cf923e761acc9c0d5a110
openvino/openvino_model.xml433 KB8a7d8f9a8df0bcc42af50f31d43d86c4ba7ff144cc6e81addc88aa79a79dc406
openvino/openvino_model_qint8_quantized.bin110 MBca996d7022d4004c52c022258595958fb3e12f23a2dc46bf73eaac76dd25a0a0
openvino/openvino_model_qint8_quantized.xml742 KBc2c76ef55d2788fbac509a8ade756189369b370242f1e2090475afdc3806f7ec
pytorch_model.bin438 MB879a1f3543bda9609f8ae74c68236cc5049769fcac6fbd68a70aafd6762dca01
sentence_bert_config.json53 Bec8e29d6dcb61b611b7d3fdd2982c4524e6ad985959fa7194eacfb655a8d0d51
special_tokens_map.json239 B9ef40e9c160511bf3f46ceb71f1471dafa1e9473d5120bb816c36b2efa75f8ba
tokenizer.json466 KBb8be2c30ba5dd723a6d5ee26d013da103d5408d92ddcb23747622f9e48f1d842
tokenizer_config.json363 B67f2ff7e223518e729869bb3a70f0caf8368fe549383fc11cfe2dfb42fffc268
train_script.py13.2 KB28f7ec95e4c94ea359a507597b7cf703b9b173c0e2e61ce5bf19c9775cfaef08
vocab.txt232 KBdbd90cb94e2247bd4d4ccaecbf616d2290e66691d7d5e5bb81f063c2d0649ada
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
3958fb5c14 pinned now2026-11-15 03:37 UTC28 files · 3.82 GB

Use it

$ fw get sentence-transformers/all-mpnet-base-v1
# manifest sha256 c829e2df3a6d… · 3.82 GB · 28 files
$ fw verify ./all-mpnet-base-v1 sentence-transformers/all-mpnet-base-v1
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/sentence-transformers/all-mpnet-base-v1.json --dir ./all-mpnet-base-v1 $ python3 fw.py verify ./all-mpnet-base-v1 ./sentence-transformers__all-mpnet-base-v1.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download sentence-transformers/all-mpnet-base-v1 --revision 3958fb5c143d426dfff5754c2b62b3d6bd45e287 --local-dir ./all-mpnet-base-v1
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModel, AutoTokenizer tok = AutoTokenizer.from_pretrained("sentence-transformers/all-mpnet-base-v1", revision="3958fb5c143d426dfff5754c2b62b3d6bd45e287") model = AutoModel.from_pretrained("sentence-transformers/all-mpnet-base-v1", revision="3958fb5c143d426dfff5754c2b62b3d6bd45e287", device_map="auto")
sentence-transformersEmbed text with sentence-transformers.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from sentence_transformers import SentenceTransformer model = SentenceTransformer("sentence-transformers/all-mpnet-base-v1", revision="3958fb5c143d426dfff5754c2b62b3d6bd45e287") vectors = model.encode(["Hello"])

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
dee25b09b20484327e5e12d303efde824fb0cf1a9624a924ca6611beb4b2910b
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: sentence-transformers <huggingface.co/sentence-transformers>Newsgroups: alt.freeweights.embedSubject: all-mpnet-base-v1Date: 2026-11-15Commit: 3958fb5Signed: 2DC28CC7B26A283B ✓
Upstream
sentence-transformers/all-mpnet-base-v1
Pinned commit
3958fb5c143d426dfff5754c2b62b3d6bd45e287
Manifest
all-mpnet-base-v1.json · .minisig
Manifest sha256
c829e2df3a6d605d2c7c3759776e7c236ccc7243683a3c7f34a776a3201cb72e
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:37 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/sentence-transformers/all-mpnet-base-v1.json $ curl -O https://freeweights.allternit.com/manifests/sentence-transformers/all-mpnet-base-v1.json.minisig $ minisign -Vm all-mpnet-base-v1.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download sentence-transformers/all-mpnet-base-v1
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. all-mpnet-base-v1.json. Provenance. Takedown history: none.
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: all-MiniLM-L6-v1
From: unsloth <huggingface.co/unsloth>Subject: all-MiniLM-L6-v2
From: mlx-community <huggingface.co/mlx-community>Subject: all-MiniLM-L6-v2-4bit
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: allenai-specter
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: bert-base-nli-max-tokens
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: bert-base-nli-stsb-mean-tokens