Fix window_size_left for flash attention v1

This fixes flash attention v1 by not raising NotImplementedError when window_size_left is left at its default of -1
This commit is contained in:
Peter Lowrance 2023-10-02 11:46:04 -04:00 committed by GitHub
parent 5ba53d44a1
commit 891b18a0c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,7 +80,7 @@ def attention(
)
if HAS_FLASH_ATTN:
if window_size_left != 0:
if window_size_left != -1:
raise NotImplementedError(
"window_size_left is only available with flash attn v2"
)