Skip to content

Commit 4e82cdf

Browse files
committed
update
1 parent 4db0e25 commit 4e82cdf

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Launch inference server by:
154154
# install lmdeploy with extra dependencies
155155
pip install lmdeploy[serve]
156156

157-
lmdeploy serve api_server internlm/internlm-chat-7b-v1_1 --model-name internlm-chat-7b --server_name 0.0.0.0 --server_port ${server_port} --instance_num 32 --tp 1
157+
lmdeploy serve api_server internlm/internlm-chat-7b-v1_1 --model-name internlm-chat-7b --instance_num 32 --tp 1
158158
```
159159

160160
Then, you can communicate with it by command line,

README_zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ lmdeploy serve gradio internlm/internlm-chat-7b-v1_1 --model-name internlm-chat-
153153
# 安装lmdeploy额外依赖
154154
pip install lmdeploy[serve]
155155

156-
lmdeploy serve api_server internlm/internlm-chat-7b-v1_1 --model-name internlm-chat-7b --server_name 0.0.0.0 --server_port ${server_port} --instance_num 32 --tp 1
156+
lmdeploy serve api_server internlm/internlm-chat-7b-v1_1 --model-name internlm-chat-7b --instance_num 32 --tp 1
157157
```
158158

159159
你可以通过命令行方式与推理服务进行对话:

src/turbomind/triton_backend/llama/LlamaTritonModel.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,12 @@ LlamaTritonModel<T>::LlamaTritonModel(size_t tensor_para_size,
119119
enable_custom_all_reduce_(enable_custom_all_reduce)
120120
{
121121
INIReader reader;
122-
bool init_with_config = false;
122+
if (!config.empty() && !model_dir.empty()) {
123+
TM_LOG_ERROR("[ERROR] config and model_dir are all set");
124+
ft::FT_CHECK(false);
125+
}
123126

124-
if (!init_with_config && !config.empty()) {
127+
if (!config.empty()) {
125128
std::FILE* tmpf = std::tmpfile();
126129
std::fputs(config.c_str(), tmpf);
127130
std::rewind(tmpf);
@@ -130,10 +133,9 @@ LlamaTritonModel<T>::LlamaTritonModel(size_t tensor_para_size,
130133
TM_LOG_ERROR("[ERROR] Can't init with config %s", config.c_str());
131134
ft::FT_CHECK(false);
132135
}
133-
init_with_config = true;
134136
}
135137

136-
if (!init_with_config && !model_dir.empty()) {
138+
if (!model_dir.empty()) {
137139
model_dir_ = model_dir;
138140
const std::string inifile{model_dir + "/config.ini"};
139141
reader = INIReader(inifile);

0 commit comments

Comments
 (0)