Skip to content

Commit 3a25127

Browse files
authored
supplement deploy benchmark (#638) (#639)
1 parent 2fe6454 commit 3a25127

File tree

2 files changed

+55
-16
lines changed

2 files changed

+55
-16
lines changed

deploy/README.md

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,33 @@ python export.py \
7878
## 3. 推理 BenchMark
7979

8080
> Note:
81-
> 测试环境为Paddle 3.0,A100 80G单卡。
81+
> 测试环境为:
82+
Paddle 3.0,
83+
PaddleMIX release/2.0
84+
PaddleNLP2.7.2
85+
A100 80G单卡。
86+
87+
### 3.1 benchmark命令
88+
89+
`deploy` 对应模型目录下的运行后加 --benchmark,
90+
如 GroundingDino 的benchmark命令为:
91+
92+
```bash
93+
cd deploy/groundingdino
94+
python predict.py \
95+
--text_encoder_type GroundingDino/groundingdino-swint-ogc \
96+
--model_path output_groundingdino/GroundingDino/groundingdino-swint-ogc \
97+
--input_image https://bj.bcebos.com/v1/paddlenlp/models/community/GroundingDino/000000004505.jpg \
98+
--output_dir ./groundingdino_predict_output \
99+
--prompt "bus" \
100+
--benchmark True
101+
```
82102

83103
# A100性能数据
84-
|模型|Paddle Deploy |
85-
|-|-|
86-
|qwen-vl-7b|669.8 ms|
87-
|llava-1.5-7b|981.2 ms|
88-
|llava-1.6-7b|778.7 ms|
89-
|groundingDino/groundingdino-swint-ogc|100 ms|
90-
|Sam/SamVitH-1024|121 ms|
104+
|模型|图片分辨率|数据类型 |Paddle Deploy |
105+
|-|-|-|-|
106+
|qwen-vl-7b|448*448|fp16|669.8 ms|
107+
|llava-1.5-7b|336*336|fp16|981.2 ms|
108+
|llava-1.6-7b|336*336|fp16|778.7 ms|
109+
|groundingDino/groundingdino-swint-ogc|800*1193|fp32|100 ms|
110+
|Sam/SamVitH-1024|1024*1024|fp32|121 ms|

deploy/README_en.md

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,32 @@ Will be exported to the following directory, including `model_state.pdiparams`,
7777
## 3. BenchMark
7878

7979
> Note:
80-
> Paddle 3.0,A100 80G。
80+
> environment
81+
Paddle 3.0
82+
PaddleMIX release/2.0
83+
PaddleNLP 2.7.2
84+
A100 80G。
8185

86+
### 3.1 benchmark cmd
8287

83-
|Model|Paddle Deploy |
84-
|-|-|
85-
|qwen-vl-7b|669.8 ms|
86-
|llava-1.5-7b|981.2 ms|
87-
|llava-1.6-7b|778.7 ms|
88-
|groundingDino/groundingdino-swint-ogc|100 ms|
89-
|Sam/SamVitH-1024|121 ms|
88+
Add -- benchmark after running in the 'deploy' corresponding model directory to obtain the running time of the model.
89+
example: GroundingDino benchmark:
90+
91+
```bash
92+
cd deploy/groundingdino
93+
python predict.py \
94+
--text_encoder_type GroundingDino/groundingdino-swint-ogc \
95+
--model_path output_groundingdino/GroundingDino/groundingdino-swint-ogc \
96+
--input_image https://bj.bcebos.com/v1/paddlenlp/models/community/GroundingDino/000000004505.jpg \
97+
--output_dir ./groundingdino_predict_output \
98+
--prompt "bus" \
99+
--benchmark True
100+
```
101+
102+
|Model|image size|dtype |Paddle Deploy |
103+
|-|-|-|-|
104+
|qwen-vl-7b|448*448|fp16|669.8 ms|
105+
|llava-1.5-7b|336*336|fp16|981.2 ms|
106+
|llava-1.6-7b|336*336|fp16|778.7 ms|
107+
|groundingDino/groundingdino-swint-ogc|800*1193|fp32|100 ms|
108+
|Sam/SamVitH-1024|1024*1024|fp32|121 ms|

0 commit comments

Comments
 (0)