8000 [Fix] Fix vllm max_seq_len parameter transfer by liushz · Pull Request #1745 · open-compass/opencompass · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Fix] Fix vllm max_seq_len parameter transfer #1745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/pr-run-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ jobs:
exit 1
fi
score=$(sed -n '$p' regression_result3/*/summary/*.csv | awk -F ',' '{print $NF}')
if (( ${score%.*} >= 84 && ${score%.*} <= 87 )); then
echo "score is $score between 84 and 87"
if (( ${score%.*} >= 87 && ${score%.*} <= 89 )); then
echo "score is $score between 87 and 89"
else
echo "score is $score not between 84 and 87"
echo "score is $score not between 87 and 89"
exit 1
fi
rm -rf regression_result1 & rm -rf regression_result2 & rm -rf regression_result3
Expand Down
16 changes: 11 additions & 5 deletions opencompass/utils/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,9 @@ def change_accelerator(models, accelerator):
type=f'{VLLM.__module__}.{VLLM.__name__}',
abbr=model['abbr'].replace('hf', 'vllm') if '-hf' in model['abbr'] else model['abbr'] + '-vllm',
path=model['path'],
model_kwargs=dict(tensor_parallel_size=model['run_cfg']['num_gpus']),
model_kwargs=dict(tensor_parallel_size=model['run_cfg']['num_gpus'], max_model_len=model.get('max_seq_len', None)),
max_out_len=model['max_out_len'],
max_seq_len=model['max_seq_len'],
max_seq_len=model.get('max_seq_len', None),
batch_size=model['batch_size'],
generation_kwargs=generation_kwargs,
run_cfg=model['run_cfg'],
Expand All @@ -301,7 +301,8 @@ def change_accelerator(models, accelerator):
type=f'{mod.__module__}.{mod.__name__}',
abbr=model['abbr'].replace('hf', 'vllm') if '-hf' in model['abbr'] else model['abbr'] + '-vllm',
path=model['path'],
model_kwargs=dict(tensor_parallel_size=model['run_cfg']['num_gpus']),
model_kwargs=dict(tensor_parallel_size=model['run_cfg']['num_gpus'], max_model_len=model.get('max_seq_len', None)),
max_seq_len=model.get('max_seq_len', None),
max_out_len=model['max_out_len'],
batch_size=16,
run_cfg=model['run_cfg'],
Expand All @@ -313,9 +314,14 @@ def change_accelerator(models, accelerator):
type=f'{mod.__module__}.{mod.__name__}',
abbr=model['abbr'].replace('hf', 'lmdeploy') if '-hf' in model['abbr'] else model['abbr'] + '-lmdeploy',
path=model['path'],
engine_config=dict(max_batch_size=model.get('batch_size', 16), tp=model['run_cfg']['num_gpus']),
engine_config=dict(
max_batch_size=model.get('batch_size', 16),
tp=model['run_cfg']['num_gpus'],
session_len=model.get('max_seq_len', None),
max_new_tokens=model['max_out_len']
),
gen_config=dict(top_k=1, temperature=1e-6, top_p=0.9),
max_seq_len=model.get('max_seq_len', 2048),
max_seq_len=model.get('max_seq_len', None),
max_out_len=model['max_out_len'],
batch_size=16,
run_cfg=model['run_cfg'],
Expand Down
Loading
0