安装flash-attn失败n次之后的总结

首先最最基础是安装cudatoolkit

参考手把手教会你在Linux服务器上安装用户级别的CUDA_cuda安装.run文件同意协议:无法输入accept-CSDN博客

推荐版本12.1

使用新的cudatoolkit之后,建议环境重新创建重新配,不要问为什么

配的过程又很玄学,不知道为什么直接

pip install flash-attn --no-build-isolation

会一直卡在build那一步

解决方案是

pip install https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.3/flash_attn-2.7.3+cu12torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl 这里要万分注意,cu(cudatoolkit),torch,cp(python)版本一定要对应上。https://github.com/Dao-AILab/flash-attention/releases,从这找到对应的版本

祝大家一切顺利!

你可能感兴趣的:(python,linux,深度学习)