diff --git a/README.md b/README.md index 8a5a1598..9ff12fe4 100644 --- a/README.md +++ b/README.md @@ -271,6 +271,7 @@ Choose your path: | [DeepSeek (Code/MoE)](https://huggingface.co/deepseek-ai) | 7B/16B/67B/236B | deepseek | | [DeepSeek 2.5/3](https://huggingface.co/deepseek-ai) | 236B/671B | deepseek3 | | [DeepSeek R1 (Distill)](https://huggingface.co/deepseek-ai) | 1.5B/7B/8B/14B/32B/70B/671B | deepseekr1 | +| [ERNIE-4.5](https://huggingface.co/baidu) | 0.3B/21B/300B | ernie_nothink/ernie | | [Falcon](https://huggingface.co/tiiuae) | 7B/11B/40B/180B | falcon | | [Falcon-H1](https://huggingface.co/tiiuae) | 0.5B/1.5B/3B/7B/34B | falcon_h1 | | [Gemma/Gemma 2/CodeGemma](https://huggingface.co/google) | 2B/7B/9B/27B | gemma/gemma2 | diff --git a/README_zh.md b/README_zh.md index 6fb5b3bc..7271b1c3 100644 --- a/README_zh.md +++ b/README_zh.md @@ -273,6 +273,7 @@ https://github.com/user-attachments/assets/43b700c6-a178-41db-b1f8-8190a5d3fcfc | [DeepSeek (Code/MoE)](https://huggingface.co/deepseek-ai) | 7B/16B/67B/236B | deepseek | | [DeepSeek 2.5/3](https://huggingface.co/deepseek-ai) | 236B/671B | deepseek3 | | [DeepSeek R1 (Distill)](https://huggingface.co/deepseek-ai) | 1.5B/7B/8B/14B/32B/70B/671B | deepseekr1 | +| [ERNIE-4.5](https://huggingface.co/baidu) | 0.3B/21B/300B | ernie_nothink/ernie | | [Falcon](https://huggingface.co/tiiuae) | 7B/11B/40B/180B | falcon | | [Falcon-H1](https://huggingface.co/tiiuae) | 0.5B/1.5B/3B/7B/34B | falcon_h1 | | [Gemma/Gemma 2/CodeGemma](https://huggingface.co/google) | 2B/7B/9B/27B | gemma/gemma2 | diff --git a/src/llamafactory/data/template.py b/src/llamafactory/data/template.py index e2d62188..d47b2b83 100644 --- a/src/llamafactory/data/template.py +++ b/src/llamafactory/data/template.py @@ -946,6 +946,16 @@ register_template( ) +register_template( + name="ernie_nothink", + format_user=StringFormatter(slots=["User: {{content}}\nAssistant: "]), + format_assistant=StringFormatter(slots=["{{content}}<|end_of_sentence|>"]), + format_system=StringFormatter(slots=["{{content}}\n"]), + format_prefix=EmptyFormatter(slots=["<|begin_of_sentence|>"]), + stop_words=["<|end_of_sentence|>"], +) + + register_template( name="exaone", format_user=StringFormatter(slots=["[|user|]{{content}}\n[|assistant|]"]), diff --git a/src/llamafactory/extras/constants.py b/src/llamafactory/extras/constants.py index ed7811e7..134e3ce2 100644 --- a/src/llamafactory/extras/constants.py +++ b/src/llamafactory/extras/constants.py @@ -624,6 +624,25 @@ register_model_group( ) +register_model_group( + models={ + "ERNIE-4.5-0.3B-PT": { + DownloadSource.DEFAULT: "baidu/ERNIE-4.5-0.3B-PT", + DownloadSource.MODELSCOPE: "PaddlePaddle/ERNIE-4.5-0.3B-PT", + }, + "ERNIE-4.5-21B-A3B-PT": { + DownloadSource.DEFAULT: "baidu/ERNIE-4.5-21B-A3B-PT", + DownloadSource.MODELSCOPE: "PaddlePaddle/ERNIE-4.5-21B-A3B-PT", + }, + "ERNIE-4.5-300B-A47B-PT": { + DownloadSource.DEFAULT: "baidu/ERNIE-4.5-300B-A47B-PT", + DownloadSource.MODELSCOPE: "PaddlePaddle/ERNIE-4.5-300B-A47B-PT", + }, + }, + template="ernie_nothink", +) + + register_model_group( models={ "EXAONE-3.0-7.8B-Instruct": {