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

bert-base-nli-max-tokens

Date: 2026-11-15Commit: ce378eaSigned: 2DC28CC7B26A283B ✓

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

109M params4.70GBbert-base-nli-max-tokensonnx openvino safetensorspermissive
FactsParams109MSize4.70 GBFormatsonnx, openvino, safetensorsTasksentence similarityLicenseApache-2.0From sourcepermissive
$ fw get sentence-transformers/bert-base-nli-max-tokens
# manifest sha256 d2281d33cbe5… · 4.70 GB · 29 files
$ fw verify ./bert-base-nli-max-tokens sentence-transformers/bert-base-nli-max-tokens
From sourceHosted (signed)sentence-transformers/bert-base-nli-max-tokensLast check: 2026-11-15 03:38 UTC

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

Works with

Evaluate with

Overview

Size
4.70 GB
Weights
438 MB (safetensors)
Parameters
109M
Formats
onnx, openvino, safetensors
Task
sentence similarity
License
Apache-2.0 (permissive)
Files
29, 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:38 UTCpassed

Model card

From the publisher at commit ce378ea. 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-max-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-max-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


# Max Pooling - Take the max value over time for every dimension. 
def max_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()
    token_embeddings[input_mask_expanded == 0] = -1e9  # Set padding tokens to large negative value
    return torch.max(token_embeddings, 1)[0]


# 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-max-tokens')
model = AutoModel.from_pretrained('sentence-transformers/bert-base-nli-max-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 = max_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': False, 'pooling_mode_max_tokens': True, '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

29 files · 4.70 GBWeights 438 MB (safetensors). Sizes and sha256 from the signed manifest.
Show all 29 files with their sha256
FileSizesha256
.gitattributes445 B98c91dabef4df27b2fc7c8454d220aba47476f73593cbd034d961fe4927304c1
1_Pooling/config.json190 B5c1f20627973ae883527d18d8ffe92be35e06255e365e42038479a7674e776a4
README.md3.79 KB0d806529f5783328515d50295b2f78de349bc56e1c2ce88977f7d77ff8ca0192
added_tokens.json2 B44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a
config.json624 Bf82e24f08ae312c1764873f51c20dac3ffef3c9229b05b679b627ada917f1fe5
config_sentence_transformers.json122 Bb8c64b5cece00d8424b4896ea75b512b6008576088497609dfeb6bd63e6d36b8
flax_model.msgpack438 MBe18af41f25f8e171fb76ccb58e6b1930e06b19e0f7c381261d58439c70753595
model.safetensors438 MBea2fce20c3c4ff75b5774d02b1d789b90637f821fc72791d0b3bf542832b5748
modules.json229 B8f4b264b80206c830bebbdcae377e137925650a433b689343a63bdc9b3145460
onnx/model.onnx436 MBed09da737809e904100edf62e37f5205b96c156950724a7dd4ca2ee4d9e312ec
onnx/model_O1.onnx436 MB79cd9ed80a7e00f7b4bff945eabd8f00a686bf15aa1fcade1890e74068f84c04
onnx/model_O2.onnx436 MB5513774c1c5eb84471f4208db5cc1c056847be8e52059fdf8640783a185a18cd
onnx/model_O3.onnx436 MBbfe0b4b601d31415b1d8a71ca72e0abf43f29e3f700714cc9bc906b4e22e0317
onnx/model_O4.onnx218 MB646fffbf210180820d1f0b32e07b6380ca886d4e418ccfe96748687d9df98a20
onnx/model_qint8_arm64.onnx110 MBc40fc477ca39265b65ce20065c68b4f3a8b9e92dc089983771808cede9a30407
onnx/model_qint8_avx512.onnx110 MBc40fc477ca39265b65ce20065c68b4f3a8b9e92dc089983771808cede9a30407
onnx/model_qint8_avx512_vnni.onnx110 MBc40fc477ca39265b65ce20065c68b4f3a8b9e92dc089983771808cede9a30407
onnx/model_quint8_avx2.onnx110 MBc0e5c3c9cb8580c0e96cc4871c001a10a1c6c4818eaec21f2c74703a37badcf5
openvino/openvino_model.bin436 MBf1a7c2f89e8130a0da75d5b280f470a3dc6aef5f2d0a133d6ff0c945a3445a2e
openvino/openvino_model.xml398 KB3e12f14da027fe85fff2cb128482b1e8421fd6fa09887dbadeb4b1731afaa405
openvino/openvino_model_qint8_quantized.bin110 MBfd3d2786ec3e6528b55a03d7249de3aff9978f44b2a2c8033c725c6dafc72fd0
openvino/openvino_model_qint8_quantized.xml708 KB3a58fe89c27ed368eada8acfc6c5e9b12583c12b1b3dbcd6a8a5d5500dd6e72b
pytorch_model.bin438 MBf2a9f8d4879ca4b410a477c9b8f94e4a058bbcdcc82ec4b71eabbd4b67480bda
sentence_bert_config.json53 B70f4448f31320443fe3557cacea5abf2dcc4915dda8c80646bec9f3bb0aa5a1f
special_tokens_map.json112 B303df45a03609e4ead04bc3dc1536d0ab19b5358db685b6f3da123d05ec200e3
tf_model.h5438 MB77a1e729d1763773bddb08ea24849348ab2c8402a8ace3bac42e0faa7062d22b
tokenizer.json466 KB5fd1c882abbd30517dced455a2c9768945ec726b96727927e4959348d9de550b
tokenizer_config.json397 Be50dc4da5aeb567b5caffe6843f3ff7a6bdfce6122ff0d8b1c1c25d1370466b3
vocab.txt232 KB07eced375cec144d27c900241f3e339478dec958f92fddbc551f295c992038a3
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
ce378eaf29 pinned now2026-11-15 03:38 UTC29 files · 4.70 GB

Use it

$ fw get sentence-transformers/bert-base-nli-max-tokens
# manifest sha256 d2281d33cbe5… · 4.70 GB · 29 files
$ fw verify ./bert-base-nli-max-tokens sentence-transformers/bert-base-nli-max-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-max-tokens.json --dir ./bert-base-nli-max-tokens $ python3 fw.py verify ./bert-base-nli-max-tokens ./sentence-transformers__bert-base-nli-max-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-max-tokens --revision ce378eaf2998e0e656b283440f465e1f565d881a --local-dir ./bert-base-nli-max-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-max-tokens", revision="ce378eaf2998e0e656b283440f465e1f565d881a") model = AutoModel.from_pretrained("sentence-transformers/bert-base-nli-max-tokens", revision="ce378eaf2998e0e656b283440f465e1f565d881a", 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-max-tokens", revision="ce378eaf2998e0e656b283440f465e1f565d881a") 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
0d806529f5783328515d50295b2f78de349bc56e1c2ce88977f7d77ff8ca0192
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-max-tokensDate: 2026-11-15Commit: ce378eaSigned: 2DC28CC7B26A283B ✓
Upstream
sentence-transformers/bert-base-nli-max-tokens
Pinned commit
ce378eaf2998e0e656b283440f465e1f565d881a
Manifest
bert-base-nli-max-tokens.json · .minisig
Manifest sha256
d2281d33cbe59ea767fd13b73af38e01337bc0ee64245265031256aaf128714b
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:38 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

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