A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 13:30 UTC
[Bugfix] Fix distributed bug again in Qwen2.5-VL & Qwen2.5-Omni (#16974)
Signed-off-by: fyabc <suyang.fy@alibaba-inc.com>
Yang Fan committed
Apr 22, 2025 at 20:23 UTC
571e8dd65e2a286c621f7552d1d336ac3fe08b4a
1 file changed
+4
-1
vllm/model_executor/models/qwen2_5_vl.py
+4
-1
@@ -198,8 +198,11 @@ class Qwen2_5_VisionMLP(nn.Module):
198
199
def all_gather_interleave(local_tensor, hidden_size: int, tp_size: int):
200
"""All-gather the input tensor interleavely across model parallel group."""
201
+ import torch.distributed as dist
202
gathered_tensors = [torch.zeros_like(local_tensor) for _ in range(tp_size)]
202
- parallel_state.get_tp_group().all_gather(gathered_tensors, local_tensor)
203
+ dist.all_gather(gathered_tensors,
204
+ local_tensor,
205
+ group=parallel_state.get_tp_group().device_group)
206
207
gathered_tensors_split = [
208
torch.split(tensor, hidden_size // tp_size, -1)