Python|flash_attn 安装报错问题解决

pip install https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.2cxx11abiTRUE-cp310-cp310-linux_x86_64.whl

直接使用 pypi 安装会安装最新版本,不一定适配本地环境,所以需要直接从 release 中选择合适的版本安装。
官方包只有 Linux 系统:
https://github.com/Dao-AILab/flash-attention/releases

Windows 系统可以使用大佬编译的包:
https://github.com/bdashore3/flash-attention/releases(非官方)

你可能感兴趣的:(python,开发语言)