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
?
hyesunyun
changed discussion status to
closed