Commit f2d9d074 authored by zhouxiang's avatar zhouxiang
Browse files

更新lmdeploy到0.1.0版本

parent 14c3b38d
[submodule "lmdeploy"]
path = lmdeploy
url = http://developer.hpccube.com/codes/aicomponent/lmdeploy.git
branch = dtk23.10-v0.0.13-qwen
branch = dtk23.10-v0.1.0
......@@ -18,10 +18,10 @@ Yi 系列模型以双语语言模型为目标,并在 3T 多语言语料库上
提供光源拉取推理的docker镜像:
```
docker pull image.sourcefind.cn:5000/dcu/admin/base/custom:lmdeploy-dtk23.10-torch1.13-py38
docker pull image.sourcefind.cn:5000/dcu/admin/base/custom:lmdeploy1.0-dtk23.10-torch1.13-py38-latest
# <Host Path>主机端路径
# <Container Path>容器映射路径
docker run -it --name codellama --shm-size=1024G -v /opt/hyhal:/opt/hyhal --device=/dev/kfd --device=/dev/dri/ --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --ulimit memlock=-1:-1 --ipc=host --network host --group-add video -v <Host Path>:<Container Path> image.sourcefind.cn:5000/dcu/admin/base/custom:lmdeploy-dtk23.10-torch1.13-py38 /bin/bash
docker run -it --name codellama --shm-size=1024G -v /opt/hyhal:/opt/hyhal --device=/dev/kfd --device=/dev/dri/ --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --ulimit memlock=-1:-1 --ipc=host --network host --group-add video -v <Host Path>:<Container Path> image.sourcefind.cn:5000/dcu/admin/base/custom:lmdeploy1.0-dtk23.10-torch1.13-py38-latest /bin/bash
```
## 数据集
......@@ -30,6 +30,8 @@ docker run -it --name codellama --shm-size=1024G -v /opt/hyhal:/opt/hyhal --devi
### 源码编译安装
```
# 若使用光源的镜像,可以不用源码编译,镜像里面安装好了lmdeploy,可跳过源码编译安装
# 获取源码,编译并安装
git clone http://developer.hpccube.com/codes/modelzoo/yi_lmdeploy.git
cd yi_lmdeploy
git submodule init && git submodule update
......@@ -74,7 +76,7 @@ lmdeploy serve gradio --model_path_or_server ./workspace_yi-34b --server_name {s
```shell
# --instance_num: turbomind推理实例的个数。可理解为支持的最大并发数
# --tp: 在 tensor parallel时,使用的GPU数量
lmdeploy serve api_server ./workspace_yi-34b --server_name ${server_ip} --server_port ${server_port} --instance_num 32 --tp 4
lmdeploy serve api_server ./workspace_yi-34b --server_name ${server_ip} --server_port ${server_port} --tp 4
```
浏览器上打开 `http://{server_ip}:{server_port}`,即可访问 swagger,查阅 RESTful API 的详细信息。
......@@ -92,7 +94,7 @@ lmdeploy serve gradio restful_api_url --server_name ${server_ip} --server_port $
```
**需要保证'{server_ip}:{server_port}'在外部浏览器中的可访问性**
关于 RESTful API的详细介绍,请参考[这份](https://developer.hpccube.com/codes/aicomponent/lmdeploy/-/blob/dtk23.04-v0.0.13/docs/zh_cn/restful_api.md)文档。
关于 RESTful API的详细介绍,请参考[这份](https://developer.hpccube.com/codes/aicomponent/lmdeploy/-/blob/dtk23.10-v0.1.0/docs/zh_cn/restful_api.md)文档。
## result
![llama](docs/yi34b.gif)
......
lmdeploy @ d033914f
Subproject commit 206219aad30d88ad510287218f4fd17e22845142
Subproject commit d033914f0a2ba0724f7b08905bd1f18a0afe1814
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment