jllllll / bitsandbytes-windows-webui

Windows compile of bitsandbytes for use in text-generation-webui.
MIT License
344 stars 35 forks source link

How to get this module to use cuda121 #6

Closed cmradix closed 1 year ago

cmradix commented 1 year ago

I tried to switch to cuda121 following the official guide python -m bitsandbytes

Then I encountered the encoding error "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 0: invalid continuation byte"

When I switch windows 11 to utf-8 mode I get the following error

===================================BUG REPORT=================================== Welcome to bitsandbytes. For bug reports, please run

python -m bitsandbytes

and submit this information together with your error trace to: https://github.com/TimDettmers/bitsandbytes/issues

bin D:\ProgramFiles\text-generation-webui\conda\lib\site-packages\bitsandbytes\libbitsandbytes_cuda121.dll D:\ProgramFiles\text-generation-webui\conda\lib\site-packages\bitsandbytes\cuda_setup\main.py:156: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {WindowsPath('D:/ProgramFiles/text-generation-webui/conda/bin')} warn(msg) D:\ProgramFiles\text-generation-webui\conda\lib\site-packages\bitsandbytes\cuda_setup\main.py:156: UserWarning: D:\ProgramFiles\text -generation-webui\conda did not contain ['cudart64_110.dll', 'cudart64_120.dll', 'cudart64_12.dll'] as expected! Searching further paths... warn(msg) CUDA SETUP: CUDA runtime path found: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\cudart64_12.dll CUDA SETUP: Highest compute capability among GPUs detected: 8.6 CUDA SETUP: Detected CUDA version 121 CUDA SETUP: Loading binary D:\ProgramFiles\text-generation-webui\conda\lib\site-packages\bitsandbytes\libbitsandbytes_cuda121.dll... ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++ BUG REPORT INFORMATION ++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Traceback (most recent call last). File "D:\ProgramFiles\text-generation-webui\conda\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None. File "D:\ProgramFiles\text-generation-webui\conda\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "D:\ProgramFiles\text-generation-webui\conda\lib\site-packages\bitsandbytes__main.py", line 95, in generate_bug_report_information() File "D:\ProgramFiles\text-generation-webui\conda\lib\site-packages\bitsandbytes__main__.py", line 49, in generate_bug_reportinformation() information paths = find_file_recursive(os.environ['CONDA_PREFIX'], 'cudaso') File "D:\ProgramFiles\text-generation-webui\conda\lib\site-packages\bitsandbytes\main__.py", line 37, in find_file_recursive raise RuntimeError('Something when wrong when trying to find file. Maybe you do not have a linux system?') RuntimeError: Something when wrong when trying to find file. Maybe you do not have a linux system?

jllllll commented 1 year ago

The bug report information code called by running python -m bitsandbytes has not been rewritten to work on Windows yet. I'll get around to it eventually.

Based on the information before that part, I'm pretty sure it is loading CUDA 12.1:

CUDA SETUP: CUDA runtime path found: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\cudart64_12.dll
CUDA SETUP: Highest compute capability among GPUs detected: 8.6
CUDA SETUP: Detected CUDA version 121
CUDA SETUP: Loading binary D:\ProgramFiles\text-generation-webui\conda\lib\site-packages\bitsandbytes\libbitsandbytes_cuda121.dll...
cmradix commented 1 year ago

The bug report information code called by running python -m bitsandbytes has not been rewritten to work on Windows yet. I'll get around to it eventually.

Based on the information before that part, I'm pretty sure it is loading CUDA 12.1:

CUDA SETUP: CUDA runtime path found: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\cudart64_12.dll
CUDA SETUP: Highest compute capability among GPUs detected: 8.6
CUDA SETUP: Detected CUDA version 121
CUDA SETUP: Loading binary D:\ProgramFiles\text-generation-webui\conda\lib\site-packages\bitsandbytes\libbitsandbytes_cuda121.dll...

Yes, it has worked, thanks!