[Model] Expose InternVL2 max_dynamic_patch as a mm_processor_kwarg (#8946)

This commit is contained in:
Isotr0py
2024-09-30 13:01:20 +08:00
committed by GitHub
parent 8e60afa15e
commit 2ae25f79cf
2 changed files with 90 additions and 61 deletions

View File

@@ -115,6 +115,7 @@ def load_internvl(question: str, image_urls: List[str]) -> ModelRequestData:
trust_remote_code=True,
max_model_len=4096,
limit_mm_per_prompt={"image": len(image_urls)},
mm_processor_kwargs={"max_dynamic_patch": 4},
)
placeholders = "\n".join(f"Image-{i}: <image>\n"