[Bugfix] Add phi3v resize for dynamic shape and fix torchvision requirement (#5772)

This commit is contained in:
Isotr0py
2024-06-24 12:11:53 +08:00
committed by GitHub
parent 5d4d90536f
commit edd5fe5fa2
5 changed files with 72 additions and 5 deletions

View File

@@ -22,6 +22,7 @@ assert len(HF_IMAGE_PROMPTS) == len(IMAGE_FILES)
def iter_phi3v_configs(model_name: str):
image_hw_to_feature_size = {
(1008, 1344): 1921,
(2016, 2688): 1933,
}
for (h, w), f in image_hw_to_feature_size.items():
@@ -75,6 +76,9 @@ if is_cpu():
# TODO: Add test for `tensor_parallel_size` [ref: PR #3883]
# Since we use _attn_implementation="eager" for hf_runner, here is
# numeric difference for longer context and test can't pass
@pytest.mark.xfail(
reason="Inconsistent image processor being used due to lack "
"of support for dynamic image token replacement")
@pytest.mark.parametrize("model_and_config", model_and_vl_config)
@pytest.mark.parametrize("dtype", [target_dtype])
@pytest.mark.parametrize("max_tokens", [128])