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

Update flash-attn install instructions #823

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

slmatrix
Copy link

match the install instructions to the repo; resolves build issues such as:

Building wheels for collected packages: flash-attn                                                                                                
  Building wheel for flash-attn (setup.py) ... error                                                                                              
  error: subprocess-exited-with-error                                                                                                             
                                                                                                                                                  
  × python setup.py bdist_wheel did not run successfully.                                                                                         
  │ exit code: 1                                                                                                                                  
  ╰─> [9 lines of output]                                                                                                                         
                                                                                                                                                  
                                                                                                                                                  
      torch.__version__  = 2.1.2                                                                                                                  
                                                                                                                                                  
                                                                                                                                                        running bdist_wheel                                                                                                                         
      Guessing wheel URL:  https://github.com/Dao-AILab/flash-attention/releases/download/v2.3.6/flash_attn-2.3.6+cu122torch2.1cxx11abiFALSE-cp311
-cp311-linux_x86_64.whl                                                                                                                           
      Raw wheel path /tmp/pip-wheel-u9phaxns/flash_attn-2.3.6-cp311-cp311-linux_x86_64.whl                                                        
      error: [Errno 18] Invalid cross-device link: 'flash_attn-2.3.6+cu122torch2.1cxx11abiFALSE-cp311-cp311-linux_x86_64.whl' -> '/tmp/pip-wheel-u9phaxns/flash_attn-2.3.6-cp311-cp311-linux_x86_64.whl'                                                                                            
      [end of output]                                                                                                                             
                                                                                                                                                  
  note: This error originates from a subprocess, and is likely not a problem with pip.                                                            
  ERROR: Failed building wheel for flash-attn                                                                                                     
  Running setup.py clean for flash-attn                                                                                                           
Failed to build flash-attn                                                                                                                        
ERROR: Could not build wheels for flash-attn, which is required to install pyproject.toml-based projects  

match the install instructions to the repo; resolves build issues such as:

```
Building wheels for collected packages: flash-attn                                                                                                
  Building wheel for flash-attn (setup.py) ... error                                                                                              
  error: subprocess-exited-with-error                                                                                                             
                                                                                                                                                  
  × python setup.py bdist_wheel did not run successfully.                                                                                         
  │ exit code: 1                                                                                                                                  
  ╰─> [9 lines of output]                                                                                                                         
                                                                                                                                                  
                                                                                                                                                  
      torch.__version__  = 2.1.2                                                                                                                  
                                                                                                                                                  
                                                                                                                                                        running bdist_wheel                                                                                                                         
      Guessing wheel URL:  https://github.com/Dao-AILab/flash-attention/releases/download/v2.3.6/flash_attn-2.3.6+cu122torch2.1cxx11abiFALSE-cp311
-cp311-linux_x86_64.whl                                                                                                                           
      Raw wheel path /tmp/pip-wheel-u9phaxns/flash_attn-2.3.6-cp311-cp311-linux_x86_64.whl                                                        
      error: [Errno 18] Invalid cross-device link: 'flash_attn-2.3.6+cu122torch2.1cxx11abiFALSE-cp311-cp311-linux_x86_64.whl' -> '/tmp/pip-wheel-u9phaxns/flash_attn-2.3.6-cp311-cp311-linux_x86_64.whl'                                                                                            
      [end of output]                                                                                                                             
                                                                                                                                                  
  note: This error originates from a subprocess, and is likely not a problem with pip.                                                            
  ERROR: Failed building wheel for flash-attn                                                                                                     
  Running setup.py clean for flash-attn                                                                                                           
Failed to build flash-attn                                                                                                                        
ERROR: Could not build wheels for flash-attn, which is required to install pyproject.toml-based projects  
```
@tangsipeng
Copy link

well done

@imrankh46
Copy link

@slmatrix
Doing this !pip install --upgrade wheel
And then install the flash attention or just use sdpa flash attention alternative.

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.

None yet

3 participants