Chinese-Vicuna icon indicating copy to clipboard operation
Chinese-Vicuna copied to clipboard

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

Open GreatWildFire opened this issue 1 year ago • 2 comments

===================================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

GreatWildFire avatar Apr 14 '23 07:04 GreatWildFire

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

Albort-z avatar Apr 14 '23 10:04 Albort-z

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

Facico avatar Apr 14 '23 10:04 Facico

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

还是不行啊老哥

MadRose-P avatar Sep 22 '23 08:09 MadRose-P

试试 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

Albort-z avatar Sep 22 '23 09:09 Albort-z

试试 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

MadRose-P avatar Sep 26 '23 11:09 MadRose-P