Skip to content

Commit 550b925

Browse files
committed
Missing variable
1 parent 989db34 commit 550b925

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

model.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,12 @@ def write_tensors(self):
427427
head_count = self.hparams["num_attention_heads"]
428428
tensor_map = gguf.get_tensor_name_map(self.model_arch, block_count)
429429

430+
if "num_key_value_heads" in self.hparams:
431+
head_count_kv = self.hparams["num_key_value_heads"]
432+
else:
433+
head_count_kv = head_count
434+
435+
430436
for i in range(block_count):
431437
if f"model.layers.{i}.self_attn.W_pack.weight" in model_kv:
432438
print(f"Unpacking and permuting layer {i}")

0 commit comments

Comments
 (0)