[Issue] Trouble with Pegasus Model Checkpoint: ValueError - "You have to specify either decoder_input_ids or decoder_inputs_embeds"

I am currently working with the Pegasus model checkpoint (‘google/pegasus-xsum’) for a summarization task, and I am encountering the following issue:

Issue Description: I am receiving a ValueError with the message “You have to specify either decoder_input_ids or decoder_inputs_embeds” when attempting to generate summaries using the Pegasus model.

Steps to Reproduce:

  1. I have fine-tuned the model using the Hugging Face Transformers library.
  2. I am using the model.generate function to generate summaries.
  3. I have tried various methods to provide decoder_input_ids without success.

Additional Information:

  • I have already tried the following:
    • Updating the Transformers library to the latest version.
    • Reviewing the model initialization to ensure it matches the tokenizer.
    • Checking for known issues on the Transformers GitHub repository.

Expected Outcome: I expect the model to generate summaries without encountering the ValueError related to decoder_input_ids or decoder_inputs_embeds.
Windows is my os.
I am using google colab