diff --git a/convert_hf_to_gguf.py b/convert_hf_to_gguf.py index 4df55e7b15b93..2be7de5a59bbe 100755 --- a/convert_hf_to_gguf.py +++ b/convert_hf_to_gguf.py @@ -4148,7 +4148,7 @@ def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iter kv_b = data_torch.view(n_head_kv, v_head_dim + qk_nope_head_dim, data_torch.shape[-1]) k_b, v_b = torch.split(kv_b, [qk_nope_head_dim, v_head_dim], dim=1) - k_b = k_b.transpose(1, 2); + k_b = k_b.transpose(1, 2) k_b = k_b.reshape(n_head_kv * data_torch.shape[-1], qk_nope_head_dim) v_b = v_b.reshape(n_head_kv * v_head_dim, data_torch.shape[-1]) @@ -4158,7 +4158,6 @@ def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iter (self.map_tensor_name(name_vb), v_b) ] - return [(self.map_tensor_name(name), data_torch)] def prepare_tensors(self):