From: ghleg Date: Tue, 26 May 2026 05:00:31 +0000 (+0200) Subject: convert : support Gemma4ForCausalLM architecture (#23682) X-Git-Tag: upstream/0.0.10438~1097 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=dbe9c0c8ce65354c372f5d4ab507e5424a755e9f;p=pkg%2Fggml%2Fsources%2Fllama.cpp convert : support Gemma4ForCausalLM architecture (#23682) * convert : support Gemma4ForCausalLM architecture (#23674) * fix indent --------- Co-authored-by: Oleg Afonin Co-authored-by: Sigbjørn Skjæret --- diff --git a/conversion/__init__.py b/conversion/__init__.py index 73e2b3639..2a87bd75b 100644 --- a/conversion/__init__.py +++ b/conversion/__init__.py @@ -74,6 +74,7 @@ TEXT_MODEL_MAP: dict[str, str] = { "Gemma3nForCausalLM": "gemma", "Gemma3nForConditionalGeneration": "gemma", "Gemma4ForConditionalGeneration": "gemma", + "Gemma4ForCausalLM": "gemma", "GemmaForCausalLM": "gemma", "Glm4ForCausalLM": "glm", "Glm4MoeForCausalLM": "glm", diff --git a/conversion/gemma.py b/conversion/gemma.py index a6e14fbcb..1b427a30c 100644 --- a/conversion/gemma.py +++ b/conversion/gemma.py @@ -614,7 +614,7 @@ class Gemma3NModel(Gemma3Model): yield from super().modify_tensors(data_torch, name, bid) -@ModelBase.register("Gemma4ForConditionalGeneration") +@ModelBase.register("Gemma4ForConditionalGeneration", "Gemma4ForCausalLM") class Gemma4Model(Gemma3Model): model_arch = gguf.MODEL_ARCH.GEMMA4