bitsandbytes for windows

有些LLM部署训练时的依赖库。 pip默认安装的为只支持linux系统,不支持windows系统。如果再windows上默认安装,大概率会碰到【runtimeerror:cuda setup failed despite GPU being available, Please run the following command to get more information:…】这个问题. 本资源为支持windows的版本。可以直接使用pip安装。

报错案例:

PS E:\Baichuan> python -m bitsandbytes False ===================================BUG REPORT=================================== E:\Baichuan\venv\lib\site-packages\bitsandbytes\cuda_setup\main.py:167: UserWarning: Welcome to bitsandbytes. For bug reports, please run python -m bitsandbytes warn(msg) ================================================================================ The following directories listed in your path were found to be non-existent: {WindowsPath(‘/ProgramData/Autodesk/ApplicationPlugins/VRay3dsMax2022/bin/plugins’), WindowsPath(‘C’)} The following directories listed in your path were found to be non-existent: {WindowsPath(‘/Program Files/Chaos Group/V-Ray/Maya 2022 for x64/opensl’), WindowsPath(‘D’)} The following directories listed in your path were found to be non-existent: {WindowsPath(‘c++/cpu;nvidia cuda nvidia geforce rtx 3090 gpu index0;’)} The following directories listed in your path were found to be non-existent: {WindowsPath(‘/ProgramData/Autodesk/ApplicationPlugins/VRay3dsMax2022/bin’), WindowsPath(‘C’)} The following directories listed in your path were found to be non-existent: {WindowsPath(‘D’), WindowsPath(‘/Program Files/Autodesk/Maya2022/vray/vrayplugins’)} The following directories listed in your path were found to be non-existent: {WindowsPath(‘D’), WindowsPath(‘/Program Files/Chaos Group/V-Ray/Maya 2022 for x64/bin’)} The following directories listed in your path were found to be non-existent: {WindowsPath(‘/Program Files/Chaos Group/Phoenix FD/3ds Max 2022 for x64/bin/plugins’), WindowsPath(‘D’)} The following directories listed in your path were found to be non-existent: {WindowsPath(‘D’), WindowsPath(‘/Program Files/Chaos Group/Phoenix FD/3ds Max 2022 for x64/bin’)} CUDA_SETUP: WARNING! libcudart.so not found in any environmental path. Searching in backup paths… The following directories listed in your path were found to be non-existent: {WindowsPath(‘/usr/local/cuda/lib64’)} DEBUG: Possible options found for libcudart.so: set() CUDA SETUP: PyTorch settings found: CUDA_VERSION=121, Highest Compute Capability: 8.6. CUDA SETUP: To manually override the PyTorch CUDA version please see:https://github.com/TimDettmers/bitsandbytes/blob/main/how_to_use_nonpytorch_cuda.md CUDA SETUP: Loading binary E:\Baichuan\venv\lib\site-packages\bitsandbytes\libbitsandbytes_cuda121.so… argument of type ‘WindowsPath’ is not iterable CUDA SETUP: Problem: The main issue seems to be that the main CUDA runtime library was not detected. CUDA SETUP: Solution 1: To solve the issue the libcudart.so location needs to be added to the LD_LIBRARY_PATH variable CUDA SETUP: Solution 1a): Find the cuda runtime library via: find / -name libcudart.so 2>/dev/null CUDA SETUP: Solution 1b): Once the library is found add it to the LD_LIBRARY_PATH: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:FOUND_PATH_FROM_1a CUDA SETUP: Solution 1c): For a permanent solution add the export from 1b into your .bashrc file, located at ~/.bashrc CUDA SETUP: Solution 2: If no library was found in step 1a) you need to install CUDA. CUDA SETUP: Solution 2a): Download CUDA install script: wget https://raw.githubusercontent.com/TimDettmers/bitsandbytes/main/cuda_install.sh CUDA SETUP: Solution 2b): Install desired CUDA version to desired location. The syntax is bash cuda_install.sh CUDA_VERSION PATH_TO_INSTALL_INTO. CUDA SETUP: Solution 2b): For example, “bash cuda_install.sh 113 ~/local/” will download CUDA 11.3 and install into the folder ~/local Traceback (most recent call last): File “D:\Python310\lib\runpy.py”, line 187, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File “D:\Python310\lib\runpy.py”, line 146, in _get_module_details return _get_module_details(pkg_main_name, error) File “D:\Python310\lib\runpy.py”, line 110, in _get_module_details __import__(pkg_name) File “E:\Baichuan\venv\lib\site-packages\bitsandbytes\__init__.py”, line 6, in <module> from . import cuda_setup, utils, research File “E:\Baichuan\venv\lib\site-packages\bitsandbytes\research\__init__.py”, line 1, in <module> from . import nn File “E:\Baichuan\venv\lib\site-packages\bitsandbytes\research\nn\__init__.py”, line 1, in <module> from .modules import LinearFP8Mixed, LinearFP8Global File “E:\Baichuan\venv\lib\site-packages\bitsandbytes\research\nn\modules.py”, line 8, in <module> from bitsandbytes.optim import GlobalOptimManager File “E:\Baichuan\venv\lib\site-packages\bitsandbytes\optim\__init__.py”, line 6, in <module> from bitsandbytes.cextension import COMPILED_WITH_CUDA File “E:\Baichuan\venv\lib\site-packages\bitsandbytes\cextension.py”, line 20, in <module> raise RuntimeError(”’ RuntimeError: CUDA Setup failed despite GPU being available. Please run the following command to get more information: python -m bitsandbytes Inspect the output of the command and see if you can locate CUDA libraries. You might need to add them to your LD_LIBRARY_PATH. If you suspect a bug, please take the information from python -m bitsandbytes and open an issue at: https://github.com/TimDettmers/bitsandbytes/issues PS E:\Baichuan>

资源下载此资源仅限注册用户下载,请先

原创文章,作者:朋远方,如若转载,请注明出处:https://caovan.com/bitsandbytes-for-windows/.html

Like (0)
Donate 微信扫一扫 微信扫一扫
朋远方的头像朋远方
Previous 2024年2月29日 下午6:01
Next 2024年3月1日 下午7:00

相关推荐

发表回复

Please Login to Comment