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:
parent
8b91d5355a
commit
5b1f13cb64
2 changed files with 19 additions and 4 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue