Orion icon indicating copy to clipboard operation
Orion copied to clipboard

已经安装flash-attn,但是运行还是报错未安装

Open ctrlcplusv opened this issue 1 year ago • 4 comments

ImportError: This modeling file requires the following packages that were not found in your environment: flash_attn. Run pip install flash_attn

ctrlcplusv avatar Jan 22 '24 09:01 ctrlcplusv

ImportError: This modeling file requires the following packages that were not found in your environment: flash_attn. Run pip install flash_attn

安装flash_attn的问题 答:先安装对应版本的cuda-nvcc,https://anaconda.org/nvidia/cuda-nvcc 再安装flash_attn,https://github.com/Dao-AILab/flash-attention/releases/ pip install https://github.com/Dao-AILab/flash-attention/releases/download/v2.3.3/flash_attn-2.3.3+cu122torch2.1cxx11abiFALSE-cp38-cp38-linux_x86_64.whl

yecphaha avatar Jan 25 '24 03:01 yecphaha

ImportError: This modeling file requires the following packages that were not found in your environment: flash_attn. Run pip install flash_attn

安装flash_attn的问题 答:先安装对应版本的cuda-nvcc,https://anaconda.org/nvidia/cuda-nvcc 再安装flash_attn,https://github.com/Dao-AILab/flash-attention/releases/ pip install https://github.com/Dao-AILab/flash-attention/releases/download/v2.3.3/flash_attn-2.3.3+cu122torch2.1cxx11abiFALSE-cp38-cp38-linux_x86_64.whl

你好,已按照上述安装,但还是存在问题,描述如下: 配置: 4090*4 nvcc -V 12.1 flash-attn 2.3.3 torch 2.1.0 transformers 4.34.1 torchvision 0.16.0+cu121 运行cli_demo会提示错误: RuntimeError: CUDA error: device-side assert triggered CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. Compile with TORCH_USE_CUDA_DSA to enable device-side assertions. 以及 RuntimeError: CUDA error: CUBLAS_STATUS_INTERNAL_ERROR when calling cublasGemmEx( handle, opa, opb, m, n, k, &falpha, a, CUDA_R_16BF, lda, b, CUDA_R_16BF, ldb, &fbeta, c, CUDA_R_16BF, ldc, CUDA_R_32F, CUBLAS_GEMM_DEFAULT_TENSOR_OP) 是cuda版本问题吗

ctrlcplusv avatar Jan 30 '24 05:01 ctrlcplusv

ImportError: This modeling file requires the following packages that were not found in your environment: flash_attn. Run pip install flash_attn

安装flash_attn的问题 答:先安装对应版本的cuda-nvcc,https://anaconda.org/nvidia/cuda-nvcc 再安装flash_attn,https://github.com/Dao-AILab/flash-attention/releases/ pip install https://github.com/Dao-AILab/flash-attention/releases/download/v2.3.3/flash_attn-2.3.3+cu122torch2.1cxx11abiFALSE-cp38-cp38-linux_x86_64.whl

你好,已按照上述安装,但还是存在问题,描述如下: 配置: 4090*4 nvcc -V 12.1 flash-attn 2.3.3 torch 2.1.0 transformers 4.34.1 torchvision 0.16.0+cu121 运行cli_demo会提示错误: RuntimeError: CUDA error: device-side assert triggered CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. Compile with TORCH_USE_CUDA_DSA to enable device-side assertions. 以及 RuntimeError: CUDA error: CUBLAS_STATUS_INTERNAL_ERROR when calling cublasGemmEx( handle, opa, opb, m, n, k, &falpha, a, CUDA_R_16BF, lda, b, CUDA_R_16BF, ldb, &fbeta, c, CUDA_R_16BF, ldc, CUDA_R_32F, CUBLAS_GEMM_DEFAULT_TENSOR_OP) 是cuda版本问题吗

你的版本是nvcc -V==12.1,torch==2.1.0,需要正确的flash_attn版本, flash_attn-2.3.3+cu122torch2.1cxx11abiFALSE-cp38-cp38-linux_x86_64.whl,这个flash_attn版本里nvcc -V==12.2,torch==2.1.0,python==3.8

yecphaha avatar Jan 31 '24 01:01 yecphaha

我的cuda版本是12.2,torch版本是2.2.0,装的flash_attn-2.3.6+cu122torch2.2cxx11abiTRUE-cp39-cp39-linux_x86_64.whl这个版本 我的python也是3.9的,为什么还是显示环境中找不到。。。

grape-Wu avatar Jul 24 '24 09:07 grape-Wu