convert-llama-hf-to-gguf.py : fix attn_q permute
This commit is contained in:
parent
58bde5c5c1
commit
c818c405e0
1 changed files with 3 additions and 1 deletions
|
@ -264,7 +264,9 @@ for part_name in part_names:
|
||||||
data = data.squeeze().numpy()
|
data = data.squeeze().numpy()
|
||||||
|
|
||||||
# reverse permute these
|
# 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)
|
data = reverse_hf_permute(data, head_count, head_count_kv)
|
||||||
|
|
||||||
# map tensor names
|
# map tensor names
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue