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

distilbert-base-cased

Date: 2026-11-15Commit: 6ea8117Signed: 2DC28CC7B26A283B ✓

Fill mask model with 66M parameters. Onnx and safetensors weights, 1.14 GB in all. Published by distilbert under Apache-2.0.

66M params1.14GBdistilbert-base-casedonnx safetensorspermissive
FactsParams66MSize1.14 GBFormatsonnx, safetensorsTaskfill maskLicenseApache-2.0From sourcepermissive
$ fw get distilbert/distilbert-base-cased
# manifest sha256 36f877ef4ebb… · 1.14 GB · 10 files
$ fw verify ./distilbert-base-cased distilbert/distilbert-base-cased
From sourceHosted (signed)distilbert/distilbert-base-casedLast check: 2026-11-15 02:27 UTC

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

Overview

Size
1.14 GB
Weights
263 MB (safetensors)
Parameters
66M
Formats
onnx, safetensors
Task
fill mask
License
Apache-2.0 (permissive)
Files
10, 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:27 UTCpassed

Model card

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

Model Card for DistilBERT base model (cased)#

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 cased: it does make a difference between english and English.

All the training details on the pre-training, the uses, limitations and potential biases (included below) are the same as for DistilBERT-base-uncased. We highly encourage to check it if you want to know more.

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
81.587.888.290.447.285.585.660.6
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

10 files · 1.14 GBWeights 263 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 10 files with their sha256
FileSizesha256
.gitattributes399 Ba368a21c472071feec9095f63d5f7d3433826c1c476a6995f072b6755ccc6f59
README.md8.81 KB23259c202926ad1b506cdf9cb9c82853d9887ed1989810a5445be398d7b681ec
config.json465 B165376e2c837d836c75ae30fde8c5569beb3ed7325b7473c18a76e4608cdec22
model.onnx261 MBcc5b0665fec58476b83b262450de920d57c7e0aaf66126731b10834c52d5aa1c
model.safetensors263 MB64080c2b1998c3bd1214311ab9f1e97b40052fa81d508b8b534a936c4ba1626b
pytorch_model.bin263 MB89bb1c03c52a90f666a7ef6b216c5fa07608ce4355b16dc984192f1edb08b113
tf_model.h5354 MBcead32d02b605245c06a87c760d32366261a445bd16ef0280c7543732a767099
tokenizer.json436 KB5b3360be30cdf39081153cf9d30bfb0503c011462fc9f77f097127c83ef0f4d9
tokenizer_config.json49 B0f6d13e6f4da6f9e24f22ada6bc3be571123d858d7c0c05a8a7cd55a9c23c2e8
vocab.txt213 KBeeaa9875b23b04b4c54ef759d03db9d1ba1554838f8fb26c5d96fa551df93d02
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
6ea8117246 pinned now2026-11-15 02:27 UTC10 files · 1.14 GB

Use it

$ fw get distilbert/distilbert-base-cased
# manifest sha256 36f877ef4ebb… · 1.14 GB · 10 files
$ fw verify ./distilbert-base-cased distilbert/distilbert-base-cased
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-cased.json --dir ./distilbert-base-cased $ python3 fw.py verify ./distilbert-base-cased ./distilbert__distilbert-base-cased.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download distilbert/distilbert-base-cased --revision 6ea81172465e8b0ad3fddeed32b986cdcdcffcf0 --local-dir ./distilbert-base-cased

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
23259c202926ad1b506cdf9cb9c82853d9887ed1989810a5445be398d7b681ec
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-casedDate: 2026-11-15Commit: 6ea8117Signed: 2DC28CC7B26A283B ✓
Upstream
distilbert/distilbert-base-cased
Pinned commit
6ea81172465e8b0ad3fddeed32b986cdcdcffcf0
Manifest
distilbert-base-cased.json · .minisig
Manifest sha256
36f877ef4ebb8a3148087520c3e0e62a132b3905f8a007c8184d9c8ec447dca9
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 02:27 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

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

1 model in the catalog name this one as their parent.

Quantizations
1
Quantizations 1
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download distilbert/distilbert-base-cased
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-cased.json. Provenance. Takedown history: none.

Variants

1 quantized or adapter build of distilbert-base-cased. Each has its own license check and page.

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