jllllll / bitsandbytes-windows-webui

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

[error] win10 cuda12.1_dirver cuda11.8_tools 3090 #8

Closed asdfsa1314 closed 1 year ago

asdfsa1314 commented 1 year ago

I solved it, the general plan is as follows because cuda is 12.1 so , torch install

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

Need to be guaranteed torch installed is success use below shell checkout torch install:

import torch
torch.cuda.is_available()

#cat "True" is success 

about bitsandbytes I use below shell

pip install https://github.com/jllllll/bitsandbytes-windows-webui/raw/main/bitsandbytes-0.39.0-py3-none-any.whl

However, there is a problem with this bag. Although he is a bag under Windows, there are some hard codes in the code int the win platorm ,use below shell show us error

python -m bitsandbytes

so, the problem

# site-packages\bitsandbytes\__main__.py 
# 90 line
def print_debug_info() -> None:
    print(
        "\nAbove we output some debug information. Please provide this info when "
        f"creating an issue via {PACKAGE_GITHUB_URL}/issues/new/choose ...\n"
    )

#generate_bug_report_information() 
# this method comments, he checks the environment, but uses the "find" (a program instruction below the unix environment) to retrieve the file, so it will report an error.

from . import COMPILED_WITH_CUDA, PACKAGE_GITHUB_URL
from .cuda_setup.env_vars import to_be_ignored
from .cuda_setup.main import get_compute_capabilities, get_cuda_lib_handle

# 102 line

I hope this can help with me a question

jllllll commented 1 year ago

I apologize for the confusion, but I have moved wheels to the releases section here: https://github.com/jllllll/bitsandbytes-windows-webui/releases/tag/wheels

The wheels there have been updated with generate_bug_report_information() overhauled for Windows compatibility. I have now updated the wheels in the repo itself so that people still using them aren't stuck with an outdated wheel.

generate_bug_report_information() now uses where /R on Windows systems, which is largely equivalent to Unix's find. Additionally, it searches the additional paths that I added to the Windows version. https://github.com/jllllll/bitsandbytes/commit/024acbac1477d03b4011fcb4b54f3221cc7727ce

The reason for the change is that newer wheels are larger than the repo file limit of 100 megabytes.

Additionally, if you truly want to use CUDA 12.1, then you should install the nightly version of Pytorch:

python -m pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu121
asdfsa1314 commented 1 year ago

My whl does have some problems, I used the auto-gptq project Thanks for the addition, and praise for your efforts to make bitsandbytes compatible on windows I fully understand the inconvenience caused by warehouse restrictions