mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2026-07-07 09:35:27 +08:00
[model] add Hy-MT2-1.8B/7B support (#10605)
This commit is contained in:
@@ -1274,6 +1274,30 @@ register_template(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# The following two templates are copied from the official Hy-MT2 chat templates:
|
||||||
|
# https://github.com/Tencent-Hunyuan/Hy-MT2/blob/main/train/llama_factory_support/hy_dense_template.py
|
||||||
|
register_template(
|
||||||
|
name="hy_dense_1_8b",
|
||||||
|
format_user=StringFormatter(slots=["<|hy_User|>{{content}}"]),
|
||||||
|
format_assistant=StringFormatter(slots=["<|hy_Assistant|>{{content}}"]),
|
||||||
|
format_system=StringFormatter(slots=["{{content}}<|hy_place▁holder▁no▁3|>"]),
|
||||||
|
format_prefix=EmptyFormatter(slots=[{"bos_token"}]),
|
||||||
|
stop_words=["<|hy_place▁holder▁no▁2|>"],
|
||||||
|
efficient_eos=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
register_template(
|
||||||
|
name="hy_dense_7b",
|
||||||
|
format_user=StringFormatter(slots=["{{content}}<|extra_0|>"]),
|
||||||
|
format_assistant=StringFormatter(slots=["{{content}}"]),
|
||||||
|
format_system=StringFormatter(slots=["{{content}}<|extra_4|>"]),
|
||||||
|
format_prefix=EmptyFormatter(slots=[{"bos_token"}]),
|
||||||
|
stop_words=["<|eos|>"],
|
||||||
|
efficient_eos=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
register_template(
|
register_template(
|
||||||
name="intern2",
|
name="intern2",
|
||||||
format_user=StringFormatter(slots=["<|im_start|>user\n{{content}}<|im_end|>\n<|im_start|>assistant\n"]),
|
format_user=StringFormatter(slots=["<|im_start|>user\n{{content}}<|im_end|>\n<|im_start|>assistant\n"]),
|
||||||
|
|||||||
@@ -1248,6 +1248,28 @@ register_model_group(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
register_model_group(
|
||||||
|
models={
|
||||||
|
"Hy-MT2-1.8B-Instruct": {
|
||||||
|
DownloadSource.DEFAULT: "tencent/Hy-MT2-1.8B",
|
||||||
|
DownloadSource.MODELSCOPE: "Tencent-Hunyuan/Hy-MT2-1.8B",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
template="hy_dense_1_8b",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
register_model_group(
|
||||||
|
models={
|
||||||
|
"Hy-MT2-7B-Instruct": {
|
||||||
|
DownloadSource.DEFAULT: "tencent/Hy-MT2-7B",
|
||||||
|
DownloadSource.MODELSCOPE: "Tencent-Hunyuan/Hy-MT2-7B",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
template="hy_dense_7b",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
register_model_group(
|
register_model_group(
|
||||||
models={
|
models={
|
||||||
"HY-MT1.5-1.8B-Instruct": {
|
"HY-MT1.5-1.8B-Instruct": {
|
||||||
|
|||||||
Reference in New Issue
Block a user