Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

Latest commit

 

History

History
27 lines (19 loc) · 1.22 KB

README.md

File metadata and controls

27 lines (19 loc) · 1.22 KB

pytorch-bert

codecov CircleCI PyPI PyPI Pyversion

A implementation of BERT using PyTorch TransformerEncoder and pre-trained model of google-research/bert.

Installation

pip install pytorch-bert

Usage

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.