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

all-MiniLM-L6-v1

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

Sentence similarity model with 23M parameters. Onnx and openvino and safetensors weights, 795 MB in all. Published by sentence-transformers under Apache-2.0.

23M params795MBall-MiniLM-L6-v1onnx openvino safetensorspermissive
FactsParams23MSize795 MBFormatsonnx, openvino, safetensorsTasksentence similarityLicenseApache-2.0From sourcepermissive
$ fw get sentence-transformers/all-MiniLM-L6-v1
# manifest sha256 3189e2b817b8… · 795 MB · 28 files
$ fw verify ./all-MiniLM-L6-v1 sentence-transformers/all-MiniLM-L6-v1
From sourceHosted (signed)sentence-transformers/all-MiniLM-L6-v1Last check: 2026-11-15 02:47 UTC

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

Works with

Evaluate with

Overview

Size
795 MB
Weights
90.9 MB (safetensors)
Parameters
23M
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 02:47 UTCpassed

Model card

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

all-MiniLM-L6-v1#

This is a sentence-transformers model: It maps sentences & paragraphs to a 384 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-MiniLM-L6-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-MiniLM-L6-v1')
model = AutoModel.from_pretrained('sentence-transformers/all-MiniLM-L6-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)

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 nreimers/MiniLM-L6-H384-uncased 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 developped this model during the Community week using JAX/Flax for NLP & CV, organized by Hugging Face. We developped 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 Googles Flax, JAX, and Cloud team member about efficient deep learning frameworks.

Intended uses#

Our model is intented to be used as a sentence and short paragraph encoder. Given an input text, it ouptuts 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 nreimers/MiniLM-L6-H384-uncased model. 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.

Hyper parameters#

We trained ou model on a TPU v3-8. We train the model during 100k steps using a batch size of 1024 (128 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 MultiNLIpaper 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 · 795 MBWeights 90.9 MB (safetensors). Sizes and sha256 from the signed manifest.
Show all 28 files with their sha256
FileSizesha256
.gitattributes791 Beedaa232843a5fee706aa818a601221bf17acb6c304888d1f69c04725e03ebb7
1_Pooling/config.json190 B4be450dde3b0273bb9787637cfbd28fe04a7ba6ab9d36ac48e92b11e350ffc23
README.md9.80 KB51e24b1551ca9eaca8fdbcf1a3b16572c035bc139b3913e6adc371c9963a5931
config.json612 B953f9c0d463486b10a6871cc2fd59f223b2c70184f49815e7efbcab5d8908b41
config_sentence_transformers.json116 B061ca9d39661d6c6d6de5ba27f79a1cd5770ea247f8d46412a68a498dc5ac9f3
data_config.json15.7 KB2ba682c372ee7ac37d519df39571ec0543f55ae31273844be05f8a5acdf92e2a
model.safetensors90.9 MB8945e61c4024ed7c0045f34fe5b8efc90a80b760768cdb1728fccfe3bbf122b9
modules.json349 B84e40c8e006c9b1d6c122e02cba9b02458120b5fb0c87b746c41e0207cf642cf
onnx/model.onnx90.4 MB457640d9928014ef3fdc69349057dc7435523ed09357c7661d3866f31c59bc12
onnx/model_O1.onnx90.4 MB61335b0dad3dd287a8f6284328aa9d20f3b7f6bf6d728d0554efbea781d6824b
onnx/model_O2.onnx90.3 MB2cfb77addc95c4d2025db7e4097e7bb8c685c4a01f1ede59164a40413e53af7c
onnx/model_O3.onnx90.3 MBe3a6ff27980590edd68b0814857b31dedcc7d754ab8f5e9f9f64ee67c20fc8b8
onnx/model_O4.onnx45.2 MBe4e8ae3b636c04b51cbd6adb95eccddcf92f000943276f42c4b3a79f155431ed
onnx/model_qint8_arm64.onnx23.0 MB36211084029ac606988cbf39ba30ec5f186a058075d386d1f98c4255fb87176a
onnx/model_qint8_avx512.onnx23.0 MB36211084029ac606988cbf39ba30ec5f186a058075d386d1f98c4255fb87176a
onnx/model_qint8_avx512_vnni.onnx23.0 MB36211084029ac606988cbf39ba30ec5f186a058075d386d1f98c4255fb87176a
onnx/model_quint8_avx2.onnx23.0 MB82f046a7e3f1a2a89201edbe47a171edc9689e81bc4fb296a257faf9ec6dff9c
openvino/openvino_model.bin90.3 MBc83a4aefbddfe46df8c0c92ec5542c951c6608cea8ab8d344a5092daa69271da
openvino/openvino_model.xml211 KB5df186cf12b9f6ff79778deae3509c91e49e8bec96583f4289bee660506c4c80
openvino/openvino_model_qint8_quantized.bin22.9 MB054279d9b1632ed2b97246763d61cf261a5c6650f4edd6438728b316cfa2db03
openvino/openvino_model_qint8_quantized.xml368 KB4c7394355e20114e5bbf24db5cf47ed6b0977954cdcf7992256895a4ab78a41a
pytorch_model.bin90.9 MB1c32ef85f7d91b0c792be77e8ba461b216ed9500f641f51415733b6b90fe4d05
sentence_bert_config.json53 B70f4448f31320443fe3557cacea5abf2dcc4915dda8c80646bec9f3bb0aa5a1f
special_tokens_map.json112 B303df45a03609e4ead04bc3dc1536d0ab19b5358db685b6f3da123d05ec200e3
tokenizer.json466 KBbe50c3628f2bf5bb5e3a7f17b1f74611b2561a3a27eeab05e5aa30f411572037
tokenizer_config.json350 Bacb92769e8195aabd29b7b2137a9e6d6e25c476a4f15aa4355c233426c61576b
train_script.py13.2 KB50a213fe5107cbaa4bd6b11bb70583008f561f1e41f970ad51c8a0a280f9158c
vocab.txt232 KB07eced375cec144d27c900241f3e339478dec958f92fddbc551f295c992038a3
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
d8ccfb53d0 pinned now2026-11-15 02:47 UTC28 files · 795 MB

Use it

$ fw get sentence-transformers/all-MiniLM-L6-v1
# manifest sha256 3189e2b817b8… · 795 MB · 28 files
$ fw verify ./all-MiniLM-L6-v1 sentence-transformers/all-MiniLM-L6-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-MiniLM-L6-v1.json --dir ./all-MiniLM-L6-v1 $ python3 fw.py verify ./all-MiniLM-L6-v1 ./sentence-transformers__all-MiniLM-L6-v1.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download sentence-transformers/all-MiniLM-L6-v1 --revision d8ccfb53d087c448cf4f48efed6ea98a01d7e47a --local-dir ./all-MiniLM-L6-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-MiniLM-L6-v1", revision="d8ccfb53d087c448cf4f48efed6ea98a01d7e47a") model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v1", revision="d8ccfb53d087c448cf4f48efed6ea98a01d7e47a", 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-MiniLM-L6-v1", revision="d8ccfb53d087c448cf4f48efed6ea98a01d7e47a") 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
51e24b1551ca9eaca8fdbcf1a3b16572c035bc139b3913e6adc371c9963a5931
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-MiniLM-L6-v1Date: 2026-11-15Commit: d8ccfb5Signed: 2DC28CC7B26A283B ✓
Upstream
sentence-transformers/all-MiniLM-L6-v1
Pinned commit
d8ccfb53d087c448cf4f48efed6ea98a01d7e47a
Manifest
all-MiniLM-L6-v1.json · .minisig
Manifest sha256
3189e2b817b837c1df7712f80dd1f016ffed8d7e24bdef423c5746646cf78cbc
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 02:47 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/sentence-transformers/all-MiniLM-L6-v1.json $ curl -O https://freeweights.allternit.com/manifests/sentence-transformers/all-MiniLM-L6-v1.json.minisig $ minisign -Vm all-MiniLM-L6-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-MiniLM-L6-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-MiniLM-L6-v1.json. Provenance. Takedown history: none.
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
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: bert-base-nli-stsb-mean-tokens