Skip to content

Commit

Permalink
Update max image tokens
Browse files Browse the repository at this point in the history
Signed-off-by: DarkLight1337 <[email protected]>
  • Loading branch information
DarkLight1337 committed Dec 23, 2024
1 parent 85c5e2c commit 4873ff8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vllm/model_executor/models/phi3v.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,14 @@ def get_max_phi3v_image_tokens(

processor = ctx.get_hf_processor(**hf_processor_mm_kwargs)

return processor.calc_num_image_tokens_from_image_size(
num_image_tokens = processor.calc_num_image_tokens_from_image_size(
width=MAX_IMAGE_FEATURE_SIZE_WIDTH,
height=MAX_IMAGE_FEATURE_SIZE_HEIGHT,
)

# Include the separator (bos_token_id)
return num_image_tokens + 1


class Phi3VMultiModalProcessor(BaseMultiModalProcessor):

Expand Down

0 comments on commit 4873ff8

Please sign in to comment.