You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using unsloth, I noticed an issue with the flash-attn detection logic. Specifically, unsloth checks for the presence of flash-attn using the following code:
However, in latest flash-attn(mine is 2.7.3), the flash_attn_cuda module has been removed and replaced with flash_attn_gpu (see this commit). As a result, unsloth's detection logic fails for flash-attn, incorrectly concluding that flash-attn is not installed or is broken, and falls back to xformers.
Expected Behavior
unsloth should correctly detect the presence of flash-attn regardless of whether the installed version uses flash_attn_cuda or flash_attn_gpu.
Actual Behavior
When flash-attn is installed, unsloth fails to detect it and falls back to xformers, even though flash-attn is properly installed and functional.
Problem Description
When using unsloth, I noticed an issue with the flash-attn detection logic. Specifically, unsloth checks for the presence of flash-attn using the following code:
However, in latest flash-attn(mine is 2.7.3), the flash_attn_cuda module has been removed and replaced with flash_attn_gpu (see this commit). As a result, unsloth's detection logic fails for flash-attn, incorrectly concluding that flash-attn is not installed or is broken, and falls back to xformers.
Expected Behavior
unsloth should correctly detect the presence of flash-attn regardless of whether the installed version uses flash_attn_cuda or flash_attn_gpu.
Actual Behavior
When flash-attn is installed, unsloth fails to detect it and falls back to xformers, even though flash-attn is properly installed and functional.
Steps to Reproduce
Environment Information
Python Version: 3.10
PyTorch Version: 2.5.1+cu124
CUDA Version: 12.4
flash-attn Version: 2.7.3
The text was updated successfully, but these errors were encountered: