SAVRN
Search Contact SAVRN

Open-weight model

bert-tiny

by Prajjwal prajjwal1/bert-tiny

The following model is a Pytorch pre-trained model obtained from converting Tensorflow checkpoint found in the official Google BERT repository. This is one of the smaller pre-trained BERT variants, together with bert-mini bert-small and bert-medium.

Parameters
Context512
Weights17.8 MB
Licensemit
AccessOpen weights
Monthly Downloads1.1M

Model Card

By Prajjwal, published under mit, revision 6f75de8b60a9.

The following model is a Pytorch pre-trained model obtained from converting Tensorflow checkpoint found in the official Google BERT repository. This is one of the smaller pre-trained BERT variants, together with bert-mini bert-small and bert-medium. They were introduced in the study Well-Read Students Learn Better: On the Importance of Pre-training Compact Models (arxiv), and ported to HF for the study Generalization in NLI: Ways (Not) To Go Beyond Simple Heuristics (arXiv). These models are supposed to be trained on a downstream task. If you use the model, please consider citing both the papers: - prajjwal1/bert-tiny (L=2, H=128) Model Link - prajjwal1/bert-mini (L=4, H=256) Model Link…

Read Prajjwal's full model card

The following model is a Pytorch pre-trained model obtained from converting Tensorflow checkpoint found in the official Google BERT repository.

This is one of the smaller pre-trained BERT variants, together with bert-mini bert-small and bert-medium. They were introduced in the study Well-Read Students Learn Better: On the Importance of Pre-training Compact Models (arxiv), and ported to HF for the study Generalization in NLI: Ways (Not) To Go Beyond Simple Heuristics (arXiv). These models are supposed to be trained on a downstream task.

If you use the model, please consider citing both the papers:

@misc{bhargava2021generalization,
      title={Generalization in NLI: Ways (Not) To Go Beyond Simple Heuristics}, 
      author={Prajjwal Bhargava and Aleksandr Drozd and Anna Rogers},
      year={2021},
      eprint={2110.01518},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

@article{DBLP:journals/corr/abs-1908-08962,
  author    = {Iulia Turc and
               Ming{-}Wei Chang and
               Kenton Lee and
               Kristina Toutanova},
  title     = {Well-Read Students Learn Better: The Impact of Student Initialization
               on Knowledge Distillation},
  journal   = {CoRR},
  volume    = {abs/1908.08962},
  year      = {2019},
  url       = {http://arxiv.org/abs/1908.08962},
  eprinttype = {arXiv},
  eprint    = {1908.08962},
  timestamp = {Thu, 29 Aug 2019 16:32:34 +0200},
  biburl    = {https://dblp.org/rec/journals/corr/abs-1908-08962.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}

Config of this model: - prajjwal1/bert-tiny (L=2, H=128) Model Link

Other models to check out: - prajjwal1/bert-mini (L=4, H=256) Model Link - prajjwal1/bert-small (L=4, H=512) Model Link - prajjwal1/bert-medium (L=8, H=512) Model Link

Original Implementation and more info can be found in this Github repository.

Twitter: @prajjwal_1

Configuration

Context length (tokens)
512
Layers
2
Hidden size
128
Feed-forward size
512
Attention heads
2
Vocabulary size
30,522

Identity and Version

Repository
prajjwal1/bert-tiny
Publisher
Prajjwal
Task
Not stated by the source
Modality
Other
Library
transformers
Parameters
Not stated by the source
Languages
en
Revision
6f75de8b60a9f8a2fdf7b69cbd86d9e64bcb3837
First published
2022-03-02
Last updated
2021-10-27

Files and Weights

5 files, 18.0 MB in total. The weights are 1 file totalling 17.8 MB in bin.

Weights1 file · 17.8 MB
Configuration1 file · 285 B
Tokenizer1 file · 231.5 KB
Documentation1 file · 2.6 KB
Repository1 file · 345 B
Every file
FileTypeSizeSHA-256
pytorch_model.binWeights17.8 MB dab2c2bddcfb
config.jsonConfiguration285 B
README.mdDocumentation2.6 KB
.gitattributesRepository345 B
vocab.txtTokenizer231.5 KB

License and Download

License
mit
Access
Open weights, no gate
Download size
17.8 MB
Download from Prajjwal

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

Built From

Memory Requirements

PrecisionWeights in memory
As published17.8 MB

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

Questions About bert-tiny

Can I use bert-tiny commercially?

Yes. bert-tiny is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.

What is bert-tiny's context length?

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