Skip to content

Commit b6cca4c

Browse files
committed
fix test
1 parent 41876fb commit b6cca4c

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

tests/openvino/test_modeling.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -547,12 +547,12 @@ class OVModelForCausalLMIntegrationTest(unittest.TestCase):
547547
@parameterized.expand(SUPPORTED_ARCHITECTURES)
548548
def test_compare_to_transformers(self, model_arch):
549549
model_id = MODEL_NAMES[model_arch]
550-
not_stateful = ["gpt_bigcode"]
550+
not_stateful = []
551551
if is_openvino_version("<", "2024.0"):
552552
not_stateful.append("mixtral")
553553

554554
if is_openvino_version("<", "2024.1"):
555-
not_stateful.extend(["llama", "gemma"])
555+
not_stateful.extend(["llama", "gemma", "gpt_bigcode"])
556556

557557
if "gptq" in model_arch:
558558
self.skipTest("GPTQ model loading unsupported with AutoModelForCausalLM")

tests/openvino/test_quantization.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ def preprocess_function(examples, tokenizer):
657657

658658

659659
class OVTrainerTest(unittest.TestCase):
660-
SUPPORTED_ARCHITECTURES_WITH_EXPECTED_QUANTIZED_MATMULS = (("distilbert-base-uncased", 50, 38),)
660+
SUPPORTED_ARCHITECTURES_WITH_EXPECTED_QUANTIZED_MATMULS = (("distilbert-base-uncased", 49, 38),)
661661

662662
@parameterized.expand(SUPPORTED_ARCHITECTURES_WITH_EXPECTED_QUANTIZED_MATMULS)
663663
def test_aware_training_quantization(self, model_name, expected_fake_quantize, expected_int8):

tests/openvino/test_training.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -322,30 +322,30 @@ def tearDown(self):
322322
"default_quantization": OVTrainerTestDescriptor(
323323
model_id="hf-internal-testing/tiny-random-bert",
324324
nncf_compression_config=DEFAULT_QUANTIZATION_CONFIG,
325-
expected_fake_quantize=44,
325+
expected_fake_quantize=34,
326326
expected_int8=32,
327327
compression_metrics=["compression_loss"],
328328
),
329329
"distillation,default_quantization": OVTrainerTestDescriptor(
330330
model_id="hf-internal-testing/tiny-random-bert",
331331
teacher_model_id="hf-internal-testing/tiny-random-bert",
332332
nncf_compression_config=DEFAULT_QUANTIZATION_CONFIG,
333-
expected_fake_quantize=44,
333+
expected_fake_quantize=34,
334334
expected_int8=32,
335335
compression_metrics=["compression_loss", "distillation_loss", "task_loss"],
336336
),
337337
"customized_quantization": OVTrainerTestDescriptor(
338338
model_id="hf-internal-testing/tiny-random-bert",
339339
nncf_compression_config=CUSTOMIZED_QUANTIZATION_CONFIG,
340-
expected_fake_quantize=44,
340+
expected_fake_quantize=34,
341341
expected_int8=32,
342342
compression_metrics=["compression_loss"],
343343
),
344344
"distillation,customized_quantization": OVTrainerTestDescriptor(
345345
model_id="hf-internal-testing/tiny-random-bert",
346346
teacher_model_id="hf-internal-testing/tiny-random-bert",
347347
nncf_compression_config=CUSTOMIZED_QUANTIZATION_CONFIG,
348-
expected_fake_quantize=44,
348+
expected_fake_quantize=34,
349349
expected_int8=32,
350350
compression_metrics=["compression_loss", "distillation_loss", "task_loss"],
351351
),
@@ -418,7 +418,7 @@ def tearDown(self):
418418
"default_quantization,unstructured_movement_sparsity": OVTrainerTestDescriptor(
419419
model_id="hf-internal-testing/tiny-random-bert",
420420
nncf_compression_config=[DEFAULT_QUANTIZATION_CONFIG, UNSTRUCTURED_MOVEMENT_SPARSITY_CONFIG_FOR_BERT],
421-
expected_fake_quantize=44,
421+
expected_fake_quantize=34,
422422
expected_int8=32,
423423
expected_binary_masks=60,
424424
compression_metrics=["compression_loss"],
@@ -429,7 +429,7 @@ def tearDown(self):
429429
CUSTOMIZED_QUANTIZATION_CONFIG,
430430
UNSTRUCTURED_MOVEMENT_SPARSITY_CONFIG_FOR_BERT,
431431
],
432-
expected_fake_quantize=44,
432+
expected_fake_quantize=34,
433433
expected_int8=32,
434434
expected_binary_masks=60,
435435
compression_metrics=["compression_loss"],
@@ -438,7 +438,7 @@ def tearDown(self):
438438
model_id="hf-internal-testing/tiny-random-bert",
439439
teacher_model_id="hf-internal-testing/tiny-random-bert",
440440
nncf_compression_config=[DEFAULT_QUANTIZATION_CONFIG, UNSTRUCTURED_MOVEMENT_SPARSITY_CONFIG_FOR_BERT],
441-
expected_fake_quantize=44,
441+
expected_fake_quantize=34,
442442
expected_int8=32,
443443
expected_binary_masks=60,
444444
compression_metrics=["compression_loss", "distillation_loss", "task_loss"],
@@ -450,7 +450,7 @@ def tearDown(self):
450450
CUSTOMIZED_QUANTIZATION_CONFIG,
451451
UNSTRUCTURED_MOVEMENT_SPARSITY_CONFIG_FOR_BERT,
452452
],
453-
expected_fake_quantize=44,
453+
expected_fake_quantize=34,
454454
expected_int8=32,
455455
expected_binary_masks=60,
456456
compression_metrics=["compression_loss", "distillation_loss", "task_loss"],
@@ -730,7 +730,7 @@ def check_ovmodel_reshaping(self, ovmodel: OVModel):
730730
"quantization": OVTrainerTestDescriptor(
731731
model_id="hf-internal-testing/tiny-random-Wav2Vec2Model",
732732
nncf_compression_config=[QUANTIZATION_CONFIG_FOR_WAV2VEC2],
733-
expected_fake_quantize=48,
733+
expected_fake_quantize=40,
734734
expected_int8=30,
735735
compression_metrics=["compression_loss"],
736736
),
@@ -757,7 +757,7 @@ def check_ovmodel_reshaping(self, ovmodel: OVModel):
757757
"quantization,unstructured_movement_sparsity": OVTrainerTestDescriptor(
758758
model_id="hf-internal-testing/tiny-random-Wav2Vec2Model",
759759
nncf_compression_config=[QUANTIZATION_CONFIG_FOR_WAV2VEC2, UNSTRUCTURED_MOVEMENT_SPARSITY_CONFIG_FOR_WAV2VEC2],
760-
expected_fake_quantize=48,
760+
expected_fake_quantize=40,
761761
expected_int8=30,
762762
expected_binary_masks=48,
763763
compression_metrics=["compression_loss"],
@@ -775,7 +775,7 @@ def check_ovmodel_reshaping(self, ovmodel: OVModel):
775775
model_id="hf-internal-testing/tiny-random-Wav2Vec2Model",
776776
teacher_model_id="hf-internal-testing/tiny-random-Wav2Vec2Model",
777777
nncf_compression_config=[QUANTIZATION_CONFIG_FOR_WAV2VEC2, UNSTRUCTURED_MOVEMENT_SPARSITY_CONFIG_FOR_WAV2VEC2],
778-
expected_fake_quantize=48,
778+
expected_fake_quantize=40,
779779
expected_int8=30,
780780
expected_binary_masks=48,
781781
compression_metrics=["compression_loss", "distillation_loss", "task_loss"],

0 commit comments

Comments
 (0)