Skip to content

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

Closed
Wricha wants to merge 1 commit into
huggingface:mainfrom
Wricha:fix-docs-typo
Closed

Wricha wants to merge 1 commit into
huggingface:mainfrom
Wricha:fix-docs-typo

Conversation

@Wricha

@Wricha Wricha commented Aug 17, 2025

Copy link
Copy Markdown

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.

@ArthurZucker

Copy link
Copy Markdown
Collaborator

Thanks for the PR, and sorry it didn't make it in! This branch is based on v4, and v5 is very different, so rather than rebasing we'd love to invite you to open a new PR against main using our latest tools and good practices:

Closing this one in the meantime, thanks again!

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.

2 participants