AI软件下载
有趣网站推荐及实用软件下载

DLL load failed while importing flash_attn_2_cuda: 找不到指定的程序。

python应用运行时报错:DLL load failed while importing flash_attn_2_cuda: 找不到指定的程序。

原因是cuda版本和flash_attn版本不匹配引起的

我的是windows电脑,安装的pytorch版本是cu128+torch2.8.0,安装的flash-attention版本是flash_attn-2.7.4.post1

我的解决办法是重装torch版本2.7.0

pip install torch==2.7.0 torchvision==0.22.0 torchaudio==2.7.0 --index-url https://download.pytorch.org/whl/cu128

重新运行python应用不再报上述错误。


经本人电脑测试,windows电脑上推荐使用组合torch2.7.0

pip install https://mirrors.nju.edu.cn/pytorch/whl/cu128/torch-2.7.0%2Bcu128-cp310-cp310-win_amd64.whl#sha256=c52c4b869742f00b12cb34521d1381be6119fa46244791704b00cc4a3cb06850

加torch2.8.0版flash-attention wheel

pip install https://huggingface.co/lldacing/flash-attention-windows-wheel/resolve/main/flash_attn-2.7.4.post1%2Bcu128torch2.8.0cxx11abiTRUE-cp310-cp310-win_amd64.whl?download=true

AI软件用不了?2元爽玩4090: 立即体验>>

软件催更及1对1人工答疑支持: https://nuowa.net/1806
赞(0) 打赏
软件无法使用?点击查看常见问题说明>>

最近更新

UV包管理器用法基础教程

UV是一个用 Rust 编写的高性能工具,旨在替代 Python 传统的包管理工具链,速度比 pip 和 Conda 快数十甚至上百倍。 安装 uv 你可以通过一条命令安装 uv: 安装后,...

觉得文章对你有帮助就打赏一下作者

非常感谢你的打赏,我将有更多的动力继续提供优质内容,让我们一起创建更加美好的世界!

支付宝扫一扫

微信扫一扫