Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhulinJulia24 committed Jan 15, 2025
1 parent f71908c commit cadf231
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 14 deletions.
9 changes: 6 additions & 3 deletions autotest/tools/pipeline/test_pipeline_chat_pytorch_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,17 @@ def test_pipeline_chat_kvint8_tp4(config, common_case_config, model,
['internlm/internlm2_5-20b-chat', 'mistralai/Mixtral-8x7B-Instruct-v0.1'])
def test_pipeline_chat_pytorch_pr(config, common_case_config, model):
spawn_context = get_context('spawn')
case_config = {
k: v
for k, v in common_case_config.items() if k == 'memory_test'
}
p = spawn_context.Process(target=run_pipeline_chat_test,
args=(config, common_case_config, model,
'pytorch'))
args=(config, case_config, model, 'pytorch'))
p.start()
p.join()

# assert script
assert_pipeline_chat_log(config, common_case_config, model, 'pytorch')
assert_pipeline_chat_log(config, case_config, model, 'pytorch')


@pytest.mark.order(6)
Expand Down
9 changes: 6 additions & 3 deletions autotest/tools/pipeline/test_pipeline_chat_turbomind_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,15 @@ def test_pipeline_chat_kvint8_tp4(config, common_case_config, model,
])
def test_pipeline_chat_pr(config, common_case_config, model):
spawn_context = get_context('spawn')
case_config = {
k: v
for k, v in common_case_config.items() if k == 'memory_test'
}
p = spawn_context.Process(target=run_pipeline_chat_test,
args=(config, common_case_config, model,
'turbomind'))
args=(config, case_config, model, 'turbomind'))
p.start()
p.join()
assert_pipeline_chat_log(config, common_case_config, model, 'turbomind')
assert_pipeline_chat_log(config, case_config, model, 'turbomind')


@pytest.mark.order(6)
Expand Down
14 changes: 8 additions & 6 deletions autotest/tools/restful/test_restful_chat_hf_turbomind_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,14 @@ def test_restful_chat_kvint8_tp4(config, common_case_config, worker_id):
],
indirect=True)
def test_restful_chat_pr(config, common_case_config):
run_all_step(
config, {
key: value
for key, value in common_case_config.items()
if key == 'memory_test'
})
case_config = {
k: v
for k, v in common_case_config.items() if k == 'memory_test'
}
run_all_step(config, {
key: value
for key, value in case_config.items() if key == 'memory_test'
})


@pytest.mark.order(7)
Expand Down
3 changes: 1 addition & 2 deletions autotest/utils/pipeline_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,7 @@ def run_pipeline_vl_chat_test(config,
if not is_bf16_supported():
backend_config.dtype = 'float16'
else:
backend_config = TurbomindEngineConfig(tp=tp,
cache_max_entry_count=0.6)
backend_config = TurbomindEngineConfig(tp=tp)

if 'llava' in model_case:
backend_config.model_name = 'vicuna'
Expand Down

0 comments on commit cadf231

Please sign in to comment.