@@ -322,30 +322,30 @@ def tearDown(self):
322
322
"default_quantization" : OVTrainerTestDescriptor (
323
323
model_id = "hf-internal-testing/tiny-random-bert" ,
324
324
nncf_compression_config = DEFAULT_QUANTIZATION_CONFIG ,
325
- expected_fake_quantize = 34 ,
325
+ expected_fake_quantize = 22 ,
326
326
expected_int8 = 32 ,
327
327
compression_metrics = ["compression_loss" ],
328
328
),
329
329
"distillation,default_quantization" : OVTrainerTestDescriptor (
330
330
model_id = "hf-internal-testing/tiny-random-bert" ,
331
331
teacher_model_id = "hf-internal-testing/tiny-random-bert" ,
332
332
nncf_compression_config = DEFAULT_QUANTIZATION_CONFIG ,
333
- expected_fake_quantize = 34 ,
333
+ expected_fake_quantize = 22 ,
334
334
expected_int8 = 32 ,
335
335
compression_metrics = ["compression_loss" , "distillation_loss" , "task_loss" ],
336
336
),
337
337
"customized_quantization" : OVTrainerTestDescriptor (
338
338
model_id = "hf-internal-testing/tiny-random-bert" ,
339
339
nncf_compression_config = CUSTOMIZED_QUANTIZATION_CONFIG ,
340
- expected_fake_quantize = 34 ,
340
+ expected_fake_quantize = 22 ,
341
341
expected_int8 = 32 ,
342
342
compression_metrics = ["compression_loss" ],
343
343
),
344
344
"distillation,customized_quantization" : OVTrainerTestDescriptor (
345
345
model_id = "hf-internal-testing/tiny-random-bert" ,
346
346
teacher_model_id = "hf-internal-testing/tiny-random-bert" ,
347
347
nncf_compression_config = CUSTOMIZED_QUANTIZATION_CONFIG ,
348
- expected_fake_quantize = 34 ,
348
+ expected_fake_quantize = 22 ,
349
349
expected_int8 = 32 ,
350
350
compression_metrics = ["compression_loss" , "distillation_loss" , "task_loss" ],
351
351
),
@@ -365,7 +365,7 @@ def tearDown(self):
365
365
"default_quantization,structured_movement_sparsity" : OVTrainerTestDescriptor (
366
366
model_id = "hf-internal-testing/tiny-random-bert" ,
367
367
nncf_compression_config = [DEFAULT_QUANTIZATION_CONFIG , STRUCTURED_MOVEMENT_SPARSITY_CONFIG_FOR_BERT ],
368
- expected_fake_quantize = 34 ,
368
+ expected_fake_quantize = 22 ,
369
369
expected_int8 = 32 ,
370
370
expected_binary_masks = 60 ,
371
371
compression_metrics = ["compression_loss" ],
@@ -376,7 +376,7 @@ def tearDown(self):
376
376
CUSTOMIZED_QUANTIZATION_CONFIG ,
377
377
STRUCTURED_MOVEMENT_SPARSITY_CONFIG_FOR_BERT ,
378
378
],
379
- expected_fake_quantize = 34 ,
379
+ expected_fake_quantize = 22 ,
380
380
expected_int8 = 32 ,
381
381
expected_binary_masks = 60 ,
382
382
compression_metrics = ["compression_loss" ],
@@ -385,7 +385,7 @@ def tearDown(self):
385
385
model_id = "hf-internal-testing/tiny-random-bert" ,
386
386
teacher_model_id = "hf-internal-testing/tiny-random-bert" ,
387
387
nncf_compression_config = [DEFAULT_QUANTIZATION_CONFIG , STRUCTURED_MOVEMENT_SPARSITY_CONFIG_FOR_BERT ],
388
- expected_fake_quantize = 34 ,
388
+ expected_fake_quantize = 22 ,
389
389
expected_int8 = 32 ,
390
390
expected_binary_masks = 60 ,
391
391
compression_metrics = ["compression_loss" , "distillation_loss" , "task_loss" ],
@@ -397,7 +397,7 @@ def tearDown(self):
397
397
CUSTOMIZED_QUANTIZATION_CONFIG ,
398
398
STRUCTURED_MOVEMENT_SPARSITY_CONFIG_FOR_BERT ,
399
399
],
400
- expected_fake_quantize = 34 ,
400
+ expected_fake_quantize = 22 ,
401
401
expected_int8 = 32 ,
402
402
expected_binary_masks = 60 ,
403
403
compression_metrics = ["compression_loss" , "distillation_loss" , "task_loss" ],
@@ -418,7 +418,7 @@ def tearDown(self):
418
418
"default_quantization,unstructured_movement_sparsity" : OVTrainerTestDescriptor (
419
419
model_id = "hf-internal-testing/tiny-random-bert" ,
420
420
nncf_compression_config = [DEFAULT_QUANTIZATION_CONFIG , UNSTRUCTURED_MOVEMENT_SPARSITY_CONFIG_FOR_BERT ],
421
- expected_fake_quantize = 34 ,
421
+ expected_fake_quantize = 22 ,
422
422
expected_int8 = 32 ,
423
423
expected_binary_masks = 60 ,
424
424
compression_metrics = ["compression_loss" ],
@@ -429,7 +429,7 @@ def tearDown(self):
429
429
CUSTOMIZED_QUANTIZATION_CONFIG ,
430
430
UNSTRUCTURED_MOVEMENT_SPARSITY_CONFIG_FOR_BERT ,
431
431
],
432
- expected_fake_quantize = 34 ,
432
+ expected_fake_quantize = 22 ,
433
433
expected_int8 = 32 ,
434
434
expected_binary_masks = 60 ,
435
435
compression_metrics = ["compression_loss" ],
@@ -438,7 +438,7 @@ def tearDown(self):
438
438
model_id = "hf-internal-testing/tiny-random-bert" ,
439
439
teacher_model_id = "hf-internal-testing/tiny-random-bert" ,
440
440
nncf_compression_config = [DEFAULT_QUANTIZATION_CONFIG , UNSTRUCTURED_MOVEMENT_SPARSITY_CONFIG_FOR_BERT ],
441
- expected_fake_quantize = 34 ,
441
+ expected_fake_quantize = 22 ,
442
442
expected_int8 = 32 ,
443
443
expected_binary_masks = 60 ,
444
444
compression_metrics = ["compression_loss" , "distillation_loss" , "task_loss" ],
@@ -450,7 +450,7 @@ def tearDown(self):
450
450
CUSTOMIZED_QUANTIZATION_CONFIG ,
451
451
UNSTRUCTURED_MOVEMENT_SPARSITY_CONFIG_FOR_BERT ,
452
452
],
453
- expected_fake_quantize = 34 ,
453
+ expected_fake_quantize = 22 ,
454
454
expected_int8 = 32 ,
455
455
expected_binary_masks = 60 ,
456
456
compression_metrics = ["compression_loss" , "distillation_loss" , "task_loss" ],
@@ -553,7 +553,7 @@ def check_ovmodel_reshaping(self, ovmodel: OVModel):
553
553
"default_quantization" : OVTrainerTestDescriptor (
554
554
model_id = "yujiepan/tiny-random-swin-patch4-window7-224" ,
555
555
nncf_compression_config = DEFAULT_QUANTIZATION_CONFIG ,
556
- expected_fake_quantize = 28 ,
556
+ expected_fake_quantize = 36 ,
557
557
expected_int8 = 28 ,
558
558
compression_metrics = ["compression_loss" ],
559
559
),
@@ -572,15 +572,15 @@ def check_ovmodel_reshaping(self, ovmodel: OVModel):
572
572
"default_quantization,structured_movement_sparsity" : OVTrainerTestDescriptor (
573
573
model_id = "yujiepan/tiny-random-swin-patch4-window7-224" ,
574
574
nncf_compression_config = [STRUCTURED_MOVEMENT_SPARSITY_CONFIG_FOR_SWIN , DEFAULT_QUANTIZATION_CONFIG ],
575
- expected_fake_quantize = 28 ,
575
+ expected_fake_quantize = 36 ,
576
576
expected_int8 = 28 ,
577
577
expected_binary_masks = 48 ,
578
578
compression_metrics = ["compression_loss" ],
579
579
),
580
580
"default_quantization,unstructured_movement_sparsity" : OVTrainerTestDescriptor (
581
581
model_id = "yujiepan/tiny-random-swin-patch4-window7-224" ,
582
582
nncf_compression_config = [UNSTRUCTURED_MOVEMENT_SPARSITY_CONFIG_FOR_SWIN , DEFAULT_QUANTIZATION_CONFIG ],
583
- expected_fake_quantize = 28 ,
583
+ expected_fake_quantize = 36 ,
584
584
expected_int8 = 28 ,
585
585
expected_binary_masks = 48 ,
586
586
compression_metrics = ["compression_loss" ],
@@ -589,7 +589,7 @@ def check_ovmodel_reshaping(self, ovmodel: OVModel):
589
589
model_id = "yujiepan/tiny-random-swin-patch4-window7-224" ,
590
590
teacher_model_id = "yujiepan/tiny-random-swin-patch4-window7-224" ,
591
591
nncf_compression_config = [STRUCTURED_MOVEMENT_SPARSITY_CONFIG_FOR_SWIN , DEFAULT_QUANTIZATION_CONFIG ],
592
- expected_fake_quantize = 28 ,
592
+ expected_fake_quantize = 36 ,
593
593
expected_int8 = 28 ,
594
594
expected_binary_masks = 48 ,
595
595
compression_metrics = ["compression_loss" , "distillation_loss" , "task_loss" ],
@@ -598,7 +598,7 @@ def check_ovmodel_reshaping(self, ovmodel: OVModel):
598
598
model_id = "yujiepan/tiny-random-swin-patch4-window7-224" ,
599
599
teacher_model_id = "yujiepan/tiny-random-swin-patch4-window7-224" ,
600
600
nncf_compression_config = [UNSTRUCTURED_MOVEMENT_SPARSITY_CONFIG_FOR_SWIN , DEFAULT_QUANTIZATION_CONFIG ],
601
- expected_fake_quantize = 28 ,
601
+ expected_fake_quantize = 36 ,
602
602
expected_int8 = 28 ,
603
603
expected_binary_masks = 48 ,
604
604
compression_metrics = ["compression_loss" , "distillation_loss" , "task_loss" ],
@@ -797,7 +797,9 @@ def prepare_model_and_dataset(self, desc: OVTrainerTestDescriptor):
797
797
798
798
self .feature_extractor = AutoFeatureExtractor .from_pretrained (desc .model_id )
799
799
self .tokenizer = self .feature_extractor
800
- self .model = AutoModelForAudioClassification .from_pretrained (desc .model_id , num_labels = self .num_labels )
800
+ self .model = AutoModelForAudioClassification .from_pretrained (
801
+ desc .model_id , num_labels = self .num_labels , attn_implementation = "eager"
802
+ )
801
803
self .teacher_model = None
802
804
if desc .teacher_model_id :
803
805
self .teacher_model = AutoModelForAudioClassification .from_pretrained (
0 commit comments