@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 6eabc6cb0e
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 16, 23:15 UTC

[Doc] Add note about context length in Phi-3-Vision example (#5887)

Cyrus Leung committed Jun 27, 2024 at 14:20 UTC 6eabc6cb0e022a3f57fbf115ce53dc8bcba66840
1 file changed +3 -1
examples/phi3v_example.py
+3 -1
@@ -9,6 +9,9 @@ from vllm.multimodal.image import ImagePixelData
9
10 def run_phi3v():
11 model_path = "microsoft/Phi-3-vision-128k-instruct"
12 +
13 + # Note: The model has 128k context length by default which may cause OOM
14 + # If that's the case, override `max_model_len` with a smaller value via args
15 llm = LLM(
16 model=model_path,
17 trust_remote_code=True,
@@ -16,7 +19,6 @@ def run_phi3v():
19 image_token_id=32044,
20 image_input_shape="1,3,1008,1344",
21 image_feature_size=1921,
19 - disable_image_processor=False,
22 )
23
24 image = Image.open("images/cherry_blossom.jpg")