ChatGLM3模型部署
安装git和git-lfs
yum -y install git git-lfs
拉取运行模型代码
cd /mnt/
git clone https://github.com/THUDM/ChatGLM3.git
拉取模型,拉取时间较长,需要耐心等待
cd ChatGlM3
mkdir models
git lfs install
git clone https://www.modelscope.cn/ZhipuAI/chatglm3-6b.git
git clone https://www.modelscope.cn/Xorbits/bge-large-zh-v1.5.git
拉取完成后,修改配置文件`openai_api_demo/api_server.py`
THUDM/chatglm3-6b修改为/mnt/ChatGLM3/models/chatglm3-6b
BAAI/bge-large-zh-v1.5修改为/mnt/ChatGLM3/models/bge-large-zh-v1.5
安装依赖
pip3 install -r requirements.txt
启动模型
# 前台启动
python3 api_server.py
# 后台启动
nohup python3 api_server.py &
disown
启动m3e模型
docker run -d -p 6008:6008 --name=m3e-large-api registry.cn-hangzhou.aliyuncs.com/fastgpt_docker/m3e-large-api:latest
相关地址
模型下载地址1:https://huggingface.co
模型下载地址2:https://www.modelscope.cn(推荐使用,国内下载速度快)
启动模型代码地址:https://github.com/THUDM/ChatGLM3.git