A implementation of BERT using PyTorch TransformerEncoder
and pre-trained model of google-research/bert.
pip install pytorch-bert
config = BertConfig.from_json("path-to-pretarined-weights/bert_config.json")
model = Bert(config)
load_tf_weight_to_pytorch_bert(model, config, "path-to-pretarined-weights/bert_model.ckpt")
Download model files in google-research/bert repository.