File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
tools/who_what_benchmark/whowhatbench Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ def load_text_model(
139139 from optimum .intel .openvino import OVModelForCausalLM
140140 try :
141141 model = OVModelForCausalLM .from_pretrained (
142- model_id , device = device , ov_config = ov_config
142+ model_id , device = device , ov_config = ov_config , ** kwargs
143143 )
144144 except Exception :
145145 try :
Original file line number Diff line number Diff line change @@ -174,6 +174,11 @@ def parse_args():
174174 default = 42 ,
175175 help = "Text-to-image specific parameter that defines the seed value." ,
176176 )
177+ parser .add_argument (
178+ "--from-onnx" ,
179+ action = "store_true" ,
180+ help = "If True, the model will be loaded from ONNX format. It's converted to OpenVINO format in runtime." ,
181+ )
177182 parser .add_argument (
178183 "--adapters" ,
179184 type = str ,
@@ -193,7 +198,6 @@ def parse_args():
193198 action = 'store_true' ,
194199 help = "LLMPipeline specific parameter that defines the use of a long context prompt." ,
195200 )
196-
197201 parser .add_argument (
198202 "--empty_adapters" ,
199203 action = "store_true" ,
@@ -586,13 +590,15 @@ def main():
586590 kwargs = {}
587591 if args .cb_config :
588592 kwargs ["cb_config" ] = read_cb_config (args .cb_config )
593+ if args .from_onnx :
594+ kwargs ["from_onnx" ] = args .from_onnx
595+ kwargs ["use_cache" ] = False
589596 if args .adapters is not None :
590597 kwargs ["adapters" ] = args .adapters
591598 if args .alphas is not None :
592599 kwargs ["alphas" ] = args .alphas
593600 else :
594601 kwargs ["alphas" ] = [1.0 ] * len (args .adapters )
595-
596602 kwargs ["empty_adapters" ] = args .empty_adapters
597603
598604 if args .gt_data and os .path .exists (args .gt_data ):
You can’t perform that action at this time.
0 commit comments