the TensorFlow checkpoint in the PyTorch model and saves the resulting model in a standard PyTorch save file that can
be imported using from_pretrained() (see example in quicktour , run_glue.py ).
You only need to run this conversion script once to get a PyTorch model. You can then disregard the TensorFlow
checkpoint (the three files starting with bert_model.ckpt) but be sure to keep the configuration file (\
bert_config.json) and the vocabulary file (vocab.txt) as these are needed for the PyTorch model too.
To run this specific conversion script you will need to have TensorFlow and PyTorch installed (pip install tensorflow). The rest of the repository only requires PyTorch.
Here is an example of the conversion process for a pre-trained BERT-Base Uncased model:
```bash
export BERT_BASE_DIR=/path/to/bert/uncased_L-12_H-768_A-12
