Converting transformer-LM (GPT2) trained by fairseq to huggingface transformers
See original GitHub issueAfter training transformer-LM using fairseq (--task language_modeling -- arch transformer_lm_gpt2_medium
), I want to use this transformer-LM (GPT2-medium) by huggingface-transformers.
How is is possible to convert fairseq gpt2 model to huggingface gpt2?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Converting transformer-LM (GPT2) trained by fairseq to ...
Converting transformer-LM (GPT2) trained by fairseq to huggingface ... How is is possible to convert fairseq gpt2 model to huggingface gpt2?
Read more >How can I convert a model created with fairseq? - Beginners
Hi, I fine tuned facebook's model mbart.cc25 for machine translation with Fairseq, it saved its model as checkpoint_*.pt. How can I use it ......
Read more >Porting fairseq wmt19 translation system to transformers
Generate translation: take input numbers, run them through a pre-trained machine learning model which predicts the best translation, and return ...
Read more >How to convert Fairseq model to huggingface transformer model
I want to deploy my model in huggingface. How can I convert fairseq model?. If it is possible how can I parse data...
Read more >Source code for transformers.modeling_fsmt - Hugging Face
But if you want # to match fairseq outputs, you need to pass ... training=self.training) # Convert to FSMT output format: (seq_len, BS,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
They have a script for converting RoBERTa checkpoints to the transformers library: https://github.com/huggingface/transformers/blob/master/transformers/convert_roberta_original_pytorch_checkpoint_to_pytorch.py
It’d be great to have something similar for language modeling. PRs welcome!
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!