Skip to content
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

Can't use decoder_inputs_embeds argument on MBartForConditionalGeneration #19157

Closed
2 of 4 tasks
hibiki12y opened this issue Sep 22, 2022 · 2 comments
Closed
2 of 4 tasks
Labels

Comments

@hibiki12y
Copy link

System Info

  • transformers version: 4.22.0
  • Platform: Linux-4.4.0-210-generic-x86_64-with-glibc2.23
  • Python version: 3.9.12
  • Huggingface_hub version: 0.7.0
  • PyTorch version (GPU?): 1.12.0 (True)
  • Tensorflow version (GPU?): 2.9.1 (True)
  • Flax version (CPU?/GPU?/TPU?): not installed (NA)
  • Jax version: not installed
  • JaxLib version: not installed
  • Using GPU in script?: yes
  • Using distributed or parallel set-up in script?: yes

Who can help?

@patil-suraj

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

maybe not necessary

Expected behavior

#13800

Looks same problem at MBartForConditionalGeneration.foward

It is written as:

if decoder_input_ids is None:
    decoder_input_ids = shift_tokens_right(labels, self.config.pad_token_id)

So, looks need edit to:

if decoder_input_ids is None and decoder_inputs_embeds is None:
    decoder_input_ids = shift_tokens_right(labels, self.config.pad_token_id)
@hibiki12y hibiki12y added the bug label Sep 22, 2022
@LysandreJik
Copy link
Member

Maybe of interest to @ArthurZucker :)

@ArthurZucker
Copy link
Collaborator

ArthurZucker commented Oct 17, 2022

Having a look right now! Thanks for finding this 🤗

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

No branches or pull requests

3 participants