Converting fairseq NMT to transformers misses model weight
See original GitHub issueHi there, question about fairseq NMT model (FSMT) conversion.
I tried to convert my own fairseq-nmt model (transformer_wmt_en_de
) based on this conversion script.
However, decoder.embed_out
weight is missing after converting fairseq model to transformers FSMT model. This parameter exists when not specifing --share-all-embeddings
or --share-decoder-input-output-embed
, while official fairseq wmt models do not have decoder.embed_out
weight because specifying --share-all-embedding
.
https://github.com/pytorch/fairseq/issues/2537
Are there any solution or tips to converting own fairseq model?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (8 by maintainers)
Top Results From Across the Web
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 >Command-line Tools — fairseq 0.12.2 documentation
Fairseq provides several command-line tools for training and evaluating models: fairseq-preprocess: Data pre-processing: build vocabularies and binarize ...
Read more >Using Confidential Data for Domain Adaptation of Neural ...
Fine-tuning is the conventional way to apply domain adaption for NMT (Luong, Manning, et al.,. 2015; Sennrich et al., 2016b) in the scenario ......
Read more >CTranslate2 2.0 release - Announcements - OpenNMT Forum
0 · OpenNMT/CTranslate2. New features Support conversion of Transformer models trained with Fairseq (see script ct2-fairseq-converter) Support ...
Read more >Implementing Transformer for Language Modeling
We build the Transformer for language modeling using Fairseq and Pytorch. We train on the CMU Book Summary Dataset, evaluate the model, ...
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
Thank you for clarifying that your original issue has been resolved. Please feel free to close this issue when you feel it’s working for you.
Based on your comments, I’m concerned about 2 things:
output_projection
layer is getting in the way of your model if it was trained without it. You could try to hunt down the few lines where it’s used in the code and and bypass it and test whether your translation works then. If you’re comfortable editing the source code that is.Pinging @stas00 here