From e6e054d86e9d9babbd033af80d6d638483243780 Mon Sep 17 00:00:00 2001 From: Cyrus Leung Date: Wed, 11 Dec 2024 13:02:02 +0800 Subject: [PATCH] [CI/Build] Check transformers v4.47 (#10991) Signed-off-by: DarkLight1337 --- requirements-test.txt | 4 ++-- .../vision_language/mm_processor_kwargs/test_idefics3.py | 9 --------- .../models/embedding/vision_language/test_llava_next.py | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/requirements-test.txt b/requirements-test.txt index 38a064bca449a..8ceb705cdffd7 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -506,7 +506,7 @@ tiktoken==0.7.0 # mistral-common timm==1.0.11 # via -r requirements-test.in -tokenizers==0.20.3 +tokenizers==0.21.0 # via transformers torch==2.5.1 # via @@ -534,7 +534,7 @@ tqdm==4.66.6 # transformers tqdm-multiprocess==0.0.11 # via lm-eval -transformers==4.46.3 +transformers==4.47.0 # via # lm-eval # peft diff --git a/tests/models/decoder_only/vision_language/mm_processor_kwargs/test_idefics3.py b/tests/models/decoder_only/vision_language/mm_processor_kwargs/test_idefics3.py index 31896bfd13e8c..c71a2d359043d 100644 --- a/tests/models/decoder_only/vision_language/mm_processor_kwargs/test_idefics3.py +++ b/tests/models/decoder_only/vision_language/mm_processor_kwargs/test_idefics3.py @@ -3,7 +3,6 @@ import pytest import torch -import transformers from transformers import AutoImageProcessor, AutoTokenizer from vllm.inputs import InputContext, token_inputs @@ -36,8 +35,6 @@ def get_max_idefics3_image_tokens(): return get_max_idefics3_image_tokens -@pytest.mark.skipif(transformers.__version__ < "4.46.0", - reason="Model introduced in HF >= 4.46.0") @pytest.mark.parametrize("model", models) @pytest.mark.parametrize("longest_edge", [None, 168, 336, 400, 2 * 336]) def test_input_mapper_override(model: str, image_assets: _ImageAssets, @@ -77,8 +74,6 @@ def test_input_mapper_override(model: str, image_assets: _ImageAssets, assert torch.all(hf_result["pixel_values"] == vllm_result["pixel_values"]) -@pytest.mark.skipif(transformers.__version__ < "4.46.0", - reason="Model introduced in HF >= 4.46.0") @pytest.mark.parametrize("model", models) @pytest.mark.parametrize("longest_edge, expected_max_tokens", [ (None, 2873), @@ -107,8 +102,6 @@ def test_max_tokens_override(get_max_idefics3_image_tokens, model: str, assert expected_max_tokens == actual_max_tokens -@pytest.mark.skipif(transformers.__version__ < "4.46.0", - reason="Model introduced in HF >= 4.46.0") @pytest.mark.parametrize("model", models) @pytest.mark.parametrize("longest_edge, toks_per_img, num_imgs", [ (168, 169, 1), @@ -143,8 +136,6 @@ def test_dummy_data_override(dummy_data_for_idefics3, model: str, assert img_tok_count == toks_per_img * num_imgs -@pytest.mark.skipif(transformers.__version__ < "4.46.0", - reason="Model introduced in HF >= 4.46.0") @pytest.mark.parametrize("model", models) @pytest.mark.parametrize("longest_edge,expected_toks_per_img,num_imgs", [ (336, 169 * (1**2 + 1), 1), diff --git a/tests/models/embedding/vision_language/test_llava_next.py b/tests/models/embedding/vision_language/test_llava_next.py index 329c6ba279f89..693abd7252d5e 100644 --- a/tests/models/embedding/vision_language/test_llava_next.py +++ b/tests/models/embedding/vision_language/test_llava_next.py @@ -86,7 +86,7 @@ def _run_test( ) -@pytest.mark.skipif(transformers.__version__.startswith("4.46"), +@pytest.mark.skipif(transformers.__version__ >= "4.46", reason="Model broken with changes in transformers 4.46") @pytest.mark.core_model @pytest.mark.parametrize("model", MODELS)