Skip to content

Commit 30c5840

Browse files
fix vocab iteration
1 parent 5d10e3a commit 30c5840

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

convert_hf_to_gguf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5588,7 +5588,7 @@ def set_vocab(self):
55885588
tokens: list[str] = []
55895589
toktypes: list[int] = []
55905590

5591-
for i in range(tokenizer.vocab_size):
5591+
for i in range(vocab_size):
55925592
if i not in reverse_vocab:
55935593
tokens.append(f"[PAD{i}]")
55945594
toktypes.append(gguf.TokenType.UNUSED)

0 commit comments

Comments
 (0)