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

'_flash_supports_window_size' is not defined #32

Open
boji123 opened this issue Sep 27, 2024 · 5 comments
Open

'_flash_supports_window_size' is not defined #32

boji123 opened this issue Sep 27, 2024 · 5 comments

Comments

@boji123
Copy link

boji123 commented Sep 27, 2024

2024-09-27 14:47:10 | ERROR | stderr | File "anaconda3/envs/llama-omni/lib/python3.10/site-packages/transformers/modeling_flash_attention_utils.py", line 180, in _flash_attention_forward
2024-09-27 14:47:10 | ERROR | stderr | _flash_supports_window_size and sliding_window is not None and key_states.shape[1] > sliding_window
2024-09-27 14:47:10 | ERROR | stderr | NameError: name '_flash_supports_window_size' is not defined

transformers 4.43.4

@maugomez77
Copy link

any update on this one?

@NghiaaPD
Copy link

NghiaaPD commented Oct 8, 2024

same issue :)))

@Domanmaker
Copy link

me too

@UltraEval
Copy link

flash_attn is too lower, must be >=2.1.0 if use CUDA
image
better download whl from https://github.com/Dao-AILab/flash-attention/releases, then pip install

@wu-wen-zhou
Copy link

Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
fatal: not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/tmp/pip-install-j7xyhe9c/flash-attn_d871209e23f84ff78b283e03c2e57230/setup.py", line 156, in
_, bare_metal_version = get_cuda_bare_metal_version(CUDA_HOME)
File "/tmp/pip-install-j7xyhe9c/flash-attn_d871209e23f84ff78b283e03c2e57230/setup.py", line 82, in get_cuda_bare_metal_version
raw_output = subprocess.check_output([cuda_dir + "/bin/nvcc", "-V"], universal_newlines=True)
File "/root/miniconda3/envs/llama-omni/lib/python3.10/subprocess.py", line 421, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/root/miniconda3/envs/llama-omni/lib/python3.10/subprocess.py", line 503, in run
with Popen(*popenargs, **kwargs) as process:
File "/root/miniconda3/envs/llama-omni/lib/python3.10/subprocess.py", line 971, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/root/miniconda3/envs/llama-omni/lib/python3.10/subprocess.py", line 1863, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/cuda/bin/nvcc'

When I run the command pip install flash-attn --no-build-isolation, it gives the error mentioned above. And I can't find '/usr/local/cuda/bin/nvcc'

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

No branches or pull requests

6 participants