Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
Yi_lmdeploy
Commits
67da406d
"docs/source/vscode:/vscode.git/clone" did not exist on "cf03592743abbb0b06ba609ebba3847a8ada4a47"
Commit
67da406d
authored
Aug 29, 2024
by
dcuai
Browse files
更换dtk24.04.1镜像
parent
2b9e172b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
18 deletions
+8
-18
README.md
README.md
+8
-18
No files found.
README.md
View file @
67da406d
...
@@ -16,34 +16,22 @@ Yi 系列模型以双语语言模型为目标,并在 3T 多语言语料库上
...
@@ -16,34 +16,22 @@ Yi 系列模型以双语语言模型为目标,并在 3T 多语言语料库上
## 环境配置
## 环境配置
### Docker
提供光源拉取推理的docker镜像:
提供光源拉取推理的docker镜像:
```
bash
```
bash
docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:2.1.0-ubuntu20.04-dtk24.04.1-py3.10
(
推荐
)
docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:2.1.0-ubuntu20.04-dtk24.04.1-py3.10
(
推荐
)
docker pull image.sourcefind.cn:5000/dcu/admin/base/custom:lmdeploy0.0.13_dtk23.04_torch1.13_py38
# <Image ID>用上面拉取docker镜像的ID替换
# <Image ID>用上面拉取docker镜像的ID替换
# <Host Path>主机端路径
# <Host Path>主机端路径
# <Container Path>容器映射路径
# <Container Path>容器映射路径
docker run
-it
--name
baichuan
--shm-size
=
102
4G
--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 ID> /bin/bash
docker run
-it
--name
yi
--shm-size
=
6
4G
--device
=
/dev/kfd
--device
=
/dev/dri/
--cap-add
=
SYS_PTRACE
--security-opt
seccomp
=
unconfined
-v
/opt/hyhal:/opt/hyhal:ro
--ulimit
memlock
=
-1
:-1
--ipc
=
host
--network
=
host
--group-add
video
-v
<Host Path>:<Container Path> <Image ID> /bin/bash
```
```
镜像版本依赖:
镜像版本依赖:
*
DTK驱动:24.04.1
*
DTK驱动:24.04.1
*
Pytorch: 2.1.0
*
Pytorch: 2.1.0
*
python: python3.10
*
python: python3.10
> [!NOTE]
>
> 使用lmdeploy0.0.13_dtk23.04_torch1.13_py38如果遇到 importError:libgemm multiB int4.so: cannot open shared obiect file: No such file or directory
>
> 解决方法:
>
> ```bash
> rm /usr/local/lib/python3.8/site-packages/_turbomind.cpython-38-x86_64-linux-gnu.so
> ```
## 数据集
## 数据集
...
@@ -53,6 +41,8 @@ docker run -it --name baichuan --shm-size=1024G --device=/dev/kfd --device=/dev
...
@@ -53,6 +41,8 @@ docker run -it --name baichuan --shm-size=1024G --device=/dev/kfd --device=/dev
### 源码编译安装
### 源码编译安装
```
bash
```
bash
#若使用光源的镜像,可以不用源码编译,镜像里面安装好了lmdeploy,可跳过源码编译安装
# 获取源码,编译并安装
git clone http://developer.hpccube.com/codes/modelzoo/yi_lmdeploy.git
git clone http://developer.hpccube.com/codes/modelzoo/yi_lmdeploy.git
cd
yi_lmdeploy
cd
yi_lmdeploy
git submodule init
&&
git submodule update
git submodule init
&&
git submodule update
...
@@ -99,7 +89,7 @@ lmdeploy chat turbomind ./path_to_yi-34b --tp 4
...
@@ -99,7 +89,7 @@ lmdeploy chat turbomind ./path_to_yi-34b --tp 4
#### web页面方式交互
#### web页面方式交互
```
shell
```
shell
lmdeploy serve gradio ./path_to_yi-34b
--server-name
{
server_ip
}
--server-port
{
port
}
--ba
tch_size
32
--tp
4
--restful_api
False
lmdeploy serve gradio ./path_to_yi-34b
--server-name
{
server_ip
}
--server-port
{
port
}
--ba
ckend
turbomind
--tp
4
```
```
浏览器上打开
`http://{server_ip}:{server_port}`
,即可进行对话
浏览器上打开
`http://{server_ip}:{server_port}`
,即可进行对话
**需要保证'{server_ip}:{server_port}'在外部浏览器中的可访问性**
**需要保证'{server_ip}:{server_port}'在外部浏览器中的可访问性**
...
@@ -109,7 +99,7 @@ lmdeploy serve gradio ./path_to_yi-34b --server-name {server_ip} --server-port {
...
@@ -109,7 +99,7 @@ lmdeploy serve gradio ./path_to_yi-34b --server-name {server_ip} --server-port {
```
shell
```
shell
# --instance_num: turbomind推理实例的个数。可理解为支持的最大并发数
# --instance_num: turbomind推理实例的个数。可理解为支持的最大并发数
# --tp: 在 tensor parallel时,使用的GPU数量
# --tp: 在 tensor parallel时,使用的GPU数量
lmdeploy serve api_server ./path_to_yi-34b
--server-name
{
server_ip
}
--server-port
{
server_port
}
--instance_num
32
--tp
4
lmdeploy serve api_server ./path_to_yi-34b
--server-name
{
server_ip
}
--server-port
{
server_port
}
--tp
4
```
```
浏览器上打开
`http://{server_ip}:{server_port}`
,即可访问 swagger,查阅 RESTful API 的详细信息。
浏览器上打开
`http://{server_ip}:{server_port}`
,即可访问 swagger,查阅 RESTful API 的详细信息。
...
@@ -122,8 +112,8 @@ lmdeploy serve api_client restful_api_url
...
@@ -122,8 +112,8 @@ lmdeploy serve api_client restful_api_url
```
shell
```
shell
# restful_api_url 就是 api_server 产生的,比如 http://localhost:23333
# restful_api_url 就是 api_server 产生的,比如 http://localhost:23333
# server_ip 和 server_port 是用来提供 gradio ui 访问服务的
# server_ip 和 server_port 是用来提供 gradio ui 访问服务的
# 例子: lmdeploy serve gradio http://localhost:23333 --server-name localhost --server-port 6006
--restful_api True
# 例子: lmdeploy serve gradio http://localhost:23333 --server-name localhost --server-port 6006
lmdeploy serve gradio restful_api_url
--server-name
{
server_ip
}
--server-port
{
server_port
}
--restful_api
True
lmdeploy serve gradio restful_api_url
--server-name
{
server_ip
}
--server-port
{
server_port
}
```
```
**需要保证'{server_ip}:{server_port}'在外部浏览器中的可访问性**
**需要保证'{server_ip}:{server_port}'在外部浏览器中的可访问性**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment