推理性能
以下推理性能数据均在打开性能模式条件下测试。
Qwen3-30B-A3B-GPTQ-Int4
| concurrency | input_len | output_len | TTFT (ms) | ITL (ms) | TPS(out) |
|---|---|---|---|---|---|
| 1 | 32 | 32 | 904.67 | 75.27 | 13.29 |
| 1 | 128 | 128 | 740.42 | 78.62 | 12.72 |
| 1 | 1024 | 1024 | 807.32 | 93.34 | 10.71 |
| 1 | 3072 | 1024 | 944.97 | 106.43 | 9.4 |
| 1 | 8192 | 1024 | 1326.21 | 139.12 | 7.19 |
gptq-Qwen3-8B
| concurrency | input_len | output_len | TTFT (ms) | ITL (ms) | TPS(out) |
|---|---|---|---|---|---|
| 1 | 32 | 32 | 528.82 | 114.51 | 8.73 |
| 1 | 128 | 128 | 528.28 | 117.16 | 8.54 |
| 1 | 1024 | 1024 | 617.24 | 141.2 | 7.08 |
| 1 | 3072 | 1024 | 670.85 | 153.07 | 6.53 |
| 1 | 8192 | 1024 | 953.25 | 206.49 | 4.84 |
gptq-Qwen2.5-7B-Instruct
| concurrency | input_len | output_len | TTFT (ms) | ITL (ms) | TPS(out) |
|---|---|---|---|---|---|
| 1 | 32 | 32 | 186.04 | 105.81 | 9.45 |
| 1 | 128 | 128 | 172.6 | 106.54 | 9.39 |
| 1 | 1024 | 1024 | 211.89 | 113.46 | 8.81 |
| 1 | 3072 | 1024 | 320.17 | 125.48 | 7.97 |
| 1 | 8192 | 1024 | 475.36 | 137.76 | 7.26 |
测试性能
conda activate v1.3.2
输入示例
vllm bench serve \
--model Qwen3-30B-A3B-GPTQ-Int4 \
--dataset_name random \
--random_input_len 128 \
--random_output_len 128 \
--num-prompts 1 \
--trust-remote-code \
--ignore-eos
备注
- 一个窗口启动模型服务(vllm serve),另一个窗口运行性能测试(vllm bench serve)
- 如果报错
transformers找不到:pip3 install transformers==4.52.4 - 性能表格TPS(out)的值为1000/TPOT (ms)得出
- 上述性能仅供参考,运行实际结果受具体环境,测试方法和测试数据集影响
参数说明
| 参数名 | 参数作用 | 输入范围 / 建议值 |
|---|---|---|
--model | 指定待测试的模型名称 / 本 地路径 | 字符串,需填写实际部署的模型名/与启动命令相同的模型路径 |
--dataset_name | 指定性能测试使用的数据集类型 | 字符串,常用值: random(随机数据集)、sharegpt(真实对话数据集)等 |
--random_input_len | 当使用随机数据集时,设置输入 Prompt 的 Token 长度 | 正整数,建议根据实际业务场景设置(如 32/128/512/1024),需≤模型最大输入长度 |
--random_output_len | 当使用随机数据集时,设置模型生成输出的 Token 长度 | 正整数,建议贴合实际生成需求(如 32/128/512/1024),需≤模型最大输出长度 |
--num-prompts | 指定单次性能测试的 Prompt 总数 | 正整数,单测建议 1-10(验证基础性能),压测建议 100-10000(模拟高并发) |
--trust-remote-code | 信任模型的远程自定义代码(无参数值) | 布尔型(无需赋值,加该参数即启用),加载非官方标准模型时建议启用,确保模型正常加载 |
--ignore-eos | 忽略 EOS(结束符)Token(无参数值) | 布尔型(无需赋值,加该参数即启用),性能测试时启用可保证输出长度稳定,避免因提前终止影响测试结果 |
输出示例
============ Serving Benchmark Result ============
Successful requests: 1
Benchmark duration (s): 11.57
Total input tokens: 128
Total generated tokens: 128
Request throughput (req/s): 0.09
Output token throughput (tok/s): 11.07
Total Token throughput (tok/s): 22.13
---------------Time to First Token----------------
Mean TTFT (ms): 741.80
Median TTFT (ms): 741.80
P99 TTFT (ms): 741.80
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms): 85.22
Median TPOT (ms): 85.22
P99 TPOT (ms): 85.22
---------------Inter-token Latency----------------
Mean ITL (ms): 85.22
Median ITL (ms): 79.30
P99 ITL (ms): 131.63
==================================================

