【作业贴】2025-01-24,18-私有化LLM仿OpenAI API接口的高可用工程实践 #71
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
具体实现步骤及结果:








1、修改源码,增加端口参数:
#增加端口参数
parser.add_argument('--port', default=19327, type=int)
#启动时,增加端口参数
uvicorn.run(app, host="0.0.0.0", port=args.port, workers=1, log_config=log_ config)
2、启动GPU版本,端口号19328
python openai_api_server.py --port 19328 --gpus 0 --base_model /root/autodl-tmp/llama-3-chinese-8b-instruct-v3
3、启动CPU版本,端口号19329
python openai_api_server.py --only_cpu --port 19329 --base_model /root/autodl-tmp/llama-3-chinese-8b-instruct-v3
4、开启隧道
5、启动OneApi
登录并修改默认密码:
6、添加渠道
7、创建令牌
8、配置客户端指向OneAPI
9、验证集群效果
停止一个端口服务,可以正常访问另一个端口。
能够明显看到CPU和GPU端口的性能区别。