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
laibao
Qwen2.5_vllm
Commits
a3afc415
Commit
a3afc415
authored
Oct 15, 2024
by
laibao
Browse files
[README]更新api服务推理性能测试
parent
15c6147a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
README.md
README.md
+16
-0
No files found.
README.md
View file @
a3afc415
...
...
@@ -123,6 +123,22 @@ python benchmarks/benchmark_throughput.py --num-prompts 1 --model Qwen/Qwen2.5-7
其中
`--num-prompts`
是batch数,
`--model`
为模型路径,
`--dataset`
为使用的数据集,
`-tp`
为使用卡数,
`dtype="float16"`
为推理数据类型,如果模型权重是bfloat16,需要修改为float16推理。
`-q gptq`
为使用gptq量化模型进行推理。
### OpenAI api服务推理性能测试
1.
启动服务:
```
bash
python
-m
vllm.entrypoints.openai.api_server
--model
Qwen/Qwen2.5-7B-instruct
--enforce-eager
--dtype
float16
--trust-remote-code
```
2.
启动客户端
```
python benchmarks/benchmark_serving.py --model Qwen/Qwen2.5-7B-instruct --dataset ShareGPT_V3_unfiltered_cleaned_split.json --num-prompts 1 --trust-remote-code
```
参数同使用数据集,离线批量推理性能测试,具体参考
[
benchmarks/benchmark_serving.py
](
/codes/modelzoo/qwen1.5_vllm/-/blob/master/benchmarks/benchmark_serving.py
)
### OpenAI兼容服务
启动服务:
...
...
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