[Model] Add min_pixels / max_pixels to Qwen2VL as mm_processor_kwargs (#9612)

Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
This commit is contained in:
Alex Brooks
2024-10-23 08:05:18 -06:00
committed by GitHub
parent c18e1a3418
commit 31a08f5bd2
3 changed files with 236 additions and 18 deletions

View File

@ -267,6 +267,11 @@ def run_qwen2_vl(question: str, modality: str):
model=model_name,
max_model_len=8192,
max_num_seqs=5,
# Note - mm_processor_kwargs can also be passed to generate/chat calls
mm_processor_kwargs={
"min_pixels": 28 * 28,
"max_pixels": 1280 * 28 * 28,
},
)
prompt = ("<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n"