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

add FlashAttention-2 support #38

Merged
merged 6 commits into from
Aug 1, 2023
Merged

add FlashAttention-2 support #38

merged 6 commits into from
Aug 1, 2023

Conversation

iMountTai
Copy link
Collaborator

Description

This PR add support for FlashAttention-2 and enable FlashAttention-2 training by setting the argument --flash_attn

Usage
Just add the --flash_attn to the launching command. For example:

torchrun --nnodes 1 --nproc_per_node 1 run_clm_pt_with_peft.py \
    --other_arguments
    --flash_attn

Related Issue

#26

@iMountTai iMountTai requested a review from airaria August 1, 2023 08:58
@ymcui
Copy link
Owner

ymcui commented Aug 1, 2023

TODO: Update wiki w.r.t. this PR. @iMountTai

@ymcui ymcui merged commit 8ef2788 into ymcui:main Aug 1, 2023
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.

3 participants
  翻译: