Flash-attention 2.3.2 支持 Windows了,但是我的2080ti是不支持的。

发布时间 2023-12-13 15:17:22作者: tommickey

不久前Flash-attention 2.3.2 终于支持了 Windows,推荐直接使用大神编译好的whl安装

github.com/bdashore3/flash-attention/releases
stable diffusion webui flash-attention2性能测试

安装环境:

0、flash-attention 2.0 暂时仅支持30系及以上显卡

1、pytorch2.1 + CUDA12.2 *需要单独安装cuda12.2,pytorch官网只有cu12.1

2、Visual Studio 2022 生成工具 使用c++的桌面开发 + 适用于最新v143生成工具的ATL

用开始菜单中的 x64 Native Tools Command Prompt for VS 2022命令行,切换到对应的python venv环境下

命令:*对内存大小有自信的MAX_JOBS可以大一点

git clone https://github.com/Dao-AILab/flash-attention

cd flash-attention

pip install packaging

pip install wheel
set MAX_JOBS=4
python setup.py install

 

作者:无节操の网管 https://www.bilibili.com/read/cv27137329/ 出处:bilibili