Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
Update convert_chatglm.py (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhenzhong1 authored Mar 22, 2024
1 parent 66bcc8b commit 1051182
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neural_speed/convert/convert_chatglm.py
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ def main(args_in: Optional[List[str]] = None) -> None:
# ChatGLM3 shares the same architecture and model config with ChatGLM2
# but its tokenizer further supports system prompts,
# so we can check system token to discriminate ChatGLM3 from ChatGLM2.
if "<|system|>" in tokenizer.tokenizer.special_tokens:
if hasattr(tokenizer, "tokenizer") and "<|system|>" in tokenizer.tokenizer.special_tokens:
if args.format == "GGUF":
chatglm3_convert_gguf(model, tokenizer, dir_model, fname_out, ftype, hparams)
else:
Expand Down

0 comments on commit 1051182

Please sign in to comment.