diff --git a/convert_hf_to_gguf.py b/convert_hf_to_gguf.py index d62ecb99790806..1cad8ef5475ccc 100755 --- a/convert_hf_to_gguf.py +++ b/convert_hf_to_gguf.py @@ -4129,8 +4129,8 @@ def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iter if name.endswith("block_sparse_moe.input_linear.weight"): gate, up = data_torch.chunk(2, dim=-2) return [ - (self.map_tensor_name(f"model.layers.{bid}.block_sparse_moe.input_linear.gate.weight"), gate), - (self.map_tensor_name(f"model.layers.{bid}.block_sparse_moe.input_linear.up.weight"), up), + (self.format_tensor_name(gguf.MODEL_TENSOR.FFN_GATE_EXP, bid), gate), + (self.format_tensor_name(gguf.MODEL_TENSOR.FFN_UP_EXP, bid), up), ] return super().modify_tensors(data_torch, name, bid)