Skip to content

Commit

Permalink
Add default value for tokenizer path (#699)
Browse files Browse the repository at this point in the history
Co-authored-by: Ammar Ahmad Awan <[email protected]>
Co-authored-by: Michael Wyatt <[email protected]>
  • Loading branch information
3 people authored Oct 3, 2023
1 parent ca03bd7 commit 0d11c63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion applications/DeepSpeed-Chat/training/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ def load_hf_tokenizer(model_name_or_path, fast_tokenizer=True):
model_json = os.path.join(model_name_or_path, "config.json")
if os.path.exists(model_json):
model_json_file = json.load(open(model_json))
model_name = model_json_file["_name_or_path"]
model_name = model_json_file.get("_name_or_path",
model_name_or_path)
tokenizer = get_tokenizer(model_name,
fast_tokenizer=fast_tokenizer)
else:
Expand Down

0 comments on commit 0d11c63

Please sign in to comment.