diff --git a/tests/model_hub_tests/pytorch/test_hf_transformers.py b/tests/model_hub_tests/pytorch/test_hf_transformers.py index 89fde03a35df5b..a930da0e20585b 100644 --- a/tests/model_hub_tests/pytorch/test_hf_transformers.py +++ b/tests/model_hub_tests/pytorch/test_hf_transformers.py @@ -449,6 +449,10 @@ def load_model(self, name, type): model.set_default_language("en_XX") if hasattr(model, "config") and hasattr(model.config, "return_loss"): model.config.return_loss = False + if hasattr(model, "config") and hasattr(model.config, "use_cache"): + model.config.use_cache = False + if hasattr(model, "config") and hasattr(model.config, "return_dict"): + model.config.return_dict = False if name_suffix != '': model = model._modules[name_suffix] if example is None: diff --git a/tests/model_hub_tests/transformation_tests/sdpa2pa_ref_diff.py b/tests/model_hub_tests/transformation_tests/sdpa2pa_ref_diff.py index b6ed0fc5f1207e..d0cef158c9fe0d 100644 --- a/tests/model_hub_tests/transformation_tests/sdpa2pa_ref_diff.py +++ b/tests/model_hub_tests/transformation_tests/sdpa2pa_ref_diff.py @@ -380,8 +380,8 @@ "ScaledDotProductAttention" : -5, "PagedAttentionExtension" : 5, "Parameter" : 13, - "ReadValue" : -5, - "Assign" : -5, + "ReadValue" : -10, + "Assign" : -10, }, "optimum-intel-internal-testing/tiny-random-baichuan2-13b" : { "ScaledDotProductAttention" : -2, @@ -840,8 +840,8 @@ "ScaledDotProductAttention" : -5, "PagedAttentionExtension" : 5, "Parameter" : 36, - "ReadValue" : -5, - "Assign" : -5, + "ReadValue" : -10, + "Assign" : -10, }, "optimum-intel-internal-testing/tiny-random-baichuan2-13b" : { "ScaledDotProductAttention" : -2, diff --git a/tests/requirements_pytorch b/tests/requirements_pytorch index 58e80cf3258027..04d322183bf2aa 100644 --- a/tests/requirements_pytorch +++ b/tests/requirements_pytorch @@ -9,7 +9,7 @@ torch==2.9.0 torchvision==0.24.0 torchaudio==2.9.0 # before updating transformers version, make sure no tests (esp. sdpa2pa) are failing -transformers==4.47.1 +transformers==4.55.0 pytest==7.0.1; python_version < '3.10' pytest==7.2.0; python_version >= '3.10' pytest-html==4.1.1 @@ -35,18 +35,18 @@ pyctcdecode==0.5.0; python_version < "3.12" sacremoses==0.1.1 sentencepiece==0.2.0 soundfile==0.12.1 -super-image==0.1.7; python_version < "3.12" +super-image==0.2.0; python_version < "3.12" timm==1.0.11 wheel==0.44.0 PyYAML==6.0.2 kornia==0.7.3 -super-image==0.1.7 +super-image==0.2.0 # huggingface-hub required for super-image -huggingface-hub==0.25.2 +huggingface-hub==0.34.0 # For now, we decided to pin a specific working version of optimum-intel. # It will be discussed in the future how to manage versioning of the components properly. -git+https://github.com/huggingface/optimum-intel.git@8ba536cd0a2bf93e9e88408b0048a7695db5be0b; python_version < "3.12" +git+https://github.com/huggingface/optimum-intel.git@aed07975d817c124fd5d45375ac131d4a068b557; python_version < "3.12" # set 'export HF_HUB_ENABLE_HF_TRANSFER=1' to benefits from hf_transfer hf_transfer==0.1.8