Skip to content

Commit ad45bb3

Browse files
committed
use vocab size from config.json
1 parent 22c3522 commit ad45bb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

convert-falcon-hf-to-gguf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def count_model_parts(dir_model: str) -> int:
148148

149149
print("gguf: get gpt2 tokenizer vocab")
150150

151-
vocab_size = len(tokenizer_json["model"]["vocab"])
151+
vocab_size = hparams["vocab_size"]
152152

153153
# ref: https://github.com/cmp-nct/ggllm.cpp/blob/master/falcon_convert.py
154154
tokenizer = AutoTokenizer.from_pretrained(dir_model)

0 commit comments

Comments
 (0)