1,关于chatgpt-web项目
【xinference】(10):在autodl上运行xinf和chatgpt-web配置联动,xinf运行qwen-1.5大模型做api后端
https://gitcode.com/Chanzhaoyu/chatgpt-web/overview
还是非常不错的:

2,node安装有点慢,直接解压缩二进制文件
echo "start downloading node-v20.14.0-linux-x64.tar.xz "
wget https://mirrors.aliyun.com/nodejs-release/v20.14.0/node-v20.14.0-linux-x64.tar.gz
tar -zxvf node-v20.14.0-linux-x64.tar.gz
rm -f node-v20.14.0-linux-x64.tar.gz
export NODE_PATH=/root/autodl-tmp/xinference-run-llm/node-v20.14.0-linux-x64
export PATH=$PATH:$NODE_PATH/bin
配置好环境变量就可以使用 npm 安装了。
3,使用chatgpt-web需要启动两个 npm run 服务
第一个是web 在当前目录
第二个是 service ,里面有nodejs的服务接口。
然后就可以启动成功了。
最重要是进行配置:
export AUTH_SECRET_KEY=1234
# 配置xinf 接口服务:
export OPENAI_API_KEY=1234
export OPENAI_API_MODEL=qwen1.5-chat
export OPENAI_API_BASE_URL=http://0.0.0.0:9997/v1
全部脚本地址:
https://gitee.com/fly-llm/xinference-run-llm/blob/master/run_chatgpt_web.sh
4,启动xinference项目,安装qwen1.5大模型
git clone https://gitee.com/fly-llm/xinference-run-llm.git
# 然后 启动qwen 大模型,即可。
# https://inference.readthedocs.io/zh-cn/latest/models/builtin/llm/qwen1.5-chat.html
# 0.5 版本
xinference launch --model-engine transformers --model-name qwen1.5-chat \
--size-in-billions 0_5 --model-format pytorch --quantization none
# 7b版本
xinference launch --model-engine transformers --model-name qwen1.5-chat \
--size-in-billions 7 --model-format pytorch --quantization 8-bit
5,最终效果,前后端联合本地运行效果
前端使用chatgpt-web,后端使用xinference 项目做api


4856

被折叠的 条评论
为什么被折叠?



