Skip to content

BLOOM - Fix mask creation by default#17837

Merged
younesbelkada merged 1 commit intohuggingface:mainfrom
younesbelkada:bloom-fix-attn-mask
Jun 27, 2022
Merged

BLOOM - Fix mask creation by default#17837
younesbelkada merged 1 commit intohuggingface:mainfrom
younesbelkada:bloom-fix-attn-mask

Conversation

@younesbelkada
Copy link
Copy Markdown
Contributor

  • fix niche case where the mask is not fed to the forward function

cc @justheuristic

- fix niche case where the mask is not fed to the forward function

Co-authored-by: justheuristic <justheuristic@users.noreply.github.com>
@younesbelkada younesbelkada changed the title Fix mask creation by default BLOOM - Fix mask creation by default Jun 23, 2022
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

HuggingFaceDocBuilderDev commented Jun 23, 2022

The documentation is not available anymore as the PR was closed or merged.

@younesbelkada younesbelkada marked this pull request as ready for review June 24, 2022 13:17
@younesbelkada younesbelkada requested a review from sgugger June 27, 2022 08:46
Copy link
Copy Markdown
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would this happen? LGTM otherwise.

@justheuristic
Copy link
Copy Markdown
Contributor

This happens if user decides to run model(input_ids=some_tensor), which originally happened during prototyping (in a notebook).

It is indeed a niche case;
However, the fact that mask is optional can hint other users to the idea that they can keep it None - and it would be more intuitive if having mask=None would be equivalent to passing all ones, like in GPT2Model for example.

@younesbelkada younesbelkada merged commit 3ec7d4c into huggingface:main Jun 27, 2022
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.

4 participants