AIAny
AI Model2022
Icon for item

DistilBERT (distilbert-base-uncased)

A compact pretrained bidirectional Transformer distilled from BERT base for masked language modeling and downstream NLP fine-tuning. Trained via knowledge distillation on BookCorpus and English Wikipedia, it reduces size/latency (≈67M params) while preserving BERT-like representations.

Introduction

Distillation makes strong language representations cheaper: this model trades parameter count and inference latency for a close approximation of BERT's internal features, so you can run typical sentence-level NLP tasks (classification, token labeling, QA embeddings) with much lower compute.

Key Capabilities
  • Knowledge-distilled BERT representations: trained to match BERT base logits and hidden states via a triple-objective (distillation loss, masked language modeling, cosine loss), so fine-tuned variants often approach BERT-level accuracy with smaller footprint.
  • Small, uncased Transformer backbone (≈67M parameters): lower memory and faster inference than BERT base, so it’s useful for CPU or latency-sensitive deployment and large-scale feature extraction.
  • Off-the-shelf masked-language and feature-extraction support: compatible with Hugging Face Transformers pipelines (fill-mask, text-classification, embeddings) and available in PyTorch/TF runtimes.
  • Standard pretraining data and behavior: pretrained on BookCorpus + English Wikipedia with WordPiece 30k vocabulary and the usual 15% masking scheme, so it integrates smoothly into existing BERT-style workflows.
Who It's For and Trade-offs

Great fit if you need a BERT-like encoder but want lower inference cost, e.g., production classifiers, token-labeling systems, embedding generation for retrieval, or quick prototyping on limited hardware. Look elsewhere if you require the absolute top GLUE/SQuAD performance (BERT-large or current larger encoder models) or if you need causal/text-generation capabilities (use GPT-family models for that). Note also that it inherits biases from its teacher and pretraining corpora; expect similar demographic and occupational biases and evaluate accordingly.

Where It Fits

Practical alternative to BERT base when throughput or deployment constraints matter; not a replacement for autoregressive generators. Often chosen as a baseline or backbone when teams want faster iteration and reduced cloud cost while preserving a bidirectional encoder architecture.

Information

  • Websitehuggingface.co
  • OrganizationsHugging Face
  • AuthorsVictor Sanh, Lysandre Debut, Julien Chaumond, Thomas Wolf
  • Published date2022/03/02

Categories

More Items

Hugging Face
AI Model2026

Converts text into speech in 16 languages, with eight built-in voices and multiple speaking styles. Designed for local use on Apple silicon, NVIDIA GPUs, or CPUs.

Hugging Face
AI Model2026

Compresses Inkling-2-Mini into 2.6- and 2.4-bit-per-weight GGUF files measuring 8.45 GB and 7.76 GB. The publisher reports retaining 97.9% and 96.3% of the original model’s benchmark accuracy, respectively.

Hugging Face
AI Model2026

Adds recurrent latent passes to Qwen3.8-27B through a lightweight adapter, aiming to reduce visible reasoning tokens. Runtime-switchable depth and calibrated MTP speculative decoding support MLX and vLLM.