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

How to use flash attention when setting "--reset-position-ids"? #415

Closed
t90tank opened this issue Jul 11, 2023 · 3 comments
Closed

How to use flash attention when setting "--reset-position-ids"? #415

t90tank opened this issue Jul 11, 2023 · 3 comments

Comments

@t90tank
Copy link

t90tank commented Jul 11, 2023

It seems that Megatron do not pass attention mask to flash attention, but when setting "--reset-position-ids", different inputs have different attention masks.
Does Megatron support this case?

Also, can we open sequence parallel when setting "--reset-position-ids"?

@torshie
Copy link

torshie commented Jul 18, 2023

It seems --reset-position-ids doesn't work with flash attention. I checked flash attention's API, it supports causal attention mask only, not custom attention masks.

@mayank31398
Copy link

Yes, this won't work
See this PR: bigcode-project#53 in the BigCode fork

@t90tank
Copy link
Author

t90tank commented Aug 1, 2023

Thanks, I will try other ways.

@t90tank t90tank closed this as completed Aug 1, 2023
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

No branches or pull requests

3 participants