[ML] 详解 ChatGLM-webui 的启动使用与 ChatGLM-6B 常见问题

发布时间 2023-04-05 15:17:58作者: ercom

 

1. ChatGLM-webui 总共支持以下几个命令选项:

 

2. 以 windows 为例,在 PowerShell 里运行命令:

 

# 安装依赖

pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 -f https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html -i https://mirrors.bfsu.edu.cn/pypi/web/simple

pip install --upgrade -r requirements.txt -i https://mirrors.bfsu.edu.cn/pypi/web/simple

 

# 启动

python.exe .\webui.py --listen --cpu --precision fp32

 

3. ChatGLM 常见问题

(1)ChatGLM-6B 模型加载机制与模型下载目录?

  运行 webui.py 时,如果没有 --model-path 指定模型位置,会自动从 huggingface 下载 THUDM/chatglm-6b;模型存在位置是 ~/.cache

 

(2)ChatGLM-6B 显存的硬件要求?

  运行 webui.py 可以通过 --precision fp32 指定。ChatGLM-6B 硬件要求参考:https://github.com/THUDM/ChatGLM-6B#硬件要求

 

Ref:模型路径变量建议 · Issue #1 · Akegarasu/ChatGLM-webui (github.com)

Ref:加载chatglm-6b-int4-qe会报错 · Issue #35 · Akegarasu/ChatGLM-webui (github.com)

Ref:Fix: optimize model selection logic to avoid cuda out of memory error. by remiliacn · Pull Request #26 · Akegarasu/ChatGLM-webui (github.com)

Repo:https://github.com/Akegarasu/ChatGLM-webui

Other:ChatGPT Online

Link:https://www.cnblogs.com/farwish/p/17289475.html