alt.freeweights.embed / bert-base-nli-mean-tokens
From: sentence-transformers <huggingface.co/sentence-transformers>Newsgroups: alt.freeweights.embedSubject:

bert-base-nli-mean-tokens

Date: 2026-11-14Commit: 160a52bSigned: 2DC28CC7B26A283B ✓

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

109M params5.14GBbert-base-nli-mean-tokensonnx openvino safetensorspermissive
FactsParams109MSize5.14 GBFormatsonnx, openvino, safetensorsTasksentence similarityLicenseApache-2.0From sourcepermissive
$ fw get sentence-transformers/bert-base-nli-mean-tokens
# manifest sha256 1d4a82ca000c… · 5.14 GB · 30 files
$ fw verify ./bert-base-nli-mean-tokens sentence-transformers/bert-base-nli-mean-tokens
From sourceHosted (signed)sentence-transformers/bert-base-nli-mean-tokensLast check: 2026-11-14 21:10 UTC

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

Works with

Evaluate with

Overview

Size
5.14 GB
Weights
438 MB (safetensors)
Parameters
109M
Formats
onnx, openvino, safetensors
Task
sentence similarity
License
Apache-2.0 (permissive)
Files
30, each with a sha256
Publisher
sentence-transformers
Added
2026-11-14
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-14 21:10 UTCpassed

Model card

From the publisher at commit 160a52b. Shown as plain text with links; images open at the publisher.

⚠️ This model is deprecated. Please don't use it as it produces sentence embeddings of low quality. You can find recommended sentence embedding models here: SBERT.net - Pretrained Models

sentence-transformers/bert-base-nli-mean-tokens#

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/bert-base-nli-mean-tokens')
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


#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/bert-base-nli-mean-tokens')
model = AutoModel.from_pretrained('sentence-transformers/bert-base-nli-mean-tokens')

# 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. In this case, max pooling.
sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask'])

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

Full Model Architecture#

SentenceTransformer(
  (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel 
  (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False})
)

Citing & Authors#

This model was trained by sentence-transformers.

If you find this model helpful, feel free to cite our publication Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks:

@inproceedings{reimers-2019-sentence-bert,
    title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
    author = "Reimers, Nils and Gurevych, Iryna",
    booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
    month = "11",
    year = "2019",
    publisher = "Association for Computational Linguistics",
    url = "http://arxiv.org/abs/1908.10084",
}

Files

30 files · 5.14 GBWeights 438 MB (safetensors). Sizes and sha256 from the signed manifest.
Show all 30 files with their sha256
FileSizesha256
.gitattributes445 B98c91dabef4df27b2fc7c8454d220aba47476f73593cbd034d961fe4927304c1
1_Pooling/config.json190 Ba37f83ada23e7887be6b88f4998927dbeac0038af301553c7cd5461413bf1a56
README.md3.77 KB19ec5a5c1f7d329dd1ebf63a6c3f6c7a45dcc0243ffc041a41bf763ad5e2c460
added_tokens.json2 B44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a
config.json625 Bfe62cd914d3adba796d775d9da5346b4494b9208c155d3a29cccdd40714a161b
config_sentence_transformers.json122 Bb8c64b5cece00d8424b4896ea75b512b6008576088497609dfeb6bd63e6d36b8
flax_model.msgpack438 MB34f176e37e4aafc0ebd71699f61d69fd2f580b867588332fc2b8f2ccc4b3c9a4
model.safetensors438 MB9510000ec322a40d6cbf5dcfcc81de3630e8fc31a3bab27736b0464a17f10980
modules.json229 B8f4b264b80206c830bebbdcae377e137925650a433b689343a63bdc9b3145460
onnx/model.onnx436 MB431e4da117be8b9b47c6b1224d0b0c94f52839ac2ac831b2709458f23db3b577
onnx/model_O1.onnx436 MBbb6273c89b24cb907311133e23029c6b020e78f645ee6292c4e85d036349074e
onnx/model_O2.onnx436 MBd45b915e10fcfdfeb28214e3a805bffb5b16d2595534aef79022c57c70d3bf06
onnx/model_O3.onnx436 MB7716441bf20d683e9fa8089240445455b275c5b322f45e104452067c226fefd4
onnx/model_O4.onnx218 MB3356def9a6889249c226a701c1c6bf51f75f8ac7bbc6835f0477b455eb8d50a8
onnx/model_qint8_arm64.onnx110 MB85ea07d22c3744df5182bc3bcdaa1d1dc7bc406a2b26f8f47fd828a1401056e8
onnx/model_qint8_avx512.onnx110 MB85ea07d22c3744df5182bc3bcdaa1d1dc7bc406a2b26f8f47fd828a1401056e8
onnx/model_qint8_avx512_vnni.onnx110 MB85ea07d22c3744df5182bc3bcdaa1d1dc7bc406a2b26f8f47fd828a1401056e8
onnx/model_quint8_avx2.onnx110 MB8ba8083a9c246e660c5176fd8f4b1688aa99bd3f891f67203108ba750b96740e
openvino/openvino_model.bin436 MB509b20ad83bafdde24a5506dfe66b5710d3696ff16928c4f326a9c3a9746820e
openvino/openvino_model.xml398 KB67e4fec7343825f16959ec3dd15897ec382b783fea7090f8adb6e3f1ae1782ee
openvino/openvino_model_qint8_quantized.bin110 MB1855d96f327495e3afcc9aec4c9b5e8676659b8abd15f1ecacd231d08def6b07
openvino/openvino_model_qint8_quantized.xml708 KBec768870c4a7d95ccafb95b64c2ff587e5d2a659eddf3b4492002972ac8fe1b3
pytorch_model.bin438 MB47a5ed8c3b0ea722db61d4db2b3caaec3f751e72e0ebddf39f59a3c8d9784385
rust_model.ot438 MBf08864514480addb3d8eada097a28ba68c4888607c7a1649431b9ea25c9641a9
sentence_bert_config.json53 B70f4448f31320443fe3557cacea5abf2dcc4915dda8c80646bec9f3bb0aa5a1f
special_tokens_map.json112 B303df45a03609e4ead04bc3dc1536d0ab19b5358db685b6f3da123d05ec200e3
tf_model.h5438 MB4621b08a9e179539e7b378181200ed9cea91729550b4ca4d157c897cdda63e46
tokenizer.json466 KB5fd1c882abbd30517dced455a2c9768945ec726b96727927e4959348d9de550b
tokenizer_config.json399 B421627200e519e8a9152093ca294aee875f13f5ed5d892579a643e2868e4e40a
vocab.txt232 KB07eced375cec144d27c900241f3e339478dec958f92fddbc551f295c992038a3
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
160a52b38a pinned now manifest updated, same commit2026-11-14 21:10 UTC30 files · 5.14 GB
160a52b38a2026-11-14 21:10 UTC30 files · 5.14 GB

Use it

$ fw get sentence-transformers/bert-base-nli-mean-tokens
# manifest sha256 1d4a82ca000c… · 5.14 GB · 30 files
$ fw verify ./bert-base-nli-mean-tokens sentence-transformers/bert-base-nli-mean-tokens
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/sentence-transformers/bert-base-nli-mean-tokens.json --dir ./bert-base-nli-mean-tokens $ python3 fw.py verify ./bert-base-nli-mean-tokens ./sentence-transformers__bert-base-nli-mean-tokens.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download sentence-transformers/bert-base-nli-mean-tokens --revision 160a52b38a51ae87295ec3eabcf11755e5d27a8d --local-dir ./bert-base-nli-mean-tokens
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/bert-base-nli-mean-tokens", revision="160a52b38a51ae87295ec3eabcf11755e5d27a8d") model = AutoModel.from_pretrained("sentence-transformers/bert-base-nli-mean-tokens", revision="160a52b38a51ae87295ec3eabcf11755e5d27a8d", 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/bert-base-nli-mean-tokens", revision="160a52b38a51ae87295ec3eabcf11755e5d27a8d") 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-14
Text in
README.md
Text sha256
19ec5a5c1f7d329dd1ebf63a6c3f6c7a45dcc0243ffc041a41bf763ad5e2c460
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: bert-base-nli-mean-tokensDate: 2026-11-14Commit: 160a52bSigned: 2DC28CC7B26A283B ✓
Upstream
sentence-transformers/bert-base-nli-mean-tokens
Pinned commit
160a52b38a51ae87295ec3eabcf11755e5d27a8d
Manifest
bert-base-nli-mean-tokens.json · .minisig
Manifest sha256
1d4a82ca000c2124a89005697b1e9da34d21569c491fb81a91288f0b256b712b
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-14 21:10 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/sentence-transformers/bert-base-nli-mean-tokens.json $ curl -O https://freeweights.allternit.com/manifests/sentence-transformers/bert-base-nli-mean-tokens.json.minisig $ minisign -Vm bert-base-nli-mean-tokens.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/bert-base-nli-mean-tokens
Open in Freeweights Studio

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

Signed manifest
minisign, key 2DC28CC7B26A283B. bert-base-nli-mean-tokens.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: all-mpnet-base-v1
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: allenai-specter
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: bert-base-nli-max-tokens