ChatGLM-6B icon indicating copy to clipboard operation
ChatGLM-6B copied to clipboard

运行python web_demo.py报错

Open dongdongrj opened this issue 1 year ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

运行web_demo.py时每次都在加载模型文件时,进度到62%中断了。

Loading checkpoint shards: 62% 5/8 [00:43<00:26, 8.83s/it]^C

另外,下载的chatglm-6b放到哪里了,没有找到。

Expected Behavior

No response

Steps To Reproduce

git clone https://github.com/THUDM/ChatGLM-6B cd ChatGLM-6B pip install -r requirements.txt pip install gradio

python web_demo2.py

Environment

pip install -r requirements.txt

Anything else?

No response

dongdongrj avatar Apr 14 '23 09:04 dongdongrj

应该是内存不足,可以尝试使用INT4量化的模型 https://huggingface.co/THUDM/chatglm-6b-int4

duzx16 avatar Apr 14 '23 09:04 duzx16

应该是内存不足,可以尝试使用INT4量化的模型 https://huggingface.co/THUDM/chatglm-6b-int4

谢谢。

dongdongrj avatar Apr 17 '23 03:04 dongdongrj

应该是内存不足,可以尝试使用INT4量化的模型 https://huggingface.co/THUDM/chatglm-6b-int4

谢谢,用int4确实可以。

如果把模型文件下载到硬盘,会不会好点。我之前直接跑infer是可以的。infer是把模型下载下来的。

dongdongrj avatar Apr 17 '23 03:04 dongdongrj

1、打开这个ChatGLM.ipynb的时候colab就提示这个脚本文件是在高RAM的环境下创建的,有可能免费提供的环境运行不了,也就是说12.7GB系统内存的的T4GPU环境不达标,当然这个只是猜测。 2、当最后一步运行web_demo.py的时候,加载模型在62%的是时候退出,观察colab资源监视器,可以看到系统RAM在62%的对应时刻内存爆了,超过100%。 3、最后colab还贴心的提示你,弄了半天你都没用GPU资源,建议你切换到标准的CPU运行时。

这就是这个错误出现的全过程,所以免费的系统RAM不够,运行不起来,还是要花钱升级到PRO才可以的。

hordaway avatar Jun 06 '23 09:06 hordaway