Skip to content

Commit

Permalink
Fix phi3v for test
Browse files Browse the repository at this point in the history
Signed-off-by: Muralidhar Andoorveedu <muralidhar.andoorveedu@centml.ai>
  • Loading branch information
andoorve committed Jul 2, 2024
1 parent ef62774 commit d9257a2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions vllm/model_executor/models/phi3v.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from vllm.model_executor.models.llama import LlamaModel
from vllm.model_executor.sampling_metadata import SamplingMetadata
from vllm.multimodal import MULTIMODAL_REGISTRY
from vllm.sequence import SamplerOutput
from vllm.sequence import IntermediateTensors, SamplerOutput

from .clip import dummy_image_for_clip, dummy_seq_data_for_clip
from .interfaces import SupportsVision
Expand Down Expand Up @@ -381,9 +381,13 @@ def _parse_and_validate_image_input(

return None

def forward(self, input_ids: torch.Tensor, positions: torch.Tensor,
def forward(self,
input_ids: torch.Tensor,
positions: torch.Tensor,
kv_caches: List[torch.Tensor],
attn_metadata: AttentionMetadata, **kwargs: object):
attn_metadata: AttentionMetadata,
intermediate_tensors: Optional[IntermediateTensors] = None,
**kwargs: object):
image_input = self._parse_and_validate_image_input(**kwargs)

if image_input is not None:
Expand All @@ -398,6 +402,7 @@ def forward(self, input_ids: torch.Tensor, positions: torch.Tensor,
positions,
kv_caches,
attn_metadata,
intermediate_tensors,
inputs_embeds=inputs_embeds)

return hidden_states
Expand Down

0 comments on commit d9257a2

Please sign in to comment.