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

all-distilroberta-v1

Date: 2026-11-14Commit: 842eaedSigned: 2DC28CC7B26A283B ✓

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

82M params3.19GBall-distilroberta-v1onnx openvino safetensorspermissive
FactsParams82MSize3.19 GBFormatsonnx, openvino, safetensorsTasksentence similarityLicenseApache-2.0From sourcepermissive
$ fw get sentence-transformers/all-distilroberta-v1
# manifest sha256 ccea8395a86e… · 3.19 GB · 30 files
$ fw verify ./all-distilroberta-v1 sentence-transformers/all-distilroberta-v1
From sourceHosted (signed)sentence-transformers/all-distilroberta-v1Last 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
3.19 GB
Weights
328 MB (safetensors)
Parameters
82M
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 842eaed. Shown as plain text with links; images open at the publisher.

all-distilroberta-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-distilroberta-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-distilroberta-v1')
model = AutoModel.from_pretrained('sentence-transformers/all-distilroberta-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 distilroberta-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 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 distilroberta-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.

Hyper parameters#

We trained ou 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 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

30 files · 3.19 GBWeights 328 MB (safetensors). Sizes and sha256 from the signed manifest.
Show all 30 files with their sha256
FileSizesha256
.gitattributes791 Beedaa232843a5fee706aa818a601221bf17acb6c304888d1f69c04725e03ebb7
1_Pooling/config.json190 Ba37f83ada23e7887be6b88f4998927dbeac0038af301553c7cd5461413bf1a56
README.md10.1 KB565f15ef1c8232cf21b91aa9125bd852f54f2f676c662324732ee3d4d3a43a8c
config.json653 B6f9efb40bd192274dd2e6f43c326cd4571cbefe647f4a274e83073be4f13f928
config_sentence_transformers.json116 B061ca9d39661d6c6d6de5ba27f79a1cd5770ea247f8d46412a68a498dc5ac9f3
data_config.json15.7 KB2ba682c372ee7ac37d519df39571ec0543f55ae31273844be05f8a5acdf92e2a
merges.txt456 KBfe36cab26d4f4421ed725e10a2e9ddb7f799449c603a96e7f29b5a3c82a95862
model.safetensors328 MB3c739fad12f3f12428a677cfcc73391a5860a8bad0ff7a971fd67e6065201fc2
modules.json349 B84e40c8e006c9b1d6c122e02cba9b02458120b5fb0c87b746c41e0207cf642cf
onnx/model.onnx326 MBe29a4c305dba4bdb1f7dfe37fc69c6adc84de43d8c02461da149456af23d4a38
onnx/model_O1.onnx326 MB0aa8e69c5185a6e3593a0a6f6d5fcb454f08df3a8890f3ce504f6b8aee2d6e83
onnx/model_O2.onnx326 MBaa55f453a76f16b81368aacf2aaaf5256eb2d5fadae16453ecd9a1b32a8a8356
onnx/model_O3.onnx326 MBc2fa562c0651701def228450e4e7aa7af98f99521518383f881117af0b4f0635
onnx/model_O4.onnx163 MB02f627f41a8b1e1b417a98742244ed515e1494916fd02517d08ca7e726edef72
onnx/model_qint8_arm64.onnx82.2 MBc9e6677186f17537615396a4d40e2ef38d42cf327f27bfdbe31bd0d32c628b01
onnx/model_qint8_avx512.onnx82.2 MBc9e6677186f17537615396a4d40e2ef38d42cf327f27bfdbe31bd0d32c628b01
onnx/model_qint8_avx512_vnni.onnx82.2 MBc9e6677186f17537615396a4d40e2ef38d42cf327f27bfdbe31bd0d32c628b01
onnx/model_quint8_avx2.onnx82.2 MB0672eaf8289678457597b1e70dcaf3689a95eb35fcb3aa6e825c0cae7a28d8b5
openvino/openvino_model.bin326 MB212d7661f0a72e6cfafdbc9ce156c32c9ec3030663913b983e9ee7f3bb7bc2f1
openvino/openvino_model.xml217 KB56e64ede58f6346edb466651bd2b5203638d8cdb950a0e590af63d7b564a3a04
openvino/openvino_model_qint8_quantized.bin82.2 MB308b23332854f2f9ce36f15c94fb43607055e287af5db067c76366c1f7730b55
openvino/openvino_model_qint8_quantized.xml373 KB72af68bafc907dab889336ab0929745674744dfd9fde1bce483ebb97413c19c2
pytorch_model.bin329 MBb90e424e0e828f48fc6f61110570e46f6ad7c566c9de13c317cf8408e0e81fd6
rust_model.ot329 MBd1a9901b8d3bf5c8ae697f6601759dde10427392d055bf65bac4e9b9191a5039
sentence_bert_config.json53 Bec8e29d6dcb61b611b7d3fdd2982c4524e6ad985959fa7194eacfb655a8d0d51
special_tokens_map.json239 B378eb3bf733eb16e65792d7e3fda5b8a4631387ca04d2015199c4d4f22ae554d
tokenizer.json1.36 MB7a6751507c44ab383cc8ba8ab97cd857d35025ff1b29162b1690cc5e0c6030e9
tokenizer_config.json333 B5066b57002ab15418f3472aa53a8b083878f84050e8153ba62b9d40e10651a4c
train_script.py13.1 KBcfb4284ab26ca8aa95b9bddeb6b676ef759e565305890efaaa8b5e7dc5db7ebb
vocab.json798 KBed19656ea1707df69134c4af35c8ceda2cc9860bf2c3495026153a133670ab5e
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
842eaed40b pinned now manifest updated, same commit2026-11-14 21:10 UTC30 files · 3.19 GB
842eaed40b2026-11-14 21:10 UTC30 files · 3.19 GB

Use it

$ fw get sentence-transformers/all-distilroberta-v1
# manifest sha256 ccea8395a86e… · 3.19 GB · 30 files
$ fw verify ./all-distilroberta-v1 sentence-transformers/all-distilroberta-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-distilroberta-v1.json --dir ./all-distilroberta-v1 $ python3 fw.py verify ./all-distilroberta-v1 ./sentence-transformers__all-distilroberta-v1.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download sentence-transformers/all-distilroberta-v1 --revision 842eaed40bee4d61673a81c92d5689a8fed7a09f --local-dir ./all-distilroberta-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-distilroberta-v1", revision="842eaed40bee4d61673a81c92d5689a8fed7a09f") model = AutoModel.from_pretrained("sentence-transformers/all-distilroberta-v1", revision="842eaed40bee4d61673a81c92d5689a8fed7a09f", 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-distilroberta-v1", revision="842eaed40bee4d61673a81c92d5689a8fed7a09f") 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
565f15ef1c8232cf21b91aa9125bd852f54f2f676c662324732ee3d4d3a43a8c
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-distilroberta-v1Date: 2026-11-14Commit: 842eaedSigned: 2DC28CC7B26A283B ✓
Upstream
sentence-transformers/all-distilroberta-v1
Pinned commit
842eaed40bee4d61673a81c92d5689a8fed7a09f
Manifest
all-distilroberta-v1.json · .minisig
Manifest sha256
ccea8395a86eeab0b6b15f7c23ffb329b68f9071a14afa384cb8cb6cdf663bc9
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/all-distilroberta-v1.json $ curl -O https://freeweights.allternit.com/manifests/sentence-transformers/all-distilroberta-v1.json.minisig $ minisign -Vm all-distilroberta-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-distilroberta-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-distilroberta-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: 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