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

通过llama.cpp与羊驼聊天的网页界面- 详解 Serge 的启动使用

 

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-webui 模型加载机制与模型下载目录?

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

 

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

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

 

(3) Windows报错 Could not found module 'nvcuda.dll'?

  如果没有 nvcuda.dll 就先 下载 nvcuda.dll 放到 C:\Windows\System32 目录内试试。

  

 

体验:ChatGLM 在线ChatGLM2ChatAI Online

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)

Ref:[BUG/Help] Windows下CPU部署chatglm-6b-int4报错“Could not find module 'nvcuda.dll'” · Issue #166 · THUDM/ChatGLM-6B (github.com)

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

posted on 2023-04-05 15:13  ercom  阅读(2842)  评论(0编辑  收藏  举报