Downloads · 30 days
32.9K
2% of all-time downloads
julien-c/bert-xsmall-dummy
bert-xsmall-dummy is a fill-mask model from julien-c. Use it when you need the model to fill a missing word. It is set up for transformers.
Downloads · 30 days
32.9K
2% of all-time downloads
All-time downloads
1.6M
Public
Repo size
284 KB
Likes
0
Public
Click a slice to open those files.
.h5159 KB · 56%
From the Hugging Face model README
from transformers BertConfig, BertForMaskedLM, BertTokenizer, TFBertForMaskedLM
SMALL_MODEL_IDENTIFIER = "julien-c/bert-xsmall-dummy"
DIRNAME = "./bert-xsmall-dummy"
config = BertConfig(10, 20, 1, 1, 40)
model = BertForMaskedLM(config)
model.save_pretrained(DIRNAME)
tf_model = TFBertForMaskedLM.from_pretrained(DIRNAME, from_pt=True)
tf_model.save_pretrained(DIRNAME)
# Slightly different for tokenizer.
# tokenizer = BertTokenizer.from_pretrained(DIRNAME)
# tokenizer.save_pretrained()