# \[Issue\] Trouble with Pegasus Model Checkpoint: ValueError - "You have to specify either decoder\_input\_ids or decoder\_inputs\_embeds"

**URL:** <https://discuss.huggingface.co/t/issue-trouble-with-pegasus-model-checkpoint-valueerror-you-have-to-specify-either-decoder-input-ids-or-decoder-inputs-embeds/56985>\
**Category:** Models\
**Created:** [October 1, 2023, 9:30am UTC](https://discuss.huggingface.co/t/issue-trouble-with-pegasus-model-checkpoint-valueerror-you-have-to-specify-either-decoder-input-ids-or-decoder-inputs-embeds/56985 "2023-10-01T09:30:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Preeetha](https://avatars.discourse-cdn.com/v4/letter/p/8e8cbc/32.png) [@Preeetha](https://discuss.huggingface.co/u/Preeetha)\
**Post date:** [October 1, 2023, 9:30am UTC](https://discuss.huggingface.co/t/issue-trouble-with-pegasus-model-checkpoint-valueerror-you-have-to-specify-either-decoder-input-ids-or-decoder-inputs-embeds/56985/1 "2023-10-01T09:30:10Z")

</div>

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
