from transformers import BertConfig, BertModel config = BertConfig() model = BertModel(config).from_pretrained('bert-base-cased')