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

Bart: check if decoder_inputs_embeds is set #13800

Commits on Sep 29, 2021

  1. Bart: check if decoder_inputs_embeds is set

    In BartForConditionalGeneration.forward, if labels are provided,
       decoder_input_ids are set to the labels shifted to the right.
       This is problematic: if decoder_inputs_embeds is also set,
       the call to self.model, which eventually gets to BartDecoder.forward,
       will raise an error.
       The fix is quite simple, similar to what is there already in
       BartModel.forward. Mainly, we should not
       compute decoder_input_ids if decoder_inputs_embeds is provided.
    Silviu Vlad Oprea committed Sep 29, 2021
    Configuration menu
    Copy the full SHA
    0896c14 View commit details
    Browse the repository at this point in the history