We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2a7aa5 commit b451b1cCopy full SHA for b451b1c
convert-falcon-hf-to-gguf.py
@@ -137,7 +137,9 @@ def parse_args() -> argparse.Namespace:
137
138
print("gguf: get gpt2 tokenizer vocab")
139
140
-vocab_size = len(tokenizer_json["model"]["vocab"])
+# The number of tokens in tokenizer.json can differ from the expected vocab size.
141
+# This causes downstream issues with mismatched tensor sizes when running the inference
142
+vocab_size = hparams["vocab_size"] if "vocab_size" in hparams else len(tokenizer_json["model"]["vocab"])
143
144
# ref: https://github.com/cmp-nct/ggllm.cpp/blob/master/falcon_convert.py
145
tokenizer = AutoTokenizer.from_pretrained(dir_model)
0 commit comments