Skip to content

Commit

Permalink
Merge pull request #3161 from hiyouga/feature/add-mediatek-model
Browse files Browse the repository at this point in the history
support Breeze-7B
  • Loading branch information
hiyouga authored Apr 8, 2024
2 parents 98ad2cc + 7b76b4c commit 4c6c4a0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/llmtuner/data/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,3 +773,11 @@ def get_template_and_fix_tokenizer(
format_user=StringFormatter(slots=["<human>:{{content}}\n<bot>:"]),
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,
)
14 changes: 14 additions & 0 deletions src/llmtuner/extras/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -981,3 +981,17 @@ def 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",
)

0 comments on commit 4c6c4a0

Please sign in to comment.