[VLM] Support PP for Qwen2.5-VL (#13075)

Co-authored-by: luoyuan.luo <luoyuan.luo@antgroup.com>
Co-authored-by: Tianyu Guo <guoty9@mail2.sysu.edu.cn>
This commit is contained in:
Yuan Luo
2025-11-12 23:18:44 +08:00
committed by GitHub
co-authored by luoyuan.luo Tianyu Guo
parent c2e56dadb2
commit 706502ff6c
3 changed files with 88 additions and 54 deletions
+5 -3
View File
@@ -382,10 +382,12 @@ class Scheduler(
# avoiding any coupling with CUDA streams/devices.
if self.server_args.enable_dp_attention:
self.cpu_group = self.attn_tp_cpu_group
self.entry_rank = self.attn_tp_group.first_rank
self.is_entry_rank = self.attn_tp_rank == 0
else:
self.cpu_group = self.tp_cpu_group
self.is_entry_rank = self.tp_group.rank == 0
self.entry_rank = self.tp_group.first_rank
self.is_entry_rank = self.tp_group.rank_in_group == 0
self.pad_input_ids_func = self.tp_worker.get_pad_input_ids_func()
set_random_seed(self.random_seed)
@@ -1221,7 +1223,7 @@ class Scheduler(
if group_world_size > 1:
obj_list = [image_inputs]
torch.distributed.broadcast_object_list(
obj_list, src=0, group=self.cpu_group
obj_list, src=self.entry_rank, group=self.cpu_group
)
image_inputs = obj_list[0]
else:
@@ -1229,7 +1231,7 @@ class Scheduler(
if group_world_size > 1:
obj_list = [None]
torch.distributed.broadcast_object_list(
obj_list, src=0, group=self.cpu_group
obj_list, src=self.entry_rank, group=self.cpu_group
)
image_inputs = obj_list[0]
else: