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

is_causal arg appears twice in FAttention call from GPT2Attention.forward() #35380

Open
2 of 4 tasks
poedator opened this issue Dec 21, 2024 · 1 comment
Open
2 of 4 tasks
Labels

Comments

@poedator
Copy link
Contributor

poedator commented Dec 21, 2024

System Info

4.48.dev ubuntu18, py3.11

Who can help?

@ArthurZucker based on #35235
@Cyrilvallez based on #35342

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

use GPT2 with flash attn.

in

attn_output = _flash_attention_forward(

it inserts is_causal argument twice, from kwargs and explicitely. causes TypeError: transformers.modeling_flash_attention_utils._flash_attention_forward() got multiple values for keyword argument 'is_causal'

the kwargs get is_causal from GPT2Attention.forward()

Expected behavior

use is_causal just once

please add GPT2 to your release tests suite

@Cyrilvallez
Copy link
Member

Hey @poedator, indeed, thanks for reporting this issue! I opened a PR here to fix it!

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

2 participants