Skip to content

Commit 787c36d

Browse files
committed
fixed hash for glm
1 parent eb23a95 commit 787c36d

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

convert_hf_to_gguf.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -794,12 +794,6 @@ def get_vocab_base_pre(self, tokenizer) -> str:
794794
if chkhsh == "d353350c764d8c3b39c763113960e4fb4919bea5fbf208a0e3b22e8469dc7406":
795795
# ref: https://huggingface.co/meta-llama/Llama-4-Scout-17B-16E-Instruct
796796
res = "llama4"
797-
if chkhsh == "81d72c7348a9f0ebe86f23298d37debe0a5e71149e29bd283904c02262b27516":
798-
# ref: https://huggingface.co/THUDM/glm-4-9b-chat
799-
res = "chatglm-bpe"
800-
if chkhsh == "b6e8e1518dc4305be2fe39c313ed643381c4da5db34a98f6a04c093f8afbe99b":
801-
# ref: https://huggingface.co/THUDM/glm-4-9b-hf
802-
res = "glm4"
803797
if chkhsh == "0e9433cbbb161f89e264eb32e8e64bfe69e834973ffca5d41d3948a604a3e2a3":
804798
# ref: https://huggingface.co/mistral-community/pixtral-12b
805799
res = "pixtral"
@@ -812,6 +806,9 @@ def get_vocab_base_pre(self, tokenizer) -> str:
812806
if chkhsh == "81d72c7348a9f0ebe86f23298d37debe0a5e71149e29bd283904c02262b27516":
813807
# ref: https://huggingface.co/THUDM/glm-4-9b-chat
814808
res = "chatglm-bpe"
809+
if chkhsh == "a1336059768a55c99a734006ffb02203cd450fed003e9a71886c88acf24fdbc2":
810+
# ref: https://huggingface.co/THUDM/glm-4-9b-hf
811+
res = "glm4"
815812

816813
if res is None:
817814
logger.warning("\n")

convert_hf_to_gguf_update.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ class TOKENIZER_TYPE(IntEnum):
128128
{"name": "trillion", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/trillionlabs/Trillion-7B-preview", },
129129
{"name": "bailingmoe", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/inclusionAI/Ling-lite", },
130130
{"name": "llama4", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/meta-llama/Llama-4-Scout-17B-16E-Instruct", },
131-
{"name": "chatglm-bpe", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/THUDM/glm-4-9b-chat", },
132-
{"name": "glm4", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/THUDM/glm-4-9b-hf", },
133131
{"name": "pixtral", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/mistral-community/pixtral-12b", },
134132
{"name": "seed-coder", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/ByteDance-Seed/Seed-Coder-8B-Base", },
135133
]
@@ -139,6 +137,7 @@ class TOKENIZER_TYPE(IntEnum):
139137
# chatglm-bpe has 2 hashes, why?
140138
{"name": "chatglm-bpe", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/THUDM/glm-4-9b-chat", "chkhsh": "b6e8e1518dc4305be2fe39c313ed643381c4da5db34a98f6a04c093f8afbe99b"},
141139
{"name": "chatglm-bpe", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/THUDM/glm-4-9b-chat", "chkhsh": "81d72c7348a9f0ebe86f23298d37debe0a5e71149e29bd283904c02262b27516"},
140+
{"name": "glm4", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/THUDM/glm-4-9b-hf", "chkhsh": "a1336059768a55c99a734006ffb02203cd450fed003e9a71886c88acf24fdbc2"},
142141
]
143142

144143

0 commit comments

Comments
 (0)