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

Supporting memory efficient dropout in flash attention #23

Merged
merged 10 commits into from
Jun 5, 2024
Merged

Conversation

tongxin
Copy link
Collaborator

@tongxin tongxin commented May 29, 2024

The main difference from Tri Dao's cuda implementation is the way we handle philox rng state. We cannot easily control the per thread philox offset increment since Triton makes thread abstraction opaque. That means we cannot reproduce the dropout masks exactly the same way as the cuda version.
The second difference is about the nuances of where to apply scaling, masking, casting and everything. It's an experience not guided by principles but rather trial and error.

Copy link
Collaborator Author

@tongxin tongxin left a comment

Choose a reason for hiding this comment

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

Looks good.

Copy link
Collaborator

@iclementine iclementine left a comment

Choose a reason for hiding this comment

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

LGTM

@iclementine iclementine merged commit ee91638 into main Jun 5, 2024
1 check passed
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.

2 participants