Facico / Chinese-Vicuna

Chinese-Vicuna: A Chinese Instruction-following LLaMA-based Model —— 一个中文低资源的llama+lora方案,结构参考alpaca
https://github.com/Facico/Chinese-Vicuna
Apache License 2.0
4.14k stars 421 forks source link

运行 generate.py的时候报错,cudnn 已经安装了啊? #162

Closed hopeforus closed 1 year ago

hopeforus commented 1 year ago

(vicuna) hope@hope-08:~/work/Chinese-Vicuna$ python generate.py Traceback (most recent call last): File "generate.py", line 2, in import torch File "/home/hope/miniconda3/envs/vicuna/lib/python3.8/site-packages/torch/init.py", line 217, in _load_global_deps() File "/home/hope/miniconda3/envs/vicuna/lib/python3.8/site-packages/torch/init.py", line 177, in _load_global_deps raise err File "/home/hope/miniconda3/envs/vicuna/lib/python3.8/site-packages/torch/init.py", line 172, in _load_global_deps ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL) File "/home/hope/miniconda3/envs/vicuna/lib/python3.8/ctypes/init.py", line 373, in init self._handle = _dlopen(self._name, mode) OSError: libcudnn.so.8: cannot open shared object file: No such file or directory

Facico commented 1 year ago

看看版本啥的有没有装对,用nvidia-smi或者echo $CUDA_HOME可以看看现在用的cuda版本是啥,感觉类似的问题网上解决方法很多,可以参考一下

hopeforus commented 1 year ago

谢谢,我重新安装了 cuda 12,cudnn 前面不报错了,新问题来了,在找原因,呵呵 (vicuna) hope@hope-08:~/work/Chinese-Vicuna/scripts$ bash generate.sh Traceback (most recent call last): File "/home/hope/work/Chinese-Vicuna/generate.py", line 3, in from peft import PeftModel, PeftModelForCausalLM, LoraConfig File "/home/hope/miniconda3/envs/vicuna/lib/python3.8/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 "/home/hope/miniconda3/envs/vicuna/lib/python3.8/site-packages/peft/mapping.py", line 16, in from .peft_model import ( File "/home/hope/miniconda3/envs/vicuna/lib/python3.8/site-packages/peft/peft_model.py", line 22, in from accelerate import dispatch_model, infer_auto_device_map File "/home/hope/miniconda3/envs/vicuna/lib/python3.8/site-packages/accelerate/init.py", line 3, in from .accelerator import Accelerator File "/home/hope/miniconda3/envs/vicuna/lib/python3.8/site-packages/accelerate/accelerator.py", line 36, in from .tracking import LOGGER_TYPE_TO_CLASS, GeneralTracker, filter_trackers File "/home/hope/miniconda3/envs/vicuna/lib/python3.8/site-packages/accelerate/tracking.py", line 49, in import wandb File "/home/hope/.local/lib/python3.8/site-packages/wandb/init.py", line 26, in from wandb import sdk as wandb_sdk File "/home/hope/.local/lib/python3.8/site-packages/wandb/sdk/init.py", line 5, in from .wandb_artifacts import Artifact # noqa: F401 File "/home/hope/.local/lib/python3.8/site-packages/wandb/sdk/wandb_artifacts.py", line 33, in from wandb.apis import InternalApi, PublicApi File "/home/hope/.local/lib/python3.8/site-packages/wandb/apis/init.py", line 42, in from .internal import Api as InternalApi # noqa File "/home/hope/.local/lib/python3.8/site-packages/wandb/apis/internal.py", line 1, in from wandb.sdk.internal.internal_api import Api as InternalApi File "/home/hope/.local/lib/python3.8/site-packages/wandb/sdk/internal/internal_api.py", line 45, in from ..lib import retry File "/home/hope/.local/lib/python3.8/site-packages/wandb/sdk/lib/retry.py", line 17, in from .mailbox import ContextCancelledError File "/home/hope/.local/lib/python3.8/site-packages/wandb/sdk/lib/mailbox.py", line 10, in from wandb.proto import wandb_internal_pb2 as pb File "/home/hope/.local/lib/python3.8/site-packages/wandb/proto/wandb_internal_pb2.py", line 1, in import google.protobuf ModuleNotFoundError: No module named 'google.protobuf'

Facico commented 1 year ago

没有的库用pip或者conda装不就行了?