File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -1026,8 +1026,8 @@ def to_nncf_dict(self) -> Dict[str, Any]:
10261026                    overflow_fix = self .advanced_parameters ["overflow_fix" ],
10271027                )
10281028                if  "smooth_quant_alphas"  in  self .advanced_parameters :
1029-                     advanced_parameters .smooth_quant_alphas  =  (
1030-                         nncf . AdvancedSmoothQuantParameters ( ** self .advanced_parameters ["smooth_quant_alphas" ]), 
1029+                     advanced_parameters .smooth_quant_alphas  =  nncf . AdvancedSmoothQuantParameters (
1030+                         ** self .advanced_parameters ["smooth_quant_alphas" ]
10311031                    )
10321032
10331033            self ._nncf_dict  =  {
Original file line number Diff line number Diff line change @@ -131,6 +131,14 @@ class OVCLIExportTestCase(unittest.TestCase):
131131            (13 ,),
132132            (16 ,),
133133        ),
134+         (
135+             "text-generation" ,
136+             "llama" ,
137+             "nf4_f8e4m3" ,
138+             "--dataset wikitext2 --num-samples 1 --smooth-quant-alpha 0.9 --group-size 16 --trust-remote-code" ,
139+             (4 ,),
140+             (14 ,),
141+         ),
134142    ]
135143
136144    TEST_4BIT_CONFIGURATIONS  =  [
@@ -446,7 +454,11 @@ def test_exporters_cli_full_quantization(
446454            for  i , model  in  enumerate (models ):
447455                num_fake_nodes , num_weight_nodes  =  get_num_quantized_nodes (model )
448456                self .assertEqual (expected_fake_nodes [i ], num_fake_nodes )
449-                 self .assertEqual (expected_low_precision_nodes [i ], num_weight_nodes [quant_mode ])
457+                 weight_types  =  quant_mode .split ("_" )
458+                 num_weights  =  0 
459+                 for  weight_type  in  weight_types :
460+                     num_weights  +=  num_weight_nodes [weight_type ]
461+                 self .assertEqual (expected_low_precision_nodes [i ], num_weights )
450462
451463    def  test_exporters_cli_int4_with_local_model_and_default_config (self ):
452464        with  TemporaryDirectory () as  tmpdir :
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments