pytorch-bert

bert implementation


Keywords
bert, machine-learning, nlp, paper-implementations, python3, pytorch
License
MIT
Install
pip install pytorch-bert==1.0.0a4

Documentation

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.