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

#2
by JenHao - opened

When I load this model from hugging face, this error occurred.

Hello!

I haven't used this model in a while and have not been maintaining this so not sure if this works with the latest huggingface version.
I know that it was working over a year ago.

How are you initializing the model?

Thanks for response,
I use the following program.

from transformers import BartForConditionalGeneration, AutoTokenizer
model_ckpt = "hyesunyun/update-summarization-bart-large-longformer"
tokenizer = AutoTokenizer.from_pretrained(model_ckpt)
model = BartForConditionalGeneration.from_pretrained(model_ckpt)

Could you try using LEDTokenizer and LEDForConditionalGeneration instead to initialize the model? The tokenizer and model have been finetuned using these.
Is there a specific reason for using BartForConditionalGeneration?

@JenHao Just wanted to check back with you to see if you need any further assistance.

If you have any further questions, please let me know.
I will close this discussion.

hyesunyun changed discussion status to closed

Sign up or log in to comment