# ValueError: You have to specify either decoder\_input\_ids or decoder\_inputs\_embeds

**URL:** <https://discuss.huggingface.co/t/valueerror-you-have-to-specify-either-decoder-input-ids-or-decoder-inputs-embeds/62141>\
**Category:** 🤗Transformers\
**Created:** [November 14, 2023, 2:10am UTC](https://discuss.huggingface.co/t/valueerror-you-have-to-specify-either-decoder-input-ids-or-decoder-inputs-embeds/62141 "2023-11-14T02:10:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![panigrah](https://avatars.discourse-cdn.com/v4/letter/p/bb73d2/32.png) [@panigrah](https://discuss.huggingface.co/u/panigrah)\
**Post date:** [November 14, 2023, 4:27am UTC](https://discuss.huggingface.co/t/valueerror-you-have-to-specify-either-decoder-input-ids-or-decoder-inputs-embeds/62141/2 "2023-11-14T04:27:24Z")

</div>

See @Rocketknight1 's response in this [thread](https://discuss.huggingface.co/t/fine-tuning-t5-on-tensorflow/12253/5).

Pass in the labels to your `to_tf_dataset` call

```auto
columns=["attention_mask", "input_ids", "labels"],

```

Also consider using the `model.prepare_tf_dataset` method which is supposed to shape the dataset appropriately - but I have not tried that out.

Also

---

_[View the full topic](https://discuss.huggingface.co/t/valueerror-you-have-to-specify-either-decoder-input-ids-or-decoder-inputs-embeds/62141)._
