Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
irexyc committed Nov 21, 2023
1 parent 4db0e25 commit 4e82cdf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Launch inference server by:
# install lmdeploy with extra dependencies
pip install lmdeploy[serve]

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
lmdeploy serve api_server internlm/internlm-chat-7b-v1_1 --model-name internlm-chat-7b --instance_num 32 --tp 1
```

Then, you can communicate with it by command line,
Expand Down
2 changes: 1 addition & 1 deletion README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ lmdeploy serve gradio internlm/internlm-chat-7b-v1_1 --model-name internlm-chat-
# 安装lmdeploy额外依赖
pip install lmdeploy[serve]

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
lmdeploy serve api_server internlm/internlm-chat-7b-v1_1 --model-name internlm-chat-7b --instance_num 32 --tp 1
```

你可以通过命令行方式与推理服务进行对话:
Expand Down
10 changes: 6 additions & 4 deletions src/turbomind/triton_backend/llama/LlamaTritonModel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,12 @@ LlamaTritonModel<T>::LlamaTritonModel(size_t tensor_para_size,
enable_custom_all_reduce_(enable_custom_all_reduce)
{
INIReader reader;
bool init_with_config = false;
if (!config.empty() && !model_dir.empty()) {
TM_LOG_ERROR("[ERROR] config and model_dir are all set");
ft::FT_CHECK(false);
}

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

if (!init_with_config && !model_dir.empty()) {
if (!model_dir.empty()) {
model_dir_ = model_dir;
const std::string inifile{model_dir + "/config.ini"};
reader = INIReader(inifile);
Expand Down

0 comments on commit 4e82cdf

Please sign in to comment.