/opt/micromamba/envs/py310/lib/python3.10/site-packages/bitsandbytes/cextension.py:34: UserWarning:

/opt/micromamba/envs/py310/lib/python3.10/site-packages/bitsandbytes/cextension.py:34: UserWarning: The installed version of bitsandbytes was compiled without GPU support. 8-bit optimizers, 8-bit multiplication, and GPU quantization are unavailable.
warn("The installed version of bitsandbytes was compiled without GPU support. "
/opt/micromamba/envs/py310/lib/python3.10/site-packages/bitsandbytes/cuda_setup/main.py:149: UserWarning: /opt/micromamba/envs/py310 did not contain [‘libcudart.so’, ‘libcudart.so.11.0’, ‘libcudart.so.12.0’] as expected! Searching further paths…
warn(msg)
/opt/micromamba/envs/py310/lib/python3.10/site-packages/bitsandbytes/cuda_setup/main.py:149: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {PosixPath(‘/root/BLOOM-LORA/Untitled.ipynb’)}
warn(msg)
/opt/micromamba/envs/py310/lib/python3.10/site-packages/bitsandbytes/cuda_setup/main.py:149: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {PosixPath(‘module’), PosixPath(‘//matplotlib_inline.backend_inline’)}
warn(msg)
/opt/micromamba/envs/py310/lib/python3.10/site-packages/bitsandbytes/cuda_setup/main.py:149: UserWarning: WARNING: No GPU detected! Check your CUDA paths. Proceeding to load CPU-only library…
warn(msg)
可通过如下方式解决上述问题:

  1. 使用pip install bitsandbytes正常安装库
  2. 切换到bitsandbytes所在lib目录,例如: xxx/venv/lib/python3.9/site-packages/bitsandbytes/cuda_setup
  3. 使用vim指令或其他方式编辑main.py文件
  4. 定位到if not torch.cuda.is_available(): return 'libsbitsandbytes_cpu.so', None, None, None, None,将其替换为if torch.cuda.is_available(): return 'libbitsandbytes_cuda116.so', None, None, None, None 。(并非一定要使用cuda116,只需大于等于自身显卡cuda版本即可)
  5. 定位到self.lib = ct.cdll.LoadLibrary(binary_path),会找到两处,把两处都替换为self.lib = ct.cdll.LoadLibrary(str(binary_path))

但是还有报错
CUDA_SETUP: WARNING! libcudart.so not found in any environmental path. Searching in backup paths…
CUDA SETUP: WARNING! libcuda.so not found! Do you have a CUDA driver installed? If you are on a cluster, make sure you are on a CUDA machine!
CUDA SETUP: CUDA runtime path found: /usr/local/cuda/lib64/libcudart.so
CUDA SETUP: Loading binary /opt/micromamba/envs/py310/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so…

你可能感兴趣的:(计算机应用技术,python,开发语言)