admin管理员组文章数量:1584443
问题
今天训大模型的时候,执行
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("EleutherAI/pythia-70m")
出来了一堆报错。看了下最核心的几点就是
- GPU是可以用的
- 但是CUDA_SETUP 失败了
- libcudart.so在环境变量中找不到
- 需要执行 python -m bitsandbytes查看bug报告
当然跑别的代码也可能有类似的报错,如果情况符合都可以试试下面的解决方案
解决方案
从github上找到了解决方法:https://github/TimDettmers/bitsandbytes/issues/741
简单来说就是我的bitsandbytes包是linux的,而我用的windows系统。
所以换一个windows版本就好了
pip uninstall bitsandbytes
pip install https://github/jllllll/bitsandbytes-windows-webui/releases/download/wheels/bitsandbytes-0.41.0-py3-none-win_amd64.whl
第二条是指定安装0.41.0版本,如果你过两年看到这个贴子可能已经过时了,试试直接运行
pip install bitsandbytes
会自动给你换成windows版本,不出意外的话
成功结果
本文标签: 报错模型RuntimeErrorCUDAlibcudart
版权声明:本文标题:大模型微调报错解决 RunTimeError:CUDA Setup failed despite GPU being available. libcudart.so not found. 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dianzi/1727937642a1138910.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论