Skip to content

docs: clarify decoder_input_ids vs decoder_inputs_embeds usage (#39542) #40225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Wricha
Copy link

@Wricha Wricha commented Aug 17, 2025

This PR adds a note under PreTrainedModel clarifying that seq2seq models
such as MarianMT, BART, and T5 accept either decoder_input_ids or
decoder_inputs_embeds, but not both. Passing both arguments raises a
ValueError.

This addresses issue #39542.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant