Skip to content

437 upgrade fix for falcon#700

Merged
regisss merged 4 commits into
transformers_4.35from
disable_sdpa_mask
Feb 10, 2024
Merged

437 upgrade fix for falcon#700
regisss merged 4 commits into
transformers_4.35from
disable_sdpa_mask

Conversation

@libinta
Copy link
Copy Markdown
Collaborator

@libinta libinta commented Feb 9, 2024

As torch.all inside _prepare_4d_causal_attention_mask_for_sdpa causes… d2h copy and impact falcon performance,

we disable the falcon model to use _prepare_4d_causal_attention_mask_for_sdpa. Instead passing normal constructed 4D
to sdpa.

What does this PR do?

Fixes # (issue)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

… d2h copy and impact falcon performance,

 we disable the falcon model to use _prepare_4d_causal_attention_mask_for_sdpa. Instead passing normal constructed 4D
to sdpa.
@libinta libinta requested a review from mandy-li as a code owner February 9, 2024 17:22
@libinta libinta requested a review from a user February 9, 2024 17:22
@libinta libinta requested a review from regisss as a code owner February 9, 2024 17:22
Copy link
Copy Markdown
Collaborator

@regisss regisss left a comment

Choose a reason for hiding this comment

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

LGTM

@regisss regisss merged commit 0f668e8 into transformers_4.35 Feb 10, 2024
@regisss regisss deleted the disable_sdpa_mask branch February 10, 2024 15:12
gplutop7 pushed a commit to HabanaAI/optimum-habana-fork that referenced this pull request Oct 15, 2025
…huggingface#700)

Co-authored-by: Ilyas Moutawwakil <57442720+IlyasMoutawwakil@users.noreply.github.com>
gplutop7 pushed a commit to HabanaAI/optimum-habana-fork that referenced this pull request Nov 6, 2025
…huggingface#700)

Co-authored-by: Ilyas Moutawwakil <57442720+IlyasMoutawwakil@users.noreply.github.com>
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.

3 participants