【5090d】配置运行和微调大模型所需基础环境【一】

RuntimeError: Failed to import transformers.integrations.bitsandbytes because of the following error (look up to see its traceback):
No module named 'triton.ops'

原因:是因为在导入 transformers.integrations.bitsandbytes 时缺少必要的依赖项 triton.ops。

 解决方法:先验证安装的cuda和torch对不对。5090要用cuda12.8和torch2.6.0+cu128(我装成124了,所以报错)

pip uninstall torch torchvision torchaudio

pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128

 

pip install -U bitsandbytes 

就解决了 

你可能感兴趣的:(做项目全流程的完整踩坑史,深度学习,pytorch,人工智能)