Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Commit 33fecd4

Browse files
ywang96DarkLight1337
authored andcommitted
[Misc] Update Phi-3-Vision Example (vllm-project#5981)
Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com>
1 parent aa72bdc commit 33fecd4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

examples/phi3v_example.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,18 @@
1010
def run_phi3v():
1111
model_path = "microsoft/Phi-3-vision-128k-instruct"
1212

13-
# Note: The model has 128k context length by default which may cause OOM
14-
# In this example, we override max_model_len to 2048.
13+
# Note: The default setting of max_num_seqs (256) and
14+
# max_model_len (128k) for this model may cause OOM.
15+
# In this example, we override max_num_seqs to 5 while
16+
# keeping the original context length of 128k.
1517
llm = LLM(
1618
model=model_path,
1719
trust_remote_code=True,
1820
image_input_type="pixel_values",
1921
image_token_id=32044,
2022
image_input_shape="1,3,1008,1344",
2123
image_feature_size=1921,
22-
max_model_len=2048,
24+
max_num_seqs=5,
2325
)
2426

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

0 commit comments

Comments
 (0)