Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行了generate.py,出现以下错误,似乎是bitsandbytes 的问题,找到了许多其他项目的类似问题,但是我并没有找到合适的解决方案 #74

Closed
GreatWildFire opened this issue Apr 14, 2023 · 5 comments

Comments

@GreatWildFire
Copy link

===================================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:\anaconda3\envs\Vicuna\lib\site-packages\bitsandbytes\libbitsandbytes_cpu.so
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: Loading binary D:\anaconda3\envs\Vicuna\lib\site-packages\bitsandbytes\libbitsandbytes_cpu.so...
argument of type 'WindowsPath' is not iterable
CUDA SETUP: Problem: The main issue seems to be that the main CUDA library was not detected.
CUDA SETUP: Solution 1): Your paths are probably not up-to-date. You can update them via: sudo ldconfig.
CUDA SETUP: Solution 2): If you do not have sudo rights, you can do the following:
CUDA SETUP: Solution 2a): Find the cuda library via: find / -name libcuda.so 2>/dev/null
CUDA SETUP: Solution 2b): Once the library is found add it to the LD_LIBRARY_PATH: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:FOUND_PATH_FROM_2a
CUDA SETUP: Solution 2c): For a permanent solution add the export from 2b into your .bashrc file, located at ~/.bashrc
D:\anaconda3\envs\Vicuna\lib\site-packages\bitsandbytes\cuda_setup\main.py:145: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {WindowsPath('/anaconda3/envs/Vicuna/lib'), WindowsPath('D')}
warn(msg)
D:\anaconda3\envs\Vicuna\lib\site-packages\bitsandbytes\cuda_setup\main.py:145: UserWarning: D:\anaconda3\envs\Vicuna did not contain ['libcudart.so', 'libcudart.so.11.0', 'libcudart.so.12.0'] as expected! Searching further paths...
warn(msg)
D:\anaconda3\envs\Vicuna\lib\site-packages\bitsandbytes\cuda_setup\main.py:145: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {WindowsPath('/usr/local/cuda/lib64')}
warn(msg)
D:\anaconda3\envs\Vicuna\lib\site-packages\bitsandbytes\cuda_setup\main.py:145: UserWarning: WARNING: No libcudart.so found! Install CUDA or the cudatoolkit package (anaconda)!
warn(msg)
D:\anaconda3\envs\Vicuna\lib\site-packages\bitsandbytes\cuda_setup\main.py:145: UserWarning: WARNING: No GPU detected! Check your CUDA paths. Proceeding to load CPU-only library...
warn(msg)
Traceback (most recent call last):
File "E:\LLM\Chinese-Vicuna\generate.py", line 3, in
from peft import PeftModel, PeftModelForCausalLM, LoraConfig
File "D:\anaconda3\envs\Vicuna\lib\site-packages\peft_init_.py", line 22, in
from .mapping import MODEL_TYPE_TO_PEFT_MODEL_MAPPING, PEFT_TYPE_TO_CONFIG_MAPPING, get_peft_config, get_peft_model
File "D:\anaconda3\envs\Vicuna\lib\site-packages\peft\mapping.py", line 16, in
from .peft_model import (
File "D:\anaconda3\envs\Vicuna\lib\site-packages\peft\peft_model.py", line 31, in
from .tuners import LoraModel, PrefixEncoder, PromptEmbedding, PromptEncoder
File "D:\anaconda3\envs\Vicuna\lib\site-packages\peft\tuners_init_.py", line 20, in
from .lora import LoraConfig, LoraModel
File "D:\anaconda3\envs\Vicuna\lib\site-packages\peft\tuners\lora.py", line 36, in
import bitsandbytes as bnb
File "D:\anaconda3\envs\Vicuna\lib\site-packages\bitsandbytes_init_.py", line 6, in
from . import cuda_setup, utils, research
File "D:\anaconda3\envs\Vicuna\lib\site-packages\bitsandbytes\research_init_.py", line 1, in
from . import nn
File "D:\anaconda3\envs\Vicuna\lib\site-packages\bitsandbytes\research\nn_init_.py", line 1, in
from .modules import LinearFP8Mixed, LinearFP8Global
File "D:\anaconda3\envs\Vicuna\lib\site-packages\bitsandbytes\research\nn\modules.py", line 8, in
from bitsandbytes.optim import GlobalOptimManager
File "D:\anaconda3\envs\Vicuna\lib\site-packages\bitsandbytes\optim_init_.py", line 6, in
from bitsandbytes.cextension import COMPILED_WITH_CUDA
File "D:\anaconda3\envs\Vicuna\lib\site-packages\bitsandbytes\cextension.py", line 20, in
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
@Albort-z
Copy link

试试 conda install -c "nvidia/label/cuda-12.1.0" cuda-toolkit

@Facico
Copy link
Owner

Facico commented Apr 14, 2023

@GreatWildFire 这应该是你CUDA的问题,上面显示的是没有使用GPU,你可以试试上面兄弟的命令安装一下CUDA,你可以参考这个issue,是windows+wsl来跑这个项目的相关问题

@MadRose-P
Copy link

试试 conda install -c "nvidia/label/cuda-12.1.0" cuda-toolkit

还是不行啊老哥

@Albort-z
Copy link

试试 conda install -c "nvidia/label/cuda-12.1.0" cuda-toolkit

还是不行啊老哥

如果报错中也有“CUDA Setup failed despite GPU being available. Please run the following command to get more information”这样的字眼,你可以在网上搜搜如何安装cuda

@MadRose-P
Copy link

试试 conda install -c "nvidia/label/cuda-12.1.0" cuda-toolkit

还是不行啊老哥

如果报错中也有“CUDA Setup failed despite GPU being available. Please run the following command to get more information”这样的字眼,你可以在网上搜搜如何安装cuda

感谢老哥建议!我重装了环境还是不行,但是用以下命令重新安装bitsandbytes之后解决了这个问题:
pip install https://github.com/jllllll/bitsandbytes-windows-webui/releases/download/wheels/bitsandbytes-0.39.1-py3-none-win_amd64.whl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants