From 7b4af22fa99b85153d29ea573ff012992d22afde Mon Sep 17 00:00:00 2001 From: Aes Sedai <7980540+AesSedai@users.noreply.github.com> Date: Sun, 8 Feb 2026 12:37:02 -0800 Subject: [PATCH] Kimi-K2.5: update permute name to match --- convert_hf_to_gguf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/convert_hf_to_gguf.py b/convert_hf_to_gguf.py index 5a3f74812e..e138c2eebd 100755 --- a/convert_hf_to_gguf.py +++ b/convert_hf_to_gguf.py @@ -11115,7 +11115,7 @@ class KimiK25Model(MmprojModel): self.gguf_writer.add_vision_max_pixels(in_patch_limit * pixels_per_patch) @staticmethod - def _permute_kqv(weights: Tensor, n_head: int) -> Tensor: + def permute(weights: Tensor, n_head: int) -> Tensor: out_dim, in_dim = weights.shape head_dim = out_dim // n_head w = weights.reshape(n_head, head_dim // 4, 2, 2, in_dim) @@ -11141,8 +11141,8 @@ class KimiK25Model(MmprojModel): if "weight" in name: wq, wk, wv = data_torch[:qkv_dim, :], data_torch[qkv_dim:2*qkv_dim, :], data_torch[2*qkv_dim:, :] - wq = self._permute_kqv(wq, n_head) - wk = self._permute_kqv(wk, n_head) + wq = self.permute(wq, n_head) + wk = self.permute(wk, n_head) data_torch = torch.cat([wq, wk, wv], dim=0) elif "bias" in name: bq, bk, bv = data_torch[:qkv_dim], data_torch[qkv_dim:2*qkv_dim], data_torch[2*qkv_dim:]