pengxiao-song / LaWGPT

🎉 Repo for LaWGPT, Chinese-Llama tuned with Chinese Legal knowledge. 基于中文法律知识的大语言模型
https://github.com/pengxiao-song/LaWGPT/
GNU General Public License v3.0
5.81k stars 530 forks source link

卡在bash scripts/webui.sh #88

Open Re-hd opened 1 year ago

Re-hd commented 1 year ago

我使用wsl执行此命令,得到以下错误: C:\Users\123456\LaWGPT>bash scripts/webui.sh scripts/webui.sh: line 2: $'\r': command not found scripts/webui.sh: line 3: $'\r': command not found scripts/webui.sh: line 5: python: command not found scripts/webui.sh: line 6: --load_8bit: command not found scripts/webui.sh: line 7: --base_model: command not found scripts/webui.sh: line 8: --lora_weights: command not found scripts/webui.sh: line 9: --prompt_template: command not found scripts/webui.sh: line 10: --server_name: command not found scripts/webui.sh: line 11: --share_gradio: command not found scripts/webui.sh: line 12: $'\r': command not found scripts/webui.sh: line 13: $'\r': command not found 因为对unix平台不熟,希望得到大佬帮助,谢谢。

Re-hd commented 1 year ago

在cmd上执行的,写错了,但在已安装wsl的情况下

guo-zh commented 1 year ago

请问解决了吗?

Re-hd commented 1 year ago

没有

guo-zh commented 1 year ago

没有

我现在直接运行webui.py,可以运行,但是输出的要么是乱码,要么是重复回答,webui.py里只修改bash和lora的路径

Re-hd commented 1 year ago

webui.py怎么直接运行

Re-hd commented 1 year ago

C:\Users\123456\LaWGPT>python webui.py Traceback (most recent call last): File "C:\Users\Xiaoshi High School\LaWGPT\webui.py", line 4, in import fire ModuleNotFoundError: No module named 'fire' 我运行webui.py出现问题

guo-zh commented 1 year ago

webui.py怎么直接运行

命令行python webui.py呀 webui.sh也只是加参数的这个命令,你没有“fire”在你的环境里pip一个就好 缺什么安什么

hoxiansen commented 1 year ago

这个是Linux和Windows换行符不一样导致,Linux是\n,Windows上是\r\n。 解决方式:更改换行符为unix格式就行。先用vi打开webui.sh,在命令模式下输入: set ff=unix (注意有个冒号)

guo-zh commented 1 year ago

这个是Linux和Windows换行符不一样导致,Linux是\n,Windows上是\r\n。 解决方式:更改换行符为unix格式就行。先用vi打开webui.sh,在命令模式下输入: set ff=unix (注意有个冒号)

其实这个倒没什么,用webui.py也一样,主要是我目前的输出,都是这样 lawgpt输出结果

Re-hd commented 1 year ago

是不是算力不够?

guo-zh commented 1 year ago

是不是算力不够?

不应该 我是单张A800(80G)

mossee commented 1 year ago

请问webui.py这个文件怎么生成的

guo-zh commented 1 year ago

请问webui.py这个文件怎么生成的

仓库里有

mossee commented 1 year ago

请问webui.py这个文件怎么生成的

仓库里有

谢谢,找到了。但是运行 python webui.py 报ImportError: cannot import name 'GenerationConfig' from 'transformers' (D:\ProgramData\anaconda3\lib\site-packages\transformers__init__.py) 已经安装过transformers 了

Re-hd commented 1 year ago

(lawgpt) C:\Users\123456\LaWGPT>pip install -r requirements.txt Collecting git+https://github.com/huggingface/peft.git@e536616888d51b453ed354a6f1e243fecb02ea08 (from -r requirements.tx t (line 8)) Cloning https://github.com/huggingface/peft.git (to revision e536616888d51b453ed354a6f1e243fecb02ea08) to c:\users\123456\appdata\local\temp\pip-req-build-mifewk6q Running command git clone --filter=blob:none --quiet https://github.com/huggingface/peft.git 'C:\Users\123456\AppData\Local\Temp\pip-req-build-mifewk6q' fatal: unable to access 'https://github.com/huggingface/peft.git/': Failed to connect to github.com port 443 after 210 59 ms: Couldn't connect to server error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet https://github.com/huggingface/peft.git 'C:\Users\123456\AppData Local\Temp\pip-req-build-mifewk6q' did not run successfully. │ exit code: 128 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet https://github.com/huggingface/peft.git 'C:\Users\123456\AppData\Lo cal\Temp\pip-req-build-mifewk6q' did not run successfully. │ exit code: 128 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. 这个怎么解决,谢谢。

guo-zh commented 1 year ago

(lawgpt) C:\Users\123456\LaWGPT>pip install -r requirements.txt Collecting git+https://github.com/huggingface/peft.git@e536616888d51b453ed354a6f1e243fecb02ea08 (from -r requirements.tx t (line 8)) Cloning https://github.com/huggingface/peft.git (to revision e536616888d51b453ed354a6f1e243fecb02ea08) to c:\users\123456\appdata\local\temp\pip-req-build-mifewk6q Running command git clone --filter=blob:none --quiet https://github.com/huggingface/peft.git 'C:\Users\123456\AppData\Local\Temp\pip-req-build-mifewk6q' fatal: unable to access 'https://github.com/huggingface/peft.git/': Failed to connect to github.com port 443 after 210 59 ms: Couldn't connect to server error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet https://github.com/huggingface/peft.git 'C:\Users\123456\AppData Local\Temp\pip-req-build-mifewk6q' did not run successfully. │ exit code: 128 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet https://github.com/huggingface/peft.git 'C:\Users\123456\AppData\Lo cal\Temp\pip-req-build-mifewk6q' did not run successfully. │ exit code: 128 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. 这个怎么解决,谢谢。

你的reqxxxxx.txt里边都有什么

Re-hd commented 1 year ago

就是一些model(模型)的名称啊。 accelerate appdirs bitsandbytes black black[jupyter] datasets fire git+https://github.com/huggingface/peft.git@e536616888d51b453ed354a6f1e243fecb02ea08 git+https://github.com/huggingface/transformers.git gradio sentencepiece wandb

Re-hd commented 1 year ago

我一个个试着安装了一下,在单独安装“git+https://github.com/huggingface/peft.git@e536616888d51b453ed354a6f1e243fecb02ea08”和“git+https://github.com/huggingface/transformers.git”时遇到了相同的错误

guo-zh commented 1 year ago

git+https://github.com/huggingface/peft.git@e536616888d51b453ed354a6f1e243fecb02ea08 git+https://github.com/huggingface/transformers.git

我是先把两个git.........的删了装

tdwaofei commented 1 year ago

(lawgpt) C:\Users\123456\LaWGPT>pip install -r requirements.txt Collecting git+https://github.com/huggingface/peft.git@e536616888d51b453ed354a6f1e243fecb02ea08 (from -r requirements.tx t (line 8)) Cloning https://github.com/huggingface/peft.git (to revision e536616888d51b453ed354a6f1e243fecb02ea08) to c:\users\123456\appdata\local\temp\pip-req-build-mifewk6q Running command git clone --filter=blob:none --quiet https://github.com/huggingface/peft.git 'C:\Users\123456\AppData\Local\Temp\pip-req-build-mifewk6q' fatal: unable to access 'https://github.com/huggingface/peft.git/': Failed to connect to github.com port 443 after 210 59 ms: Couldn't connect to server error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet https://github.com/huggingface/peft.git 'C:\Users\123456\AppData Local\Temp\pip-req-build-mifewk6q' did not run successfully. │ exit code: 128 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet https://github.com/huggingface/peft.git 'C:\Users\123456\AppData\Lo cal\Temp\pip-req-build-mifewk6q' did not run successfully. │ exit code: 128 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. 这个怎么解决,谢谢。

把github改成kgithub

tdwaofei commented 1 year ago

webui.sh后闪了个黑框,然后关闭了。似乎没有启动起来的意思@hoxiansen 求大神解答

mainxx commented 1 year ago

原来大家都是遇到这个问题。

soultrans commented 1 year ago

其实这个倒没什么,用webui.py也一样,主要是我目前的输出,都是这样 lawgpt输出结果

@guo-zh 请问,这个问题解决了嘛

Re-hd commented 1 year ago

这个模型应该是废了