diff --git a/README.md b/README.md index f53ac70d5..d1a43ac0b 100644 --- a/README.md +++ b/README.md @@ -291,7 +291,7 @@ Read technical notes: | [GPT-2](https://huggingface.co/openai-community) | 0.1B/0.4B/0.8B/1.5B | - | | [GPT-OSS](https://huggingface.co/openai) | 20B/120B | gpt_oss | | [Granite 3-4](https://huggingface.co/ibm-granite) | 1B/2B/3B/7B/8B | granite3/granite4 | -| [Hunyuan (MT)](https://huggingface.co/tencent/) | 7B | hunyuan | +| [Hunyuan/Hunyuan1.5 (MT)](https://huggingface.co/tencent/) | 1.8B/7B | hunyuan/hunyuan1_5 | | [InternLM 2-3](https://huggingface.co/internlm) | 7B/8B/20B | intern2 | | [InternVL 2.5-3.5](https://huggingface.co/OpenGVLab) | 1B/2B/4B/8B/14B/30B/38B/78B/241B | intern_vl | | [Intern-S1-mini](https://huggingface.co/internlm/) | 8B | intern_s1 | diff --git a/README_zh.md b/README_zh.md index 52f75de00..757e097c4 100644 --- a/README_zh.md +++ b/README_zh.md @@ -293,7 +293,7 @@ https://github.com/user-attachments/assets/43b700c6-a178-41db-b1f8-8190a5d3fcfc | [GPT-2](https://huggingface.co/openai-community) | 0.1B/0.4B/0.8B/1.5B | - | | [GPT-OSS](https://huggingface.co/openai) | 20B/120B | gpt_oss | | [Granite 3-4](https://huggingface.co/ibm-granite) | 1B/2B/3B/7B/8B | granite3/granite4 | -| [Hunyuan (MT)](https://huggingface.co/tencent/) | 7B | hunyuan | +| [Hunyuan/Hunyuan1.5 (MT)](https://huggingface.co/tencent/) | 1.8B/7B | hunyuan/hunyuan1_5 | | [InternLM 2-3](https://huggingface.co/internlm) | 7B/8B/20B | intern2 | | [InternVL 2.5-3.5](https://huggingface.co/OpenGVLab) | 1B/2B/4B/8B/14B/30B/38B/78B/241B | intern_vl | | [Intern-S1-mini](https://huggingface.co/internlm/) | 8B | intern_s1 | diff --git a/src/llamafactory/data/template.py b/src/llamafactory/data/template.py index c3a2bc1ba..751d9d39a 100644 --- a/src/llamafactory/data/template.py +++ b/src/llamafactory/data/template.py @@ -1138,6 +1138,16 @@ register_template( ) +register_template( + name="hunyuan1_5", + format_user=StringFormatter(slots=["<|hy_User|>{{content}}<|hy_place▁holder▁no▁8|>"]), + format_assistant=StringFormatter(slots=["{{content}}<|hy_place▁holder▁no▁2|>"]), + format_system=StringFormatter(slots=["{{content}}<|hy_place▁holder▁no▁3|>"]), + format_prefix=EmptyFormatter(slots=["<|hy_begin▁of▁sentence|>"]), + stop_words=["<|hy_place▁holder▁no▁2|>"], +) + + register_template( name="intern2", format_user=StringFormatter(slots=["<|im_start|>user\n{{content}}<|im_end|>\n<|im_start|>assistant\n"]), diff --git a/src/llamafactory/extras/constants.py b/src/llamafactory/extras/constants.py index a7a9f6337..e1803bf37 100644 --- a/src/llamafactory/extras/constants.py +++ b/src/llamafactory/extras/constants.py @@ -1157,6 +1157,21 @@ register_model_group( ) +register_model_group( + models={ + "HY-MT1.5-1.8B-Instruct": { + DownloadSource.DEFAULT: "tencent/HY-MT1.5-1.8B", + DownloadSource.MODELSCOPE: "Tencent-Hunyuan/HY-MT1.5-1.8B", + }, + "HY-MT1.5-7B-Instruct": { + DownloadSource.DEFAULT: "tencent/HY-MT1.5-7B", + DownloadSource.MODELSCOPE: "Tencent-Hunyuan/HY-MT1.5-7B", + }, + }, + template="hunyuan1_5", +) + + register_model_group( models={ "Index-1.9B-Base": {