]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
convert: small addition to support LlamaModel (#13838)
authorĐinh Trọng Huy <redacted>
Wed, 28 May 2025 14:34:18 +0000 (23:34 +0900)
committerGitHub <redacted>
Wed, 28 May 2025 14:34:18 +0000 (16:34 +0200)
Co-authored-by: dinhhuy <redacted>
convert_hf_to_gguf.py

index b36bbc7658934dd194cd7d5d00effa4babfac041..8ba82f7174f378581e088beea9a908b0eb1d52a8 100755 (executable)
@@ -1841,7 +1841,8 @@ class StableLMModel(TextModel):
     "MistralForCausalLM",
     "MixtralForCausalLM",
     "VLlama3ForCausalLM",
-    "LlavaForConditionalGeneration")
+    "LlavaForConditionalGeneration",
+    "LlamaModel")
 class LlamaModel(TextModel):
     model_arch = gguf.MODEL_ARCH.LLAMA
     undo_permute = True
@@ -1921,6 +1922,8 @@ class LlamaModel(TextModel):
 
         if is_vision_tensor:
             return [] # skip vision tensors
+        elif self.hf_arch == "LlamaModel":
+            name = "model." + name
         elif name.startswith("model.text_model"):
             name = name.replace("text_model.", "") # for SmolVLM
         elif name.startswith("language_model."):