diff --git a/src/llmtuner/data/template.py b/src/llmtuner/data/template.py index 88d7cb86..52358c1e 100644 --- a/src/llmtuner/data/template.py +++ b/src/llmtuner/data/template.py @@ -441,6 +441,18 @@ _register_template( ) +_register_template( + name="breeze", + format_user=StringFormatter(slots=["[INST] {{content}} [/INST] "]), + format_system=StringFormatter(slots=[{"bos_token"}, "{{content}}"]), + default_system=( + "You are a helpful AI assistant built by MediaTek Research. " + "The user you are helping speaks Traditional Chinese and comes from Taiwan." + ), + efficient_eos=True, +) + + _register_template( name="chatglm2", format_user=StringFormatter(slots=["[Round {{idx}}]\n\n问:{{content}}\n\n答:"]), @@ -773,11 +785,3 @@ _register_template( format_user=StringFormatter(slots=[":{{content}}\n:"]), format_separator=EmptyFormatter(slots=["\n"]), ) - -_register_template( - name="breeze", - format_user=StringFormatter(slots=["[INST] {{content}} [/INST] "]), - format_system=StringFormatter(slots=[{"bos_token"}, "{{content}}"]), - default_system="You are a helpful AI assistant built by MediaTek Research. The user you are helping speaks Traditional Chinese and comes from Taiwan. ", - efficient_eos=True, -) diff --git a/src/llmtuner/extras/constants.py b/src/llmtuner/extras/constants.py index 38fde712..729e0fa6 100644 --- a/src/llmtuner/extras/constants.py +++ b/src/llmtuner/extras/constants.py @@ -170,6 +170,19 @@ register_model_group( ) +register_model_group( + models={ + "Breeze-7B": { + DownloadSource.DEFAULT: "MediaTek-Research/Breeze-7B-Base-v1_0", + }, + "Breeze-7B-Chat": { + DownloadSource.DEFAULT: "MediaTek-Research/Breeze-7B-Instruct-v1_0", + }, + }, + template="breeze", +) + + register_model_group( models={ "ChatGLM2-6B-Chat": { @@ -748,8 +761,8 @@ register_model_group( DownloadSource.MODELSCOPE: "qwen/Qwen1.5-14B-Chat-AWQ", }, "Qwen1.5-32B-int4-Chat": { - DownloadSource.DEFAULT: "Qwen/Qwen1.5-32B-Chat-GPTQ-Int4", - DownloadSource.MODELSCOPE: "qwen/Qwen1.5-32B-Chat-GPTQ-Int4", + DownloadSource.DEFAULT: "Qwen/Qwen1.5-32B-Chat-AWQ", + DownloadSource.MODELSCOPE: "qwen/Qwen1.5-32B-Chat-AWQ", }, "Qwen1.5-72B-int8-Chat": { DownloadSource.DEFAULT: "Qwen/Qwen1.5-72B-Chat-GPTQ-Int8", @@ -981,17 +994,3 @@ register_model_group( }, template="atom", ) - -register_model_group( - models={ - "Breeze-7B": { - DownloadSource.DEFAULT: "MediaTek-Research/Breeze-7B-Base-v1_0", - DownloadSource.MODELSCOPE: "MediaTek-Research/Breeze-7B-Base-v1_0", - }, - "Breeze-7B-Chat": { - DownloadSource.DEFAULT: "MediaTek-Research/Breeze-7B-Instruct-v1_0", - DownloadSource.MODELSCOPE: "MediaTek-Research/Breeze-7B-Instruct-v1_0", - } - }, - template="breeze", -)