mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-30 08:42:00 +00:00 
			
		
		
		
	convert : proper tensor name mapping for llama4 (#12870)
* Llama-4 mapping * remove hacky renaming --------- Co-authored-by: Daniel Han <danielhanchen@gmail.com>
This commit is contained in:
		| @@ -1806,10 +1806,6 @@ class Llama4Model(LlamaModel): | ||||
|         self.gguf_writer.add_expert_feed_forward_length(self.hparams["intermediate_size_moe"]) | ||||
|  | ||||
|     def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None): | ||||
|         name = name.replace("language_model.", "") | ||||
|         name = name.replace("feed_forward.", "mlp.") # a bit hacky for now | ||||
|         name = name.replace(".router.weight", ".gate.weight") # a bit hacky for now | ||||
|  | ||||
|         # split the gate_up into gate and up | ||||
|         if "gate_up_proj" in name: | ||||
|             name_up = name.replace("gate_up_proj", "up_proj.weight") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Xuan-Son Nguyen
					Xuan-Son Nguyen