Skip to content

Commit

Permalink
MiniCPM: fix for gpa
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangkaihuo committed Jun 17, 2024
1 parent 43b35e3 commit f4d3bda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion convert-hf-to-gguf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ def set_vocab(self):

def _reverse_hf_permute(self, weights: Tensor, n_head: int, n_kv_head: int | None = None) -> Tensor:
if n_kv_head is not None and n_head != n_kv_head:
n_head //= n_kv_head
n_head = n_kv_head

return (
weights.reshape(n_head, 2, weights.shape[0] // n_head // 2, *weights.shape[1:])
Expand Down

0 comments on commit f4d3bda

Please sign in to comment.