Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion vllm/model_executor/models/qwen2_5_vl.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
from vllm.platforms import _Backend
from vllm.sequence import IntermediateTensors
from vllm.transformers_utils.config import uses_mrope
from vllm.utils import is_pin_memory_available
from vllm.utils.tensor_schema import TensorSchema, TensorShape

from .interfaces import (MultiModalEmbeddings, SupportsLoRA,
Expand Down Expand Up @@ -737,7 +738,7 @@ def compute_attn_mask_seqlen(
@staticmethod
def invert_permutation(perm: torch.Tensor) -> torch.Tensor:
# building the inverse permutation in O(n) time
inv = torch.empty_like(perm)
inv = torch.empty_like(perm, pin_memory=is_pin_memory_available())
inv[perm] = torch.arange(perm.numel(),
device=perm.device,
dtype=perm.dtype)
Expand Down Expand Up @@ -808,6 +809,8 @@ def forward(
non_blocking=True)
window_index = window_index.to(device=hidden_states.device,
non_blocking=True)
reverse_indices = reverse_indices.to(device=hidden_states.device,
non_blocking=True)

hidden_states = hidden_states.reshape(
seq_len // self.spatial_merge_unit, self.spatial_merge_unit, -1)
Expand Down