diff --git a/README.md b/README.md index cdc019f1..4495e697 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ ## Changelog -[23/07/11] Now we support training the **Baichuan-13B** model in this repo. Try `--model_name_or_path baichuan-inc/Baichuan-13B-Base` and `--lora_target W_pack` arguments to use the Baichuan-13B model. +[23/07/11] Now we support training the **Baichuan-13B** model in this repo. Try `--model_name_or_path baichuan-inc/Baichuan-13B-Base` and `--lora_target W_pack` arguments to use the Baichuan-13B model. Remember to use `--prompt_template baichuan` argument when you are using the Baichuan-13B-Chat model. [23/07/09] Now we release [FastEdit](https://github.com/hiyouga/FastEdit)⚡🩹, an easy-to-use package for editing the factual knowledge of large language models efficiently. Please follow [FastEdit](https://github.com/hiyouga/FastEdit) if you are interested. diff --git a/src/utils/template.py b/src/utils/template.py index 87d9a31b..67c82c7a 100644 --- a/src/utils/template.py +++ b/src/utils/template.py @@ -125,6 +125,17 @@ class Template: use_history=True ) + elif self.name == "baichuan": + r""" + Supports: https://huggingface.co/baichuan-inc/Baichuan-13B-Chat + """ + self._register_template( + prefix="", + prompt="{query}", + sep="", + use_history=True + ) + else: raise ValueError("Template {} does not exist.".format(self.name))