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

The state dictionary of the model you are training to load is corrupted. #3

Open
marcussyeo opened this issue Jan 16, 2022 · 3 comments

Comments

@marcussyeo
Copy link

Hello I'm interested to test out the PRIMER model but when I followed the steps accordingly, I ended up getting

"ValueError: The state dictionary of the model you are training to load is corrupted. Are you sure it was properly saved?"

I've tried reinstalling the PRIMER-large packages too but to no avail. Did anyone encounter the same issue?

@marcussyeo
Copy link
Author

from transformers import AutoTokenizer
from transformers import LEDForConditionalGeneration, LEDConfig
tokenizer = AutoTokenizer.from_pretrained('./PRIMER/')
config = LEDConfig.from_pretrained('./PRIMER/')
model = LEDForConditionalGeneration.from_pretrained('./PRIMER/', config=config)

^this is my code but i got a ValueError saying that my model is corrupted. Tried on both windows and linux but both don't work.

@Wendy-Xiao
Copy link
Contributor

Wendy-Xiao commented Jan 18, 2022

Hi, you can follow the instruction on usage of PRIMER in readme.md. Basically, we used the original Longformer implementation instead of huggingface version. So please install Longformer by pip install git+https://github.com/allenai/longformer.git

@giammi56
Copy link

@MYB0SS I am starring using PRIMER too, but I am not able to feed it with multiple texts as inputs to summarize. Could you share how you did it?

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

3 participants