File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/llmcompressor/modifiers/awq Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -254,7 +254,9 @@ def convert_and_save(
254254 compressed_state_dict = compressor .compress (model , state_dict , show_progress = True )
255255
256256 # 6. Save the model.
257- tokenizer = transformers .AutoTokenizer .from_pretrained (model_name_or_path )
257+ tokenizer = transformers .AutoTokenizer .from_pretrained (
258+ model_name_or_path , trust_remote_code = trust_remote_code
259+ )
258260 model .save_pretrained (output_dir , state_dict = compressed_state_dict )
259261 tokenizer .save_pretrained (output_dir )
260262 compressor .update_config (output_dir )
@@ -274,7 +276,12 @@ def load_and_convert_from_autoawq(
274276 :return: A compressed model.
275277 """
276278 with TemporaryDirectory () as temp_dir :
277- convert_and_save (model_name_or_path , temp_dir , quantization_format )
279+ convert_and_save (
280+ model_name_or_path ,
281+ temp_dir ,
282+ quantization_format ,
283+ trust_remote_code = trust_remote_code ,
284+ )
278285 return transformers .AutoModelForCausalLM .from_pretrained (
279286 temp_dir , torch_dtype = torch .float16 , trust_remote_code = trust_remote_code
280287 )
You can’t perform that action at this time.
0 commit comments