A command-line interface is provided to convert original Bert/GPT/GPT-2/Transformer-XL/XLNet/XLM checkpoints to models
that can be loaded using the from_pretrained methods of the library.
Since 2.3.0 the conversion script is now part of the transformers CLI (transformers-cli) available in any
transformers >= 2.3.0 installation.
The documentation below reflects the transformers-cli convert command format.
BERT
You can convert any TensorFlow checkpoint for BERT (in particular the pre-trained models released by Google) in a PyTorch save file by using the
convert_bert_original_tf_checkpoint_to_pytorch.py script.
This CLI takes as input a TensorFlow checkpoint (three files starting with bert_model.ckpt) and the associated
configuration file (bert_config.json), and creates a PyTorch model for this configuration, loads the weights from
