Skip to content

Commit

Permalink
[Misc] Update Phi-3-Vision Example (vllm-project#5981)
Browse files Browse the repository at this point in the history
Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com>
  • Loading branch information
2 people authored and prashantgupta24 committed Jul 1, 2024
1 parent bf2cd68 commit 6837825
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions examples/phi3v_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@
def run_phi3v():
model_path = "microsoft/Phi-3-vision-128k-instruct"

# Note: The model has 128k context length by default which may cause OOM
# In this example, we override max_model_len to 2048.
# Note: The default setting of max_num_seqs (256) and
# max_model_len (128k) for this model may cause OOM.
# In this example, we override max_num_seqs to 5 while
# keeping the original context length of 128k.
llm = LLM(
model=model_path,
trust_remote_code=True,
image_input_type="pixel_values",
image_token_id=32044,
image_input_shape="1,3,1008,1344",
image_feature_size=1921,
max_model_len=2048,
max_num_seqs=5,
)

image = Image.open("images/cherry_blossom.jpg")
Expand Down

0 comments on commit 6837825

Please sign in to comment.