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

小白求解,关于torch库 #79

Closed JImmyHui2017 closed 1 year ago

JImmyHui2017 commented 1 year ago
  1. 我看到说明里面讲要用cuda12的版本?但好像pytorch官网上面只有对应cuda11.x的版本,我下载的是pytorch-1.13.1-py3.8_cuda11.7_cudnn8_0. 不知道是否正确

  2. 我使用conda的虚拟环境部署,由于在线加入torch速度太慢,就用了离线的方式下载了pytorch-1.13.1-py3.8_cuda11.7_cudnn8_0.tar.bz2 ,然后用离线安装的方式加载了 conda install --offline C:\AI\pytorch\pytorch-1.13.1-py3.8_cuda11.7_cudnn8_0.tar.bz2 但到了执行 python finetune.py --data_path merge.json --test_size 2000 这一步的时候,报错提示

(Chinese_Vicuna_master) C:\Windows\System32\Chinese-Vicuna-master>python finetune.py --data_path merge.json --test_size 2000 Traceback (most recent call last): File "finetune.py", line 4, in import torch File "C:\Users\XJM2022\anaconda3\envs\Chinese_Vicuna_master\lib\site-packages\torch__init__.py", line 139, in raise err OSError: [WinError 126] 找不到指定的模块。 Error loading "C:\Users\XJM2022\anaconda3\envs\Chinese_Vicuna_master\lib\site-packages\torch\lib\shm.dll" or one of its dependencies.

这是什么原因呢?

附:我在conda list里面看到的是

(Chinese_Vicuna_master) C:\Windows\System32\Chinese-Vicuna-master>conda list ca-certificates 2023.01.10 haa95532_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main certifi 2022.12.7 py38haa95532_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main libffi 3.4.2 hd77b12b_6 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main openssl 1.1.1t h2bbff1b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main pip 23.0.1 py38haa95532_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main python 3.8.16 h6244533_3 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main pytorch 1.13.1 py3.8_cuda11.7_cudnn8_0 setuptools 65.6.3 py38haa95532_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main sqlite 3.41.2 h2bbff1b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main vc 14.2 h21ff451_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main vs2015_runtime 14.27.29016 h5e58377_2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main wheel 0.38.4 py38haa95532_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main wincertstore 0.2 py38haa95532_2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main

pip list看到的是

(Chinese_Vicuna_master) C:\Windows\System32\Chinese-Vicuna-master>pip list Package Version certifi 2022.12.7 pip 23.0.1 setuptools 65.6.3 torch 1.13.1 wheel 0.38.4 wincertstore 0.2 WARNING: The repository located at pypi.tuna.tsinghua.edu.cn is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host pypi.tuna.tsinghua.edu.cn'.


感谢。

Facico commented 1 year ago

你可以参考一下网上的解决方案:1, 2, 3, 4