Skip to content

Commit 0cc8cb5

Browse files
authored
check++
1 parent dc36338 commit 0cc8cb5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

convert_hf_to_gguf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -659,8 +659,8 @@ def get_vocab_base_pre(self, tokenizer) -> str:
659659
# ref: https://huggingface.co/core42/jais-13b
660660
res = "jais"
661661
if chkhsh == "7b3e7548e4308f52a76e8229e4e6cc831195d0d1df43aed21ac6c93da05fec5f":
662-
# ref: https://huggingface.co/WisdomShell/CodeShell-7B
663-
res = "codeshell"
662+
# ref: https://huggingface.co/WisdomShell/-7B
663+
res = ""
664664
if chkhsh == "63b97e4253352e6f357cc59ea5b583e3a680eaeaf2632188c2b952de2588485e":
665665
# ref: https://huggingface.co/mistralai/Mistral-Nemo-Base-2407
666666
res = "tekken"
@@ -2740,7 +2740,7 @@ def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iter
27402740
# assuming token_embd.weight is seen before output.weight
27412741
if not self._has_tok_embd and new_name == self.format_tensor_name(gguf.MODEL_TENSOR.OUTPUT):
27422742
# even though the tensor file(s) does not contain the word embeddings they are still in the weight map
2743-
if "transformer.wte.weight" in self.tensor_names:
2743+
if self.tensor_names and "transformer.wte.weight" in self.tensor_names:
27442744
logger.debug(f"{tok_embd_name} not found before {output_name}, assuming they are tied")
27452745
self.tensor_names.remove("transformer.wte.weight")
27462746
elif new_name == tok_embd_name:

0 commit comments

Comments
 (0)