File tree 1 file changed +10
-1
lines changed
src/llmcompressor/entrypoints
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -230,7 +230,16 @@ def initialize_processor_from_path(
230
230
use_auth_token = True if model_args .use_auth_token else None ,
231
231
trust_remote_code = model_args .trust_remote_code_model ,
232
232
)
233
- except Exception :
233
+
234
+ except ValueError as exception :
235
+ if "trust_remote_code=True" in exception .value :
236
+ raise ValueError (
237
+ f"The repository for { processor_src } contains custom code which must "
238
+ "be executed to correctly load the tokenizer/processor. You can "
239
+ f"inspect the repository content at https://hf.co/{ processor_src } .\n "
240
+ "Please pass the argument `trust_remote_code_model=True`."
241
+ )
242
+
234
243
logger .debug ("Could not load fast processor, loading slow processor instead" )
235
244
processor = AutoProcessor .from_pretrained (
236
245
processor_src ,
You can’t perform that action at this time.
0 commit comments