一、sqlcoder-70b-alpha测试
sqlcoder环境安装
1 | git clone https://github.com/defog-ai/sqlcoder.git |
模型下载
1 | https://hf-mirror.com/defog/sqlcoder-70b-alpha |
修改inference.py文件
1 | import torch |
执行脚本
1 | python inference.py -q "Question about the sample database goes here" |
模型部署返回结果
按照官网示例,部署(4卡)的int8量化后的,显存占用81.28GB,进行一次问答需要15分钟(70b效果个人感觉还行,但耗时过长)
sqlcoder接口部署
修改sqlcoder_70b_alpha.py
1 | import argparse |
执行脚本
1 | python sqlcoder_70b_alpha.py --port 9002 |
启动服务

模型服务调用
服务地址:https://10.103.190.9:9002/chat
入参:
1 | { |
postman方式调用
日志返回

