private-and-fair / server-side /fill-in-the-blank /py /model_bert_large_export.py
mervenoyan's picture
commit files to HF hub
30e9731
raw
history blame contribute delete
433 Bytes
from transformers import (BertForMaskedLM, BertTokenizer)
modelpath = 'bert-large-uncased-whole-word-masking'
model = BertForMaskedLM.from_pretrained(modelpath)
model.save_pretrained('./bert-large-uncased-whole-word-masking')
# from transformers import (BertForMaskedLM, BertTokenizer)
# modelpath = 'bert-large-uncased'
# model = BertForMaskedLM.from_pretrained(modelpath)
# model.save_pretrained('./bert-large-uncased')