File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
examples/pytorch/nlp/huggingface_models/language-modeling/quantization/llm Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -367,16 +367,17 @@ def eval_func(model):
367367 if args .ipex :
368368 user_model = load (os .path .abspath (os .path .expanduser (args .output_dir )))
369369 else :
370- user_model , _ = get_user_model ()
371- kwargs = {'weight_only' : True } if args .approach == 'weight_only' else {}
372- user_model = load (os .path .abspath (os .path .expanduser (args .output_dir )), user_model , ** kwargs )
370+ if args .gptq_debug :
371+ user_model = torch .load (os .path .join (args .output_dir , "gptq_best_model.pt" ))
372+ else :
373+ user_model , _ = get_user_model ()
374+ kwargs = {'weight_only' : True } if args .approach == 'weight_only' else {}
375+ user_model = load (os .path .abspath (os .path .expanduser (args .output_dir )), user_model , ** kwargs )
373376else :
374377 user_model , _ = get_user_model ()
375378
376379if args .accuracy :
377380 user_model .eval ()
378- if args .gptq_debug :
379- user_model = torch .load (os .path .join (args .output_dir , "gptq_best_model.pt" ))
380381 if args .code_generation :
381382 from intel_extension_for_transformers .llm .evaluation .lm_code_eval import evaluate
382383 from transformers import AutoTokenizer
You can’t perform that action at this time.
0 commit comments