@@ -111,6 +111,7 @@ def main(
111111 allow_mxint8_mdp_io : bool = False ,
112112 enable_qnn : Optional [bool ] = False ,
113113 qnn_config : Optional [str ] = None ,
114+ trust_remote_code : Optional [bool ] = False ,
114115 ** kwargs ,
115116) -> None :
116117 """
@@ -140,6 +141,7 @@ def main(
140141 :allow_mxint8_mdp_io (bool): Allows MXINT8 compression of MDP IO traffic. ``Defaults to False.``
141142 :enable_qnn (bool): Enables QNN Compilation. ``Defaults to False.``
142143 :qnn_config (str): Path of QNN Config parameters file. ``Defaults to None.``
144+ :trust_remote_code (bool): Trust remote code execution. ``Defaults to False.``
143145 :kwargs: Pass any compiler option as input. Any flag that is supported by `qaic-exec` can be passed. Params are converted to flags as below:
144146 -allocator_dealloc_delay=1 -> -allocator-dealloc-delay=1
145147 -qpc_crc=True -> -qpc-crc
@@ -164,6 +166,7 @@ def main(
164166 hf_token = hf_token ,
165167 full_batch_size = full_batch_size ,
166168 local_model_dir = local_model_dir ,
169+ trust_remote_code = trust_remote_code ,
167170 )
168171
169172 image_path = kwargs .pop ("image_path" , None )
@@ -264,6 +267,12 @@ def main(
264267 action = "store_true" ,
265268 help = "Compress constant MatMul weights to MXFP6 E2M3, default is no compression" ,
266269 )
270+ parser .add_argument (
271+ "--trust_remote_code" ,
272+ action = "store_true" ,
273+ default = False ,
274+ help = "Enable trusting remote code when loading models. Default is False; set to True by passing this flag." ,
275+ )
267276 parser .add_argument (
268277 "--mxint8" ,
269278 "--mxint8_kv_cache" ,
0 commit comments