-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[Model] Enable DP for ViT in Qwen2-VL #25445
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
[Model] Enable DP for ViT in Qwen2-VL #25445
Conversation
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
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.
Code Review
This pull request introduces data parallelism support for the Vision Transformer in Qwen2-VL. The changes are well-structured and primarily involve plumbing a use_data_parallel
flag through the vision model components to conditionally disable tensor parallelism. The logic for handling data-parallel execution paths appears correct. Overall, the changes are sound and should enable the intended data parallelism functionality.
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.
LGTM
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Signed-off-by: charlifu <charlifu@amd.com>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Signed-off-by: gaojc <1055866782@qq.com>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
I tested the DP strategy in two different hardware environments, using nccl-tests to test GPU communication in both environments. The results were (Avg bus bandwidth: 23.8703) for the L20 hardware environment and (Avg bus bandwidth: 282.133) for the H800 hardware environment. In the Qwen2.5-VL-7B-Instruct model I deployed, the TP strategy outperformed the DP strategy when the concurrency was below approximately 256. Why is this? Is it because communication is no longer a bottleneck at this point, and the computational benefits of TP outweigh the communication benefits of DP? When the concurrency reaches a certain level, communication in the Vit module becomes a bottleneck, and the communication benefits of DP outweigh the computational benefits of TP. |
Purpose
Part of #22743
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.md
andexamples
for a new model.