Windows 部署ChatGLM3大语言模型

一、环境要求

硬件

内存:>= 16GB

显存: >= 13GB(4080 16GB)

硬盘:60G

软件

python 版本推荐3.10 - 3.11

transformers 库版本推荐为 4.36.2

torch 推荐使用 2.0 及以上的版本,以获得最佳的推理性能

二、部署步骤

1、新建python3.10虚拟环境

使用pycharm建虚拟环境

2、设置镜像源

bash 复制代码
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

3、升级pip

bash 复制代码
python -m pip install --upgrade pip

4、安装项目依赖

bash 复制代码
pip install -r requirements.txt

5、安装Demo依赖

bash 复制代码
pip install -r composite_demo/requirements.txt

6、下载模型

安装git-lfs

sudo apt-get install git-lfs

bash 复制代码
git clone https://huggingface.co/THUDM/chatglm3-6b

如果从 HuggingFace 下载比较慢,也可以从 ModelScope 中下载。

bash 复制代码
git clone https://www.modelscope.cn/ZhipuAI/chatglm3-6b.git

7、运行demo

bash 复制代码
streamlit run basic_demo/web_demo_streamlit.py

相关推荐
杨杨杨大侠1 小时前
Jev、Kev、Laya:决策模型怎么选,什么时候需要微调?
人工智能·python·agent
LOVE️YOU2 小时前
Python 在定义函数时,究竟定义的是什么?
python
段一凡-华北理工大学2 小时前
大模型应用开发 100 天:Python + LLM 从入门到精通 day26~Prompt 调试与优化——A/B 测试与效果评估
windows·python·大模型·prompt·智能体·提示词工程·高炉智能化
Minecraft红客2 小时前
以撒的结合
python·游戏·电脑·娱乐
Circ.2 小时前
Python 调试 Litellm 本地大模型接口:模型列表与对话接口实操踩坑记录
开发语言·python
白萝卜弟弟3 小时前
【大模型Qwen3.8 27B】llama.cpp 本地大模型部署与使用
ai·大模型·agent·llama·qwen3.8
风早爽太3 小时前
用 ‌Render‌ 快速部署网站和常见问题解决
python·fastapi
李航19834 小时前
给自己的图形引擎,配上了AI渲染,做设计真是太方便了
人工智能·python·计算机视觉·ai·ai编程
L@ncor4 小时前
第六章 框架开发实践 · 学习笔记(AutoGen / AgentScope / CAMEL / LangGraph)
python·框架·autogen·langgraph·agentscope
Zhou1411364 小时前
SpringSecurity_02_授权与高级功能
开发语言·python