From c1e1f24f5fff2c4a0b7cfa94f6a21efef6378a81 Mon Sep 17 00:00:00 2001 From: Yaowei Zheng Date: Wed, 20 Aug 2025 03:18:18 +0800 Subject: [PATCH] [misc] fix gemma template (#8970) --- src/llamafactory/extras/constants.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/llamafactory/extras/constants.py b/src/llamafactory/extras/constants.py index e96f9fa8..1543a709 100644 --- a/src/llamafactory/extras/constants.py +++ b/src/llamafactory/extras/constants.py @@ -757,10 +757,18 @@ register_model_group( DownloadSource.DEFAULT: "google/gemma-2-27b-it", DownloadSource.MODELSCOPE: "LLM-Research/gemma-2-27b-it", }, + "Gemma-3-270M": { + DownloadSource.DEFAULT: "google/gemma-3-270m", + DownloadSource.MODELSCOPE: "LLM-Research/gemma-3-270m", + }, "Gemma-3-1B": { DownloadSource.DEFAULT: "google/gemma-3-1b-pt", DownloadSource.MODELSCOPE: "LLM-Research/gemma-3-1b-pt", }, + "Gemma-3-270M-Instruct": { + DownloadSource.DEFAULT: "google/gemma-3-270m-it", + DownloadSource.MODELSCOPE: "LLM-Research/gemma-3-270m-it", + }, "Gemma-3-1B-Instruct": { DownloadSource.DEFAULT: "google/gemma-3-1b-it", DownloadSource.MODELSCOPE: "LLM-Research/gemma-3-1b-it", @@ -776,10 +784,6 @@ register_model_group( register_model_group( models={ - "Gemma-3-270M": { - DownloadSource.DEFAULT: "google/gemma-3-270m", - DownloadSource.MODELSCOPE: "LLM-Research/gemma-3-270m", - }, "Gemma-3-4B": { DownloadSource.DEFAULT: "google/gemma-3-4b-pt", DownloadSource.MODELSCOPE: "LLM-Research/gemma-3-4b-pt", @@ -792,10 +796,6 @@ register_model_group( DownloadSource.DEFAULT: "google/gemma-3-27b-pt", DownloadSource.MODELSCOPE: "LLM-Research/gemma-3-27b-pt", }, - "Gemma-3-270M-Instruct": { - DownloadSource.DEFAULT: "google/gemma-3-270m-it", - DownloadSource.MODELSCOPE: "LLM-Research/gemma-3-270m-it", - }, "Gemma-3-4B-Instruct": { DownloadSource.DEFAULT: "google/gemma-3-4b-it", DownloadSource.MODELSCOPE: "LLM-Research/gemma-3-4b-it", @@ -816,6 +816,10 @@ register_model_group( DownloadSource.DEFAULT: "google/medgemma-4b-it", DownloadSource.MODELSCOPE: "google/medgemma-4b-it", }, + "MedGemma-27B-Instruct": { + DownloadSource.DEFAULT: "google/medgemma-27b-text-it", + DownloadSource.MODELSCOPE: "google/medgemma-27b-text-it", + }, }, template="gemma3", multimodal=True,