Skip to content

Commit

Permalink
Add trust remote code for tokenizer in inference conversion script (#446
Browse files Browse the repository at this point in the history
)

* add trust remote code for tokenizer

* lint

* lint
  • Loading branch information
margaretqian authored Jul 14, 2023
1 parent 2f49eb7 commit 496b50b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/inference/convert_hf_mpt_to_ft.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ def convert_mpt_to_ft(model_name_or_path: str,

model = transformers.AutoModelForCausalLM.from_pretrained(
model_name_or_path, trust_remote_code=True).to(torch_device)
tokenizer = transformers.AutoTokenizer.from_pretrained(model_name_or_path)
tokenizer = transformers.AutoTokenizer.from_pretrained(
model_name_or_path, trust_remote_code=True)

hf_config = vars(model.config)

Expand Down

0 comments on commit 496b50b

Please sign in to comment.