SAVRN
Search Contact SAVRN

Open-weight model · Fill mask

distilbert-base-uncased

by DistilBERT community distilbert/distilbert-base-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.

Parameters67M
Context512
Weights1.5 GB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads7.5M

Runs On

What it takes to serve distilbert-base-uncased (67M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 0.1 GB 0.2 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.1 GB 0.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

SAVRN's Notes on distilbert-base-uncased

At 4-bit the memory line rounds to zero. That settles the hardware question for distilbert-base-uncased: 67M parameters, 0.2 GB needed at 16-bit, 0.1 GB at 8-bit, so the cheapest listed setup, one MI300X with 192 GB at $1.85 an hour, is far more card than the job. The task is fill mask, uncased, so english and English read the same, distilled from BERT base as teacher on bookcorpus and wikipedia with no human labels.

Apache 2.0 lets you ship it commercially, modify it and redistribute it, provided the license, copyright notices and any NOTICE file stay attached and significant changes are stated. Context is 512 tokens, which caps the span you mask in one pass. The 1.5 GB download across 12 files carries safetensors, PyTorch, JAX, Rust and TensorFlow; pick one. Check that a masked-language-model head, which is what DistilBertForMaskedLM ships, matches your pipeline.

Model Card

By DistilBERT community, published under apache-2.0, revision 12040accade4.

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:

Read the full model card (1,068 words)

Configuration

Architecture
DistilBertForMaskedLM
Context length (tokens)
512
Vocabulary size
30,522
Model type
distilbert

Identity and Version

Repository
distilbert/distilbert-base-uncased
Publisher
DistilBERT community
Task
Fill mask
Modality
Text
Library
transformers
Parameters
67M parameters
Languages
en
Revision
12040accade4e8a0f71eabdb258fecc2e7e948be
First published
2022-03-02
Last updated
2024-05-06

Files and Weights

12 files, 1.5 GB in total. The weights are 5 files totalling 1.5 GB in bin, h5, msgpack, ot, safetensors.

Weights5 files · 1.5 GB
Configuration1 file · 483 B
Tokenizer3 files · 697.6 KB
Documentation2 files · 19.9 KB
Repository1 file · 445 B
Every file
FileTypeSizeSHA-256
flax_model.msgpackWeights267.9 MB 101fa7546299
model.safetensorsWeights268.0 MB 5e3f1108e3cb
pytorch_model.binWeights268.0 MB e60d71610916
rust_model.otWeights361.7 MB 7ff3dc0119b9
tf_model.h5Weights363.4 MB e75cd1b76b54
config.jsonConfiguration483 B
LICENSEDocumentation11.4 KB
README.mdDocumentation8.6 KB
.gitattributesRepository445 B
tokenizer.jsonTokenizer466.1 KB
tokenizer_config.jsonTokenizer48 B
vocab.txtTokenizer231.5 KB

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
1.5 GB
Download from DistilBERT community

Released by DistilBERT community through its official repository on Hugging Face. Read the license.

Built From

  • Described by arXiv:1910.01108
  • Trained on (disclosed) bookcorpus
  • Trained on (disclosed) wikipedia

Memory Requirements

PrecisionWeights in memory
As published1.5 GB
16-bit0.1 GB
8-bit0.1 GB
4-bit0.0 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Built on This Model

Compare distilbert-base-uncased

Questions About distilbert-base-uncased

How much GPU memory does distilbert-base-uncased need?

About 0.2 GB at 16-bit and 0 GB at 4-bit: the weights (67M parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run distilbert-base-uncased on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use distilbert-base-uncased commercially?

Yes. distilbert-base-uncased is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

What is distilbert-base-uncased's context length?

512 tokens, from the maximum position embeddings in its published configuration.

Similar Models

This model is a distilled version of the RoBERTa-base model. It follows the same training procedure as DistilBERT. The code for the distillation process can be found here. The model has 6 layers, 768 dimension and 12 heads, totalizing 82M parameters (compared to 125M parameters for RoBERTa-base). On average DistilRoBERTa is twice as fast as Roberta-base. We encourage users of this model card to check out the RoBERTa-base model card to learn more about usage, limitations and potential biases. You can use the raw model for masked language modeling, 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.…

Open weights apache-2.0 83M parameters 514 tokens transformers

Model · Fill mask

SecBERT

Kun

This is the pretrained model presented in SecBERT: A Pretrained Language Model for Cyber Security Text, which is a BERT model trained on cyber security text. The training corpus was papers taken from SecBERT has its own wordpiece vocabulary (secvocab) that's built to best match the training corpus. We trained SecBERT and SecRoBERTa versions. We proposed to build language model which work on cyber security text, as result, it can improve downstream tasks (NER, Text Classification, Semantic Understand, Q&A) in Cyber Security Domain. First, as below shows Fill-Mask pipeline in Google Bert, AllenAI SciBert and our SecBERT. The original repo can be found here.

Open weights apache-2.0 84M parameters 514 tokens transformers

Model · Fill mask

bert-base-chinese

BERT community

This model has been pre-trained for Chinese, training and random input masking has been applied independently to word pieces (as in the original BERT paper). This model can be used for masked language modeling CONTENT WARNING: Readers should be aware this section contains content that is disturbing, offensive, and can propagate historical and current stereotypes. Significant research has explored bias and fairness issues with language models (see, e.g., Sheng et al. (2021) and Bender et al. (2021)). typevocabsize: 2 vocabsize: 21128 numhiddenlayers: 12

Open weights apache-2.0 103M parameters 512 tokens transformers

Model · Fill mask

bert-base-cased

BERT community

Pretrained model on English language using a masked language modeling (MLM) objective. It was introduced in this paper and first released in this repository. This model is case-sensitive: it makes a difference between english and English. Disclaimer: The team releasing BERT did not write a model card for this model so this model card has been written by the Hugging Face team. BERT is a transformers model pretrained on a large corpus of English data in a self-supervised fashion. 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…

Open weights apache-2.0 109M parameters 512 tokens transformers

Eval data: Conll03 (NER), GermEval14 (NER), GermEval18 (Classification), GNAD (Classification) Update April 3rd, 2020: we updated the vocabulary file on deepset's s3 to conform with the default tokenization of punctuation tokens. For details see the related FARM issue. If you want to use the old vocab we have also uploaded a "deepset/bert-base-german-cased-oldvocab" model. - We trained using Google's Tensorflow code on a single cloud TPU v2 with standard settings. - We trained 810k steps with a batch size of 1024 for sequence length 128 and 30k steps with sequence length 512. Training took about 9 days. - As training data we used the latest German Wikipedia dump (6GB of raw txt files), the…

Open weights mit 110M parameters 512 tokens transformers

Model · Fill mask

bert-base-uncased

BERT community

Pretrained model on English language using a masked language modeling (MLM) objective. It was introduced in this paper and first released in this repository. This model is uncased: it does not make a difference between english and English. Disclaimer: The team releasing BERT did not write a model card for this model so this model card has been written by the Hugging Face team. BERT is a transformers model pretrained on a large corpus of English data in a self-supervised fashion. This means it was pretrained on the raw texts only, with no humans labeling 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…

Open weights apache-2.0 110M parameters 512 tokens transformers