File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed
examples/onnxrt/nlp/huggingface_model/token_classification/layoutlm/quantization
neural_compressor/adaptor/ox_utils/operators Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,7 @@ def get_label_list(labels):
244
244
cache_dir = model_args .cache_dir ,
245
245
revision = model_args .model_revision ,
246
246
use_auth_token = True if model_args .use_auth_token else None ,
247
+ use_safetensors = False ,
247
248
)
248
249
249
250
# Tokenizer check: this script requires a fast tokenizer.
Original file line number Diff line number Diff line change @@ -248,6 +248,7 @@ def get_label_list(labels):
248
248
cache_dir = model_args .cache_dir ,
249
249
revision = model_args .model_revision ,
250
250
use_auth_token = True if model_args .use_auth_token else None ,
251
+ use_safetensors = False ,
251
252
)
252
253
253
254
# Tokenizer check: this script requires a fast tokenizer.
Original file line number Diff line number Diff line change @@ -43,7 +43,10 @@ def convert_check(self, convert_format):
43
43
node = self .node
44
44
assert convert_format in ["static" ], "convert format for {} should be in ['static']" .format (node .op_type )
45
45
46
- parent = self .quantizer .model .get_parents (node )[0 ]
46
+ parents = self .quantizer .model .get_parents (node )
47
+ if len (parents ) == 0 :
48
+ return False
49
+ parent = parents [0 ]
47
50
children = self .quantizer .model .get_children (node )
48
51
if (
49
52
parent .op_type != "DequantizeLinear" or len (children ) == 0 or not node .name .endswith ("_quant" )
You can’t perform that action at this time.
0 commit comments