Skip to content

Commit 1349625

Browse files
committed
fix(conversion): Simplify tensor name mapping in conversion
Branch: GraniteMoE Co-Authored-By: [email protected] Signed-off-by: Gabe Goodhart <[email protected]>
1 parent e68431b commit 1349625

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

convert_hf_to_gguf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4129,8 +4129,8 @@ def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iter
41294129
if name.endswith("block_sparse_moe.input_linear.weight"):
41304130
gate, up = data_torch.chunk(2, dim=-2)
41314131
return [
4132-
(self.map_tensor_name(f"model.layers.{bid}.block_sparse_moe.input_linear.gate.weight"), gate),
4133-
(self.map_tensor_name(f"model.layers.{bid}.block_sparse_moe.input_linear.up.weight"), up),
4132+
(self.format_tensor_name(gguf.MODEL_TENSOR.FFN_GATE_EXP, bid), gate),
4133+
(self.format_tensor_name(gguf.MODEL_TENSOR.FFN_UP_EXP, bid), up),
41344134
]
41354135

41364136
return super().modify_tensors(data_torch, name, bid)

0 commit comments

Comments
 (0)