参考:
https://github.com/lm-sys/FastChat
https://blog.csdn.net/qq128252/article/details/132759107
##安装
pip3 install "fschat[model_worker,webui]"
此文章fschat 版本0.2.3;如果后续升级可能api请求头chatglm2-6b
模型下载:
##模型下载;huggingface下载慢,可以在modelscope下载:https://modelscope.cn/my/overview
##默认模型会下载到~/.cache/modelscope/hub
from modelscope.models import Model
model = Model.from_pretrained('ZhipuAI/chatglm2-6b', revision='v1.0.9')
1、chatglm2-6b测试
python3 -m fastchat.serve.cli --model-path ./chatglm2-6b --num-gpus 2
web使用
1)启动控制器<