alt.freeweights.vision / distilbert-base-uncased
From: distilbert <huggingface.co/distilbert>Newsgroups: alt.freeweights.visionSubject:

distilbert-base-uncased

Date: 2026-11-15Commit: 12040acSigned: 2DC28CC7B26A283B ✓

Fill mask model with 67M parameters. Safetensors weights, 1.53 GB in all. Published by distilbert under Apache-2.0.

67M params1.53GBdistilbert-base-uncasedsafetensorspermissive
FactsParams67MSize1.53 GBFormatssafetensorsTaskfill maskLicenseApache-2.0From sourcepermissive
$ fw get distilbert/distilbert-base-uncased
# manifest sha256 24335b73baf6… · 1.53 GB · 12 files
$ fw verify ./distilbert-base-uncased distilbert/distilbert-base-uncased
From sourceHosted (signed)distilbert/distilbert-base-uncasedLast check: 2026-11-15 02:25 UTC

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

Overview

Size
1.53 GB
Weights
268 MB (safetensors)
Parameters
67M
Formats
safetensors
Task
fill mask
License
Apache-2.0 (permissive)
Files
12, each with a sha256
Publisher
distilbert
Added
2026-11-15
Section
alt.freeweights.vision
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:25 UTCpassed

Model card

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

DistilBERT base model (uncased)#

This model is a distilled version of the BERT base model. It was introduced in this paper. The code for the distillation process can be found here. This model is uncased: it does not make a difference between english and English.

Model description#

DistilBERT is a transformers model, smaller and faster than BERT, which was pretrained on the same corpus in a self-supervised fashion, using the BERT base model as a teacher. This means it was pretrained on the raw texts only, with no humans labelling them in any way (which is why it can use lots of publicly available data) with an automatic process to generate inputs and labels from those texts using the BERT base model. More precisely, it was pretrained with three objectives:

  • Distillation loss: the model was trained to return the same probabilities as the BERT base model.
  • Masked language modeling (MLM): this is part of the original training loss of the BERT base model. When taking a sentence, the model randomly masks 15% of the words in the input then run the entire masked sentence through the model and has to predict the masked words. This is different from traditional recurrent neural networks (RNNs) that usually see the words one after the other, or from autoregressive models like GPT which internally mask the future tokens. It allows the model to learn a bidirectional representation of the sentence.
  • Cosine embedding loss: the model was also trained to generate hidden states as close as possible as the BERT base model.

This way, the model learns the same inner representation of the English language than its teacher model, while being faster for inference or downstream tasks.

Intended uses & limitations#

You can use the raw model for either masked language modeling or next sentence prediction, but it's mostly intended to be fine-tuned on a downstream task. See the model hub to look for fine-tuned versions on a task that interests you.

Note that this model is primarily aimed at being fine-tuned on tasks that use the whole sentence (potentially masked) to make decisions, such as sequence classification, token classification or question answering. For tasks such as text generation you should look at model like GPT2.

How to use#

You can use this model directly with a pipeline for masked language modeling:

>>> from transformers import pipeline
>>> unmasker = pipeline('fill-mask', model='distilbert-base-uncased')
>>> unmasker("Hello I'm a [MASK] model.")

[{'sequence': "[CLS] hello i'm a role model. [SEP]",
  'score': 0.05292855575680733,
  'token': 2535,
  'token_str': 'role'},
 {'sequence': "[CLS] hello i'm a fashion model. [SEP]",
  'score': 0.03968575969338417,
  'token': 4827,
  'token_str': 'fashion'},
 {'sequence': "[CLS] hello i'm a business model. [SEP]",
  'score': 0.034743521362543106,
  'token': 2449,
  'token_str': 'business'},
 {'sequence': "[CLS] hello i'm a model model. [SEP]",
  'score': 0.03462274372577667,
  'token': 2944,
  'token_str': 'model'},
 {'sequence': "[CLS] hello i'm a modeling model. [SEP]",
  'score': 0.018145186826586723,
  'token': 11643,
  'token_str': 'modeling'}]

Here is how to use this model to get the features of a given text in PyTorch:

from transformers import DistilBertTokenizer, DistilBertModel
tokenizer = DistilBertTokenizer.from_pretrained('distilbert-base-uncased')
model = DistilBertModel.from_pretrained("distilbert-base-uncased")
text = "Replace me by any text you'd like."
encoded_input = tokenizer(text, return_tensors='pt')
output = model(**encoded_input)

and in TensorFlow:

from transformers import DistilBertTokenizer, TFDistilBertModel
tokenizer = DistilBertTokenizer.from_pretrained('distilbert-base-uncased')
model = TFDistilBertModel.from_pretrained("distilbert-base-uncased")
text = "Replace me by any text you'd like."
encoded_input = tokenizer(text, return_tensors='tf')
output = model(encoded_input)
Limitations and bias#

Even if the training data used for this model could be characterized as fairly neutral, this model can have biased predictions. It also inherits some of the bias of its teacher model.

>>> from transformers import pipeline
>>> unmasker = pipeline('fill-mask', model='distilbert-base-uncased')
>>> unmasker("The White man worked as a [MASK].")

[{'sequence': '[CLS] the white man worked as a blacksmith. [SEP]',
  'score': 0.1235365942120552,
  'token': 20987,
  'token_str': 'blacksmith'},
 {'sequence': '[CLS] the white man worked as a carpenter. [SEP]',
  'score': 0.10142576694488525,
  'token': 10533,
  'token_str': 'carpenter'},
 {'sequence': '[CLS] the white man worked as a farmer. [SEP]',
  'score': 0.04985016956925392,
  'token': 7500,
  'token_str': 'farmer'},
 {'sequence': '[CLS] the white man worked as a miner. [SEP]',
  'score': 0.03932540491223335,
  'token': 18594,
  'token_str': 'miner'},
 {'sequence': '[CLS] the white man worked as a butcher. [SEP]',
  'score': 0.03351764753460884,
  'token': 14998,
  'token_str': 'butcher'}]

>>> unmasker("The Black woman worked as a [MASK].")

[{'sequence': '[CLS] the black woman worked as a waitress. [SEP]',
  'score': 0.13283951580524445,
  'token': 13877,
  'token_str': 'waitress'},
 {'sequence': '[CLS] the black woman worked as a nurse. [SEP]',
  'score': 0.12586183845996857,
  'token': 6821,
  'token_str': 'nurse'},
 {'sequence': '[CLS] the black woman worked as a maid. [SEP]',
  'score': 0.11708822101354599,
  'token': 10850,
  'token_str': 'maid'},
 {'sequence': '[CLS] the black woman worked as a prostitute. [SEP]',
  'score': 0.11499975621700287,
  'token': 19215,
  'token_str': 'prostitute'},
 {'sequence': '[CLS] the black woman worked as a housekeeper. [SEP]',
  'score': 0.04722772538661957,
  'token': 22583,
  'token_str': 'housekeeper'}]

This bias will also affect all fine-tuned versions of this model.

Training data#

DistilBERT pretrained on the same data as BERT, which is BookCorpus, a dataset consisting of 11,038 unpublished books and English Wikipedia (excluding lists, tables and headers).

Training procedure#

Preprocessing#

The texts are lowercased and tokenized using WordPiece and a vocabulary size of 30,000. The inputs of the model are then of the form:

[CLS] Sentence A [SEP] Sentence B [SEP]

With probability 0.5, sentence A and sentence B correspond to two consecutive sentences in the original corpus and in the other cases, it's another random sentence in the corpus. Note that what is considered a sentence here is a consecutive span of text usually longer than a single sentence. The only constrain is that the result with the two "sentences" has a combined length of less than 512 tokens.

The details of the masking procedure for each sentence are the following:

  • 15% of the tokens are masked.
  • In 80% of the cases, the masked tokens are replaced by [MASK].
  • In 10% of the cases, the masked tokens are replaced by a random token (different) from the one they replace.
  • In the 10% remaining cases, the masked tokens are left as is.
Pretraining#

The model was trained on 8 16 GB V100 for 90 hours. See the training code for all hyperparameters details.

Evaluation results#

When fine-tuned on downstream tasks, this model achieves the following results:

Glue test results:

TaskMNLIQQPQNLISST-2CoLASTS-BMRPCRTE
82.288.589.291.351.385.887.559.9
BibTeX entry and citation info#
@article{Sanh2019DistilBERTAD,
  title={DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter},
  author={Victor Sanh and Lysandre Debut and Julien Chaumond and Thomas Wolf},
  journal={ArXiv},
  year={2019},
  volume={abs/1910.01108}
}

https://huggingface.co/exbert/?model=distilbert-base-uncased

Files

12 files · 1.53 GBWeights 268 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 12 files with their sha256
FileSizesha256
.gitattributes445 B98c91dabef4df27b2fc7c8454d220aba47476f73593cbd034d961fe4927304c1
LICENSE11.4 KB43070e2d4e532684de521b885f385d0841030efa2b1a20bafb76133a5e1379c1
README.md8.58 KBb925a22d8efd7a29608a0e10d3f2fb33d5d80df7de4ac6e34093853cd8e0274e
config.json483 B69c94b0222d5d1f4b0ad027ca7416cdafb98378cbbb8305d0bf47c9365c60c83
flax_model.msgpack268 MB101fa75462994e55b265fd62b0f44b9bb9f4d3fcb0c9d8986d2542850d0f0688
model.safetensors268 MB5e3f1108e3cb34ee048634875d8482665b65ac713291a7e32396fb18f6ff0063
pytorch_model.bin268 MBe60d71610916da4787c5513c81bc026d415708528295502fb3e1a6fe1485ea7c
rust_model.ot362 MB7ff3dc0119b9399681cf5661a9e450bb2ed2ecdb88338fb2c9d942c579164cc6
tf_model.h5363 MBe75cd1b76b546a498fe49ae3f0ca6f2ca4f2216c34010bea7232e8a0b95e93e8
tokenizer.json466 KBce64fce797c24f68df90b40a3f74f579b336a493db14bd583fd520ea0d8c9a98
tokenizer_config.json48 Ba025160ef0431f1a392f6f050c1310f4c5d9fb6f275932dbccba73c4d214bf10
vocab.txt232 KB07eced375cec144d27c900241f3e339478dec958f92fddbc551f295c992038a3
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
12040accad pinned now2026-11-15 02:25 UTC12 files · 1.53 GB

Use it

$ fw get distilbert/distilbert-base-uncased
# manifest sha256 24335b73baf6… · 1.53 GB · 12 files
$ fw verify ./distilbert-base-uncased distilbert/distilbert-base-uncased
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/distilbert/distilbert-base-uncased.json --dir ./distilbert-base-uncased $ python3 fw.py verify ./distilbert-base-uncased ./distilbert__distilbert-base-uncased.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download distilbert/distilbert-base-uncased --revision 12040accade4e8a0f71eabdb258fecc2e7e948be --local-dir ./distilbert-base-uncased

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
LICENSE
Text sha256
43070e2d4e532684de521b885f385d0841030efa2b1a20bafb76133a5e1379c1
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: distilbert <huggingface.co/distilbert>Newsgroups: alt.freeweights.visionSubject: distilbert-base-uncasedDate: 2026-11-15Commit: 12040acSigned: 2DC28CC7B26A283B ✓
Upstream
distilbert/distilbert-base-uncased
Pinned commit
12040accade4e8a0f71eabdb258fecc2e7e948be
Manifest
distilbert-base-uncased.json · .minisig
Manifest sha256
24335b73baf6f7e58828e16deeb4af4bb31b682ba4b271df7a2ab5ee18bd3f2c
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 02:25 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/distilbert/distilbert-base-uncased.json $ curl -O https://freeweights.allternit.com/manifests/distilbert/distilbert-base-uncased.json.minisig $ minisign -Vm distilbert-base-uncased.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 distilbert/distilbert-base-uncased
Open in Freeweights Studio

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

Signed manifest
minisign, key 2DC28CC7B26A283B. distilbert-base-uncased.json. Provenance. Takedown history: none.
From: dima806 <huggingface.co/dima806>Subject: ai_vs_real_image_detection
From: legekka <huggingface.co/legekka>Subject: AI-Anime-Image-Detector-ViT
From: onnx-community <huggingface.co/onnx-community>Subject: AI-Anime-Image-Detector-ViT-ONNX
From: AICodexLab <huggingface.co/AICodexLab>Subject: answerdotai-ModernBERT-base-ai-detector
From: onnx-community <huggingface.co/onnx-community>Subject: answerdotai-ModernBERT-base-ai-detector-ONNX
From: onnx-community <huggingface.co/onnx-community>Subject: bart-large-cnn-ONNX