From 7e945b107b16257cf219af35fe8f9a7ca16d5ea7 Mon Sep 17 00:00:00 2001 From: dlyakhov Date: Fri, 26 Jan 2024 12:04:06 +0100 Subject: [PATCH] Switch off SQ for swin model in Torch backend --- tests/post_training/model_scope.py | 15 ++++++++++++++- tests/post_training/reference_data.yaml | 12 +++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/tests/post_training/model_scope.py b/tests/post_training/model_scope.py index ae9fc092736..60fcfe5bad9 100644 --- a/tests/post_training/model_scope.py +++ b/tests/post_training/model_scope.py @@ -218,7 +218,20 @@ "preset": QuantizationPreset.MIXED, "model_type": ModelType.TRANSFORMER, }, - "backends": ALL_PTQ_BACKENDS, + "backends": [BackendType.OV], + }, + { + "reported_name": "timm/swin_base_patch4_window7_224_no_sq", + "model_id": "swin_base_patch4_window7_224", + "pipeline_cls": ImageClassificationTimm, + "ptq_params": { + "preset": QuantizationPreset.MIXED, + "model_type": ModelType.TRANSFORMER, + "advanced_parameters": AdvancedQuantizationParameters( + smooth_quant_alpha=AdvancedSmoothQuantParameters(matmul=-1) + ), + }, + "backends": [BackendType.TORCH, BackendType.CUDA_TORCH, BackendType.ONNX], }, { "reported_name": "timm/tf_inception_v3", diff --git a/tests/post_training/reference_data.yaml b/tests/post_training/reference_data.yaml index 542cf15c411..3605403a440 100644 --- a/tests/post_training/reference_data.yaml +++ b/tests/post_training/reference_data.yaml @@ -176,15 +176,17 @@ timm/resnet18_backend_OV: metric_value: 0.71042 timm/resnet18_backend_TORCH: metric_value: 0.71024 -timm/swin_base_patch4_window7_224_backend_CUDA_TORCH: - metric_value: 0.8131 timm/swin_base_patch4_window7_224_backend_FP32: metric_value: 0.85274 -timm/swin_base_patch4_window7_224_backend_ONNX: - metric_value: 0.85158 timm/swin_base_patch4_window7_224_backend_OV: metric_value: 0.83636 -timm/swin_base_patch4_window7_224_backend_TORCH: +timm/swin_base_patch4_window7_224_no_sq_backend_FP32: + metric_value: 0.85274 +timm/swin_base_patch4_window7_224_no_sq_backend_CUDA_TORCH: + metric_value: 0.85142 +timm/swin_base_patch4_window7_224_no_sq_backend_ONNX: + metric_value: 0.85158 +timm/swin_base_patch4_window7_224_no_sq_backend_TORCH: metric_value: 0.85142 timm/tf_inception_v3_backend_CUDA_TORCH: metric_value: 0.77542