A command-line interface is provided to convert original Bert/GPT/GPT-2/Transformer-XL/XLNet/XLM checkpoints in models than be loaded using the from_pretrained methods of the library.

example:

export BERT_BASE_DIR=/path/to/bert/uncased_L-12_H-768_A-12

transformers-cli convert --model_type bert \
  --tf_checkpoint $BERT_BASE_DIR/bert_model.ckpt \
  --config $BERT_BASE_DIR/bert_config.json \
  --pytorch_dump_output $BERT_BASE_DIR/pytorch_model.bin

 

https://huggingface.co/transformers/converting_tensorflow_models.html

 

相关文章:

  • 2022-01-03
  • 2022-12-23
  • 2022-01-27
  • 2021-08-02
  • 2021-10-17
  • 2022-12-23
  • 2021-05-22
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-05
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2021-05-26
  • 2021-11-11
相关资源
相似解决方案