[vlm] Remove vision language config. (#6089)
Signed-off-by: Xiaowei Jiang <xwjiang2010@gmail.com> Co-authored-by: Roger Wang <ywang@roblox.com>
This commit is contained in:
@@ -10,12 +10,7 @@ from vllm import LLM
|
||||
|
||||
|
||||
def run_llava():
|
||||
llm = LLM(
|
||||
model="llava-hf/llava-1.5-7b-hf",
|
||||
image_token_id=32000,
|
||||
image_input_shape="1,3,336,336",
|
||||
image_feature_size=576,
|
||||
)
|
||||
llm = LLM(model="llava-hf/llava-1.5-7b-hf")
|
||||
|
||||
prompt = "USER: <image>\nWhat is the content of this image?\nASSISTANT:"
|
||||
|
||||
|
||||
@@ -7,13 +7,7 @@ from vllm import LLM, SamplingParams
|
||||
|
||||
|
||||
def run_llava_next():
|
||||
llm = LLM(
|
||||
model="llava-hf/llava-v1.6-mistral-7b-hf",
|
||||
image_token_id=32000,
|
||||
image_input_shape="1,3,336,336",
|
||||
# Use the maximum possible value for memory profiling
|
||||
image_feature_size=2928,
|
||||
)
|
||||
llm = LLM(model="llava-hf/llava-v1.6-mistral-7b-hf", max_model_len=4096)
|
||||
|
||||
prompt = "[INST] <image>\nWhat is shown in this image? [/INST]"
|
||||
url = "https://h2o-release.s3.amazonaws.com/h2ogpt/bigben.jpg"
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
Launch the vLLM server with the following command:
|
||||
python -m vllm.entrypoints.openai.api_server \
|
||||
--model llava-hf/llava-1.5-7b-hf \
|
||||
--image-token-id 32000 \
|
||||
--image-input-shape 1,3,336,336 \
|
||||
--image-feature-size 576 \
|
||||
--chat-template template_llava.jinja
|
||||
"""
|
||||
import base64
|
||||
|
||||
@@ -14,15 +14,13 @@ def run_phi3v():
|
||||
|
||||
# Note: The default setting of max_num_seqs (256) and
|
||||
# max_model_len (128k) for this model may cause OOM.
|
||||
# You may lower either to run this example on lower-end GPUs.
|
||||
|
||||
# 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_token_id=32044,
|
||||
image_input_shape="1,3,1008,1344",
|
||||
# Use the maximum possible value for memory profiling
|
||||
image_feature_size=2653,
|
||||
max_num_seqs=5,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user