]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
Fix baichuan convert script not detecing model (#3739)
authorGalunid <redacted>
Mon, 23 Oct 2023 15:47:03 +0000 (17:47 +0200)
committerGitHub <redacted>
Mon, 23 Oct 2023 15:47:03 +0000 (17:47 +0200)
It seems nobody objects.

convert-baichuan-hf-to-gguf.py

index 3b64ecb88707222c4c498da4a25283bef99487d6..5ee99be73134e6ef807c322c8e64e7f9ef263dcd 100755 (executable)
@@ -110,7 +110,7 @@ print("gguf: loading model "+dir_model.name)
 with open(dir_model / "config.json", "r", encoding="utf-8") as f:
     hparams = json.load(f)
 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])
 
     sys.exit()