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
Llama1and2_lmdeploy
Commits
567d4602
"src/libtorchaudio/sox/io.cpp" did not exist on "4b3e9052052c47f5fb367bc2500cc53c9946a2ed"
Commit
567d4602
authored
Aug 31, 2024
by
shantf
Browse files
update README.md
parent
739e3bd8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
23 deletions
+14
-23
README.md
README.md
+14
-23
No files found.
README.md
View file @
567d4602
...
...
@@ -82,27 +82,19 @@ cd .. && python3 setup.py install
### 运行 LLama-7b
```
bash
# <model_name> 模型的名字 ('llama', 'internlm', 'vicuna', 'internlm-chat-7b', 'internlm-chat', 'internlm-chat-7b-8k', 'internlm-chat-20b', 'internlm-20b', 'baichuan-7b', 'baichuan2-7b', 'llama2', 'qwen-7b', 'qwen-14b')
# <model_path> 模型路径
# <model_format> 模型的格式 ('llama', 'hf', 'qwen')
# <tokenizer_path> tokenizer模型的路径(默认None,会去model_path里面找tokenizer.model)
# <model_format> 保存输出的目标路径(默认./workspace)
# <tp> 用于张量并行的GPU数量应该是2^n
# bash界面运行
lmdeploy chat turbomind
--model_path
./workspace
_llama7b
--tp
1
# 输入问题后执行2次回车进行推理
lmdeploy chat turbomind
./path_to
_llama7b
--tp
1
# 输入问题后执行2次回车进行推理
# 服务器网页端运行
在bash端运行:
# <model_path_or_server> 部署模型的路径或tritonserver URL或restful api URL。前者用于与gradio直接运行服务。后者用于默认情况下使用tritonserver运行。如果输入URL是restful api。请启用另一个标志“restful_api”。
# <server-name> gradio服务器的ip地址
# <server-port> gradio服务器的ip的端口
# <batch_size> 于直接运行Turbomind的batch大小 (默认32)
# <tp> 用于张量并行的GPU数量应该是2^n (和模型转换的时候保持一致)
# <restful_api> modelpath_or_server的标志(默认是False)
lmdeploy serve gradio
--model_path_or_server
./workspace
_llama7b
--server-name
{
ip
}
--server-port
{
port
}
--
batch_size
32
--tp
1
--restful_api
False
lmdeploy serve gradio
./path_to
_llama7b
--server-name
{
ip
}
--server-port
{
port
}
--
tp
1
在网页上输入
{
ip
}
:
{
port
}
即可进行对话
```
...
...
@@ -110,24 +102,24 @@ lmdeploy serve gradio --model_path_or_server ./workspace_llama7b --server-name {
### 运行 LLama-13b
```
bash
# bash界面运行
lmdeploy chat turbomind ./
workspace
_llama13b
--tp
1
lmdeploy chat turbomind ./
path_to
_llama13b
--tp
1
# 服务器网页端运行
在bash端运行:
lmdeploy serve gradio ./
workspace
_llama13b
--server-name
{
ip
}
--server-port
{
port
}
--
batch_size
32
--tp
1
--restful_api
False
lmdeploy serve gradio ./
path_to
_llama13b
--server-name
{
ip
}
--server-port
{
port
}
--
tp
1
在网页上输入
{
ip
}
:
{
port
}
即可进行对话
```
### 运行 LLama-33b
```
bash
# bash界面运行
lmdeploy chat turbomind ./
workspace
_llama33b
--tp
4
lmdeploy chat turbomind ./
path_to
_llama33b
--tp
4
# 服务器网页端运行
在bash端运行:
lmdeploy serve gradio ./
workspace
_llama33b
--server-name
{
ip
}
--server-port
{
port
}
--
batch_size
32
--tp
4
--restful_api
False
lmdeploy serve gradio ./
path_to
_llama33b
--server-name
{
ip
}
--server-port
{
port
}
--
tp
4
在网页上输入
{
ip
}
:
{
port
}
即可进行对话
```
...
...
@@ -135,25 +127,24 @@ lmdeploy serve gradio ./workspace_llama33b --server-name {ip} --server-port {po
### 运行 LLama-65b
```
bash
# bash界面运行
lmdeploy chat turbomind ./
workspace
_llama65b
--tp
8
lmdeploy chat turbomind ./
path_to
_llama65b
--tp
8
# 服务器网页端运行
在bash端运行:
lmdeploy serve gradio ./workspace_llama65b
--server-name
{
ip
}
--server-port
{
port
}
--batch_size
32
--tp
8
--restful_api
False
lmdeploy serve gradio ./path_to_llama65b
--server-name
{
ip
}
--server-port
{
port
}
--tp
8
在网页上输入
{
ip
}
:
{
port
}
即可进行对话
```
### 运行 LLama2-7b
```
bash
# bash界面运行
lmdeploy chat turbomind ./
workspace
_llama2-7b
--tp
1
lmdeploy chat turbomind ./
path_to
_llama2-7b
--tp
1
# 服务器网页端运行
在bash端运行:
lmdeploy serve gradio ./
workspace
_llama2-7b
--server-name
{
ip
}
--server-port
{
port
}
--
batch_size
32
--tp
1
--restful_api
False
lmdeploy serve gradio ./
path_to
_llama2-7b
--server-name
{
ip
}
--server-port
{
port
}
--
tp
1
在网页上输入
{
ip
}
:
{
port
}
即可进行对话
```
...
...
@@ -161,12 +152,12 @@ lmdeploy serve gradio ./workspace_llama2-7b --server-name {ip} --server-port {po
### 运行 LLama2-13b
```
bash
# bash界面运行
lmdeploy chat turbomind ./
workspace
_llama2-13b
--tp
1
lmdeploy chat turbomind ./
path_to
_llama2-13b
--tp
1
# 服务器网页端运行
在bash端运行:
lmdeploy serve gradio ./
workspace
_llama2-13b
--server-name
{
ip
}
--server-port
{
port
}
--
batch_size
32
--tp
1
--restful_api
False
lmdeploy serve gradio ./
path_to
_llama2-13b
--server-name
{
ip
}
--server-port
{
port
}
--
tp
1
在网页上输入
{
ip
}
:
{
port
}
即可进行对话
```
...
...
@@ -174,12 +165,12 @@ lmdeploy serve gradio ./workspace_llama2-13b --server-name {ip} --server-port {
### 运行 LLama2-70b
```
bash
# bash界面运行
lmdeploy chat turbomind ./
workspace
_llama2-70b
--tp
8
lmdeploy chat turbomind ./
path_to
_llama2-70b
--tp
8
# 服务器网页端运行
在bash端运行:
lmdeploy serve gradio ./
workspace
_llama2-70b
--server-name
{
ip
}
--server-port
{
port
}
--
batch_size
32
--tp
8
--restful_api
False
lmdeploy serve gradio ./
path_to
_llama2-70b
--server-name
{
ip
}
--server-port
{
port
}
--
tp
8
在网页上输入
{
ip
}
:
{
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