Explorar o código

Fix baichuan convert script not detecing model (#3739)

It seems nobody objects.
Galunid %!s(int64=2) %!d(string=hai) anos
pai
achega
6336701c93
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      convert-baichuan-hf-to-gguf.py

+ 1 - 1
convert-baichuan-hf-to-gguf.py

@@ -110,7 +110,7 @@ print("gguf: loading model "+dir_model.name)
 with open(dir_model / "config.json", "r", encoding="utf-8") as f:
 with open(dir_model / "config.json", "r", encoding="utf-8") as f:
     hparams = json.load(f)
     hparams = json.load(f)
 print("hello print: ",hparams["architectures"][0])
 print("hello print: ",hparams["architectures"][0])
-if hparams["architectures"][0] != "BaichuanForCausalLM":
+if hparams["architectures"][0] != "BaichuanForCausalLM" and hparams["architectures"][0] != "BaiChuanForCausalLM":
     print("Model architecture not supported: " + hparams["architectures"][0])
     print("Model architecture not supported: " + hparams["architectures"][0])
 
 
     sys.exit()
     sys.exit()