-
Notifications
You must be signed in to change notification settings - Fork 493
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
[Docs] 吞吐的提升主要是因为重写了GQA的kernel? #1785
Comments
@lzhangzz 大佬能解答一下不咯 |
这只是说优化完了 RPS 到 16+,本来也不慢的 |
额 那整体吞吐能到VLLM的1.8倍 这个优化主要是哪里带来的呀 大佬求解答~ |
在使用vllm的性能测试脚本的时候,我们发现测试过程中,它的gpu利用率比较低,50%左右 |
额那你们测的那版vllm可能有问题 vllm推理是纯串行所以满载gpu利用率是在80%多一点 lmdeploy是98% 但是这里也只有20%不到的提升 https://link.zhihu.com/?target=https%3A//docs.google.com/presentation/d/1A--47JAK4BJ39t954HyTkvtfwn0fkqtsL8NGFuslReM/edit%23slide%3Did.g2c91788b9bf_90_531 我看这个vllm的人做的测试 你们的forward随着batch_size的增加 增长率很低 所以这里kernal是否针对大batch做了更高并发的优化呢?我还是感觉主要是kernal的优势 |
你测试的vllm的性能是多少呢? |
https://www.bentoml.com/blog/benchmarking-llm-inference-backends 这是bentoml评估的结果,也提到了gpu利用率低的问题。 |
Refactor attention and optimize GQA(#1258 #1307 #1116), achieving 22+ and 16+ RPS for internlm2-7b and internlm2-20b, about 1.8x faster than vLLM 这里的 1.8x 是对比的 internlm2-7b,它是 GQA 架构。llama2的MHA架构,大约是 1.4x。 这 3 个PR 是在 0.3.0 版本加入进来的,它们更多的是对代码的重构。LMDeploy 0.3.0 和 LMDeploy 0.2.6 对比,提升的不显著。这也是 @lzhangzz 说的,“本来也不慢的" |
llama2系列 延迟的话都差不多 极限吞吐lm:tgi:vllm=1.6:1.1:1 大概是这个比例 测lm时候是打开promot cache 然后max_batchs_size=256 |
📚 The doc issue
feature里有提到:[2024/04] TurboMind latest upgrade boosts GQA, rocketing the internlm2-20b model inference to 16+ RPS, about 1.8x faster than vLLM.
是用fused_multi_head_attention替代了flashattn2的kernel嘛?但是attention也只占整个forward的1/3左右,只是这里的优化能有这么大的收益吗?
Suggest a potential alternative/fix
No response
The text was updated successfully, but these errors were encountered: