@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / ecfcdd2ce4
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 6, 14:30 UTC

Fix Phi3 test that fails with Transformers v5 (#37298)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>

Harry Mellor committed Mar 17, 2026 at 14:29 UTC ecfcdd2ce47e2216eee11550645b1bb3cfa44d7b
1 file changed +7
tests/models/multimodal/pooling/test_phi3v.py
+7
@@ -3,6 +3,7 @@
3
4 import pytest
5 import torch.nn.functional as F
6 +import transformers.utils
7 from PIL import Image
8
9 from vllm.assets.base import get_vllm_public_assets
@@ -12,6 +13,12 @@ from ....conftest import IMAGE_ASSETS, HfRunner, PromptImageInput, VllmRunner
13 from ....utils import large_gpu_test
14 from ...utils import check_embeddings_close
15
16 +# BC for method that was deleted in Transformers v5.
17 +# Only needed for generating the HF reference.
18 +transformers.utils.is_flash_attn_greater_or_equal_2_10 = (
19 + lambda: transformers.utils.is_flash_attn_greater_or_equal("2.1.0")
20 +)
21 +
22 HF_TEXT_PROMPTS = [
23 # T -> X
24 "Find me an everyday image that matches the given caption: The label of the object is stop sign", # noqa: E501