convert-llama-hf-to-gguf.py : fix attn_q permute

This commit is contained in:
klosax
2023-08-21 04:42:09 +02:00
committed by GitHub
parent 58bde5c5c1
commit c818c405e0

View File

@@ -264,7 +264,9 @@ for part_name in part_names:
data = data.squeeze().numpy()
# reverse permute these
if name.endswith(".q_proj.weight") or name.endswith(".k_proj.weight"):
if name.endswith(".q_proj.weight"):
data = reverse_hf_permute(data, head_count)
if name.endswith(".k_proj.weight"):
data = reverse_hf_permute(data, head_count, head_count_kv)
# map tensor names