在高版本CUDA的条件下,bitsandbytes发现低版本CUDA SETUP,完美解决方案,免费用。

1.前提条件

CUDA版本:CUDA Version: 11.6
bitsandbytes版本是:bitsandbytes 0.35.0

在安装完成kohya_ss项目后,准备做大模型训练的过程中遇到以下错误

=BUG REPORT=
Welcome to bitsandbytes. For bug reports, please submit your error trace to: https://github.com/TimDettmers/bitsandbytes/issues
For effortless bug reporting copy-paste your error into this form: https://docs.google.com/forms/d/e/1FAIpQLScPB8emS3Thkp66nvqwmjTEgxp8Y9ufuWTzFyr9kJ5AoI47dQ/viewform?usp=sf_link

/root/anaconda3/envs/kohyass/lib/python3.10/site-packages/bitsandbytes/cuda_setup/paths.py:93: UserWarning: /root/anaconda3/envs/kohyass did not contain libcudart.so as expected! Searching further paths…
warn(
/root/anaconda3/envs/kohyass/lib/python3.10/site-packages/bitsandbytes/cuda_setup/paths.py:27: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {PosixPath(‘/root/anaconda3/envs/kohyass/lib/python3.10/site-packages/cv2/…/…/lib64’)}
warn(
CUDA SETUP: CUDA runtime path found: /usr/local/cuda-10.2/lib64/libcudart.so
CUDA SETUP: Highest compute capability among GPUs detected: 7.5
CUDA SETUP: CUDA version lower than 11 are currenlty not supported for LLM.int8(). You will be only to use 8-bit optimizers and quantization routines!!
CUDA SETUP: Detected CUDA version 102
CUDA SETUP: TODO: compile library for specific version: libbitsandbytes_cuda102.so
CUDA SETUP: Defaulting to libbitsandbytes.so…
CUDA SETUP: CUDA detection failed. Either CUDA driver not installed, CUDA not installed, or you have multiple conflicting CUDA libraries!
CUDA SETUP: If you compiled from source, try again with make CUDA_VERSION=DETECTED_CUDA_VERSION for example, make CUDA_VERSION=113.
在高版本CUDA的条件下,bitsandbytes发现低版本CUDA SETUP,完美解决方案,免费用。_第1张图片

在高版本CUDA的条件下,bitsandbytes发现低版本CUDA SETUP,完美解决方案,免费用。_第2张图片

解决方案如下:
1、pip卸载bitsandbytes

2、pip安装bitsandbytes-cuda116 --安装你cuda对应版本的bitsandbytes

3、我安装的为“pip install bitsandbytes-cuda113==0.26.0.post2”“

对应版本下载如下:
https://pypi.org/project/bitsandbytes-cuda116/

执行完成后完美训练:
在高版本CUDA的条件下,bitsandbytes发现低版本CUDA SETUP,完美解决方案,免费用。_第3张图片
pip list
在高版本CUDA的条件下,bitsandbytes发现低版本CUDA SETUP,完美解决方案,免费用。_第4张图片
模型训练成功:
在高版本CUDA的条件下,bitsandbytes发现低版本CUDA SETUP,完美解决方案,免费用。_第5张图片

你可能感兴趣的:(python,算法,人工智能,机器学习)