2024-03-14小白笔记0

git clone https://github.com/THUDM/ChatGLM3.git
(gitcode.net)
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/
安装git-lfs
然后 git lfs install
https://modelscope.cn/models/ZhipuAI/chatglm3-6b/summary
新目录model
git clone https://www.modelscope.cn/ZhipuAI/chatglm3-6b.git
配置 glm3
进入glm3/basic_demo
修改web_demo_streamlit.py

MODEL_PATH = os.environ.get('MODEL_PATH', '../../chatglm3-6b')
Windows要改为正斜杠
若要cpu计算则
model = AutoModel.from_pretrained(MODEL_PATH, trust_remote_code=True, device_map="auto").float()

streamlit run web_demo_streamlit.py


理论基础:
https://modelscope.cn/models/ZhipuAI/ChatGLM-6B/summary
模型:
https://github.com/THUDM/ChatGLM3

本文作者:墨洺的文档

本文链接:

版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!