bitsandbytes 报错

把 bitsandbytes 更新到最新版本。
用 nvidia-smi 查看 CUDA 版本,我的是12.2。
~/.bashrc 中添加了以下几行:

export PATH="/usr/local/cuda-12.2/bin:$PATH"
export BNB_CUDA_VERSION=122
export LD_LIBRARY_PATH="/usr/local/cuda-12.2/lib64:$LD_LIBRARY_PATH"

然后 source ~/.bashrc
使用 python -m bitsandbytes 显示 SUCCESS!

参考链接:

  1. Linux下安装CUDA并配置环境变量
  2. https://blog.csdn.net/weixin_44517645/article/details/131508060
  3. https://github.com/TimDettmers/bitsandbytes/blob/main/how_to_use_nonpytorch_cuda.md

你可能感兴趣的:(pytorch)