mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-29 08:41:22 +00:00 
			
		
		
		
	convert: small addition to support LlamaModel (#13838)
Co-authored-by: dinhhuy <huy.dinh@brains-tech.co.jp>
This commit is contained in:
		| @@ -1841,7 +1841,8 @@ class StableLMModel(TextModel): | |||||||
|     "MistralForCausalLM", |     "MistralForCausalLM", | ||||||
|     "MixtralForCausalLM", |     "MixtralForCausalLM", | ||||||
|     "VLlama3ForCausalLM", |     "VLlama3ForCausalLM", | ||||||
|     "LlavaForConditionalGeneration") |     "LlavaForConditionalGeneration", | ||||||
|  |     "LlamaModel") | ||||||
| class LlamaModel(TextModel): | class LlamaModel(TextModel): | ||||||
|     model_arch = gguf.MODEL_ARCH.LLAMA |     model_arch = gguf.MODEL_ARCH.LLAMA | ||||||
|     undo_permute = True |     undo_permute = True | ||||||
| @@ -1921,6 +1922,8 @@ class LlamaModel(TextModel): | |||||||
|  |  | ||||||
|         if is_vision_tensor: |         if is_vision_tensor: | ||||||
|             return [] # skip vision tensors |             return [] # skip vision tensors | ||||||
|  |         elif self.hf_arch == "LlamaModel": | ||||||
|  |             name = "model." + name | ||||||
|         elif name.startswith("model.text_model"): |         elif name.startswith("model.text_model"): | ||||||
|             name = name.replace("text_model.", "") # for SmolVLM |             name = name.replace("text_model.", "") # for SmolVLM | ||||||
|         elif name.startswith("language_model."): |         elif name.startswith("language_model."): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Đinh Trọng Huy
					Đinh Trọng Huy