Skip to content
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

[BugFix] Propagate 'trust_remote_code' setting in internvl and minicpmv #8250

Merged
merged 21 commits into from
Sep 25, 2024
Merged
Prev Previous commit
Next Next commit
Fix batch inference
  • Loading branch information
zifeitong committed Sep 24, 2024
commit 7307fed6d9a06b61258fec37b37cf045adc4180d
8 changes: 4 additions & 4 deletions vllm/model_executor/models/minicpmv.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,11 +463,11 @@ def _get_image_bounds(self,
im_end_id: torch.Tensor,
slice_start_id: Optional[torch.Tensor] = None,
slice_end_id: Optional[torch.Tensor] = None) -> torch.Tensor:
start_cond = input_ids == im_start_id.item()
end_cond = input_ids == im_end_id.item()
start_cond = input_ids == im_start_id[0]
end_cond = input_ids == im_end_id[0]
if slice_start_id is not None:
start_cond |= (input_ids == slice_start_id.item())
end_cond |= (input_ids == slice_end_id.item())
start_cond |= (input_ids == slice_start_id[0])
end_cond |= (input_ids == slice_end_id[0])

image_start_tokens, = torch.where(start_cond)
image_start_tokens += 1
Expand Down
Loading