-
Notifications
You must be signed in to change notification settings - Fork 276
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
support vl benchmark #1662
base: main
Are you sure you want to change the base?
support vl benchmark #1662
Conversation
@AllentDan which command did you use to run this benchmark? Could you share? Was this run on an A100? I am curious also about performance on lesser GPUs which are more widely available and cheaper, and can test running there (such as GPUs with 24GB VRAM). I have followed the instructions at https://github.com/InternLM/lmdeploy/tree/main/benchmark the get the ShareGPT dataset, so I have the data! Another metric of interest would be how response time changes under load (if we increase requests per second, how much does the latency increase?) |
@vody-am yes, A100 card. python benchmark/profile_restful_api.py http://0.0.0.0:23333 /nvme/shared/llava-v1.6-vicuna-7b-4bit ShareGPT_V3_unfiltered_cleaned_split.json --concurrency 16 --img_hw 512*512 --stream_output True --num_prompts 1000 |
Ok, I am testing out on The non-quantized model successfully runs across all devices (impressively the L4 managed not to fall over serving requests). EDIT: figured out issues with quant model, needed to properly install GPU: 4090
GPU: 4090
GPU: L4
GPU: L4
|
Hi, @vody-am I used Excel to plot the chart. |
Currently running the benchmark on an Nvidia FP16 was much slower, I saw an ETA of over 2 hours. I can let it run unattended if there's interest in collecting that data, but if not no worries. I would personally like to be able to run quantized models on that hardware as they're relatively cheap and plentiful. Besides that, PR LGTM! Just two more questions might come to mind:
|
benchmark/profile_restful_api.py
Outdated
|
||
from lmdeploy.vl.utils import encode_image_base64 | ||
h, w = [int(s) for s in img_hw.split('*')] | ||
img = PIL.Image.new(mode='RGB', size=(w, h)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use random value for pixels.
benchmark/profile_restful_api.py
Outdated
import PIL | ||
|
||
from lmdeploy.vl.utils import encode_image_base64 | ||
h, w = [int(s) for s in img_hw.split('*')] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use "x" instead of ""? "x" just press one key, "" needs to press shift+8
I could not reproduce the error. @vody-am |
@AllentDan I was too hasty in posting 😓 thank you for checking, I will double check next time. I believe it is an environment error on my part, because it works on some hosts but not on others. Thanks 🫡 |
ok turns out I was not too hasty. I believe it worked once for me due to the random sampling. The issue I ran into is specific to Qwen-VL, since the tokenizer treats
I got around this via otherwise the tokenizer throws with "ValueError: Unclosed image token" |
@irexyc Do you have any idea handling |
I think the unclosed |
第一张图测试了 llava-v1.6-vicuna-7b 模型,量化后的 completion token/s 和 FTL。
![对比图](https://private-user-images.githubusercontent.com/41138331/334075581-b0139629-b119-4ca1-a8e9-bbe6f69d5896.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkzODQyMDIsIm5iZiI6MTcxOTM4MzkwMiwicGF0aCI6Ii80MTEzODMzMS8zMzQwNzU1ODEtYjAxMzk2MjktYjExOS00Y2ExLWE4ZTktYmJlNmY2OWQ1ODk2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI2VDA2MzgyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZiZjg2NGIwZTBmZWI1MjM0NjgwODBjNjA1MDlmOTNhOTU3NmE3OTZhMzBhMjRlNWYzZDRiZjA5Y2Y5MzdhZWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.2i6a5ghitRxwTH5CXkptrX_8Z2urZV4XZ2PPCpZh1Ys)
![awq](https://private-user-images.githubusercontent.com/41138331/334075601-9a34df55-2998-43a3-af6b-c3b65dabf8f5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkzODQyMDIsIm5iZiI6MTcxOTM4MzkwMiwicGF0aCI6Ii80MTEzODMzMS8zMzQwNzU2MDEtOWEzNGRmNTUtMjk5OC00M2EzLWFmNmItYzNiNjVkYWJmOGY1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI2VDA2MzgyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNhYjcwZGQ0ODVkZTBkZTdlMDZiM2Q2MzJmODAyNjJkYzNhZjM4NzExZDkwMzY2N2Q4N2Q0YTBiNWU2NWNiNjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.7mzYg8P-CXvPAzye7IAeEAgEo04Ym_INftyEEcvhLj8)
第二张图,测了量化前后的 吞吐量变化