-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PyTorch] Add sliding window support to FlashAttention (#551)
* add sliding window to FA Signed-off-by: Charlene Yang <[email protected]> * fix forward logic Signed-off-by: Charlene Yang <[email protected]> * fix lint Signed-off-by: Charlene Yang <[email protected]> * change bert test to causal as unfused does not support padding Signed-off-by: Charlene Yang <[email protected]> * fix FlashAttention for v2-2.3 versions Signed-off-by: Charlene Yang <[email protected]> * verify FA swa works Signed-off-by: Charlene Yang <[email protected]> * fix mask related restrictions and duplicate code after merge Signed-off-by: Charlene Yang <[email protected]> * fix swa test Signed-off-by: Charlene Yang <[email protected]> * add docstring for get_swa func Signed-off-by: Charlene Yang <[email protected]> * move repeated code into a function Signed-off-by: Charlene Yang <[email protected]> * revert mask change Signed-off-by: Charlene Yang <[email protected]> * add determinism filter and fix FA warning message Signed-off-by: Charlene Yang <[email protected]> * add message for determinism filter Signed-off-by: Charlene Yang <[email protected]> * simplify check_set_window_size() Signed-off-by: Charlene Yang <[email protected]> * fix check_set_window_size in transformer layers Signed-off-by: Charlene Yang <[email protected]> * fix indent Signed-off-by: Charlene Yang <[email protected]> --------- Signed-off-by: Charlene Yang <[email protected]> Signed-off-by: cyanguwa <[email protected]>
- Loading branch information
Showing
3 changed files
with
204 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.