From feb547aa993270b75af9f735fe7ee1ad422af03e Mon Sep 17 00:00:00 2001 From: hiyouga <467089858@qq.com> Date: Sat, 2 Nov 2024 21:31:23 +0800 Subject: [PATCH] fix phi3 template Former-commit-id: 2e843d989e946725e2dc096d6540531eaaf5b782 --- src/llamafactory/extras/constants.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/llamafactory/extras/constants.py b/src/llamafactory/extras/constants.py index 1bd325c3..8a3ed036 100644 --- a/src/llamafactory/extras/constants.py +++ b/src/llamafactory/extras/constants.py @@ -1184,14 +1184,6 @@ register_model_group( DownloadSource.DEFAULT: "microsoft/Phi-3-mini-128k-instruct", DownloadSource.MODELSCOPE: "LLM-Research/Phi-3-mini-128k-instruct", }, - "Phi-3-7B-8k-Instruct": { - DownloadSource.DEFAULT: "microsoft/Phi-3-small-8k-instruct", - DownloadSource.MODELSCOPE: "LLM-Research/Phi-3-small-8k-instruct", - }, - "Phi-3-7B-128k-Instruct": { - DownloadSource.DEFAULT: "microsoft/Phi-3-small-128k-instruct", - DownloadSource.MODELSCOPE: "LLM-Research/Phi-3-small-128k-instruct", - }, "Phi-3-14B-8k-Instruct": { DownloadSource.DEFAULT: "microsoft/Phi-3-medium-4k-instruct", DownloadSource.MODELSCOPE: "LLM-Research/Phi-3-medium-4k-instruct", @@ -1205,6 +1197,21 @@ register_model_group( ) +register_model_group( + models={ + "Phi-3-7B-8k-Instruct": { + DownloadSource.DEFAULT: "microsoft/Phi-3-small-8k-instruct", + DownloadSource.MODELSCOPE: "LLM-Research/Phi-3-small-8k-instruct", + }, + "Phi-3-7B-128k-Instruct": { + DownloadSource.DEFAULT: "microsoft/Phi-3-small-128k-instruct", + DownloadSource.MODELSCOPE: "LLM-Research/Phi-3-small-128k-instruct", + }, + }, + template="phi_small", +) + + register_model_group( models={ "Pixtral-12B-Chat": {