Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error(s) in loading state_dict for BARTModel #8

Closed
engindeniz opened this issue Dec 4, 2020 · 4 comments
Closed

Error(s) in loading state_dict for BARTModel #8

engindeniz opened this issue Dec 4, 2020 · 4 comments

Comments

@engindeniz
Copy link

I have the same problem with #6. I installed fairseq as you suggested. There are required two paths for pretrained model, I defined them as follows:

  • checkpoint_file: I downloaded your model from here.

  • data_name_or_path: "Multi-View-Seq2Seq/train_sh/cnn_dm-bin_2/" (It is already in the repo)

Could you suggest any solution?

@jiaaoc
Copy link
Member

jiaaoc commented Dec 5, 2020

The errors look like the models you installed from fairseq do not have some modules in the pre-trained model (like the "w_proj"). I would suggest checking the installed faieseq.

@jiaaoc
Copy link
Member

jiaaoc commented Dec 5, 2020

For a quick check, I would suggest random initializing a Bart model and checking its named parameters.

@jiaaoc jiaaoc closed this as completed Dec 5, 2020
@jiaaoc
Copy link
Member

jiaaoc commented Dec 7, 2020

When I load the BART pretrained model, I can load without any error. I think that mismatch of named parameters is between your pretrained model and the Bart model. Could you check it, please? Btw, I am using "Eval_Sum.ipynb".

In this case, it seems that the fairseq you are using in the notebook is not correct. As our model indeed is different from original BART.

@engindeniz
Copy link
Author

I uninstalled and installed it again. It is working now. I don't know what happened exactly before. It might about my conda configuration.
Thank you so much for your response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants