Skip to content

Commit fd0c501

Browse files
authored
backend: support GGUFv3 (nomic-ai#1582)
1 parent 14b410a commit fd0c501

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

gpt4all-backend/bert.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ DLL_EXPORT bool magic_match(const char * fname) {
884884
if (!ctx_gguf)
885885
return false;
886886

887-
bool isValid = gguf_get_version(ctx_gguf) <= 2;
887+
bool isValid = gguf_get_version(ctx_gguf) <= 3;
888888
isValid = isValid && get_arch_name(ctx_gguf) == "bert";
889889

890890
gguf_free(ctx_gguf);

gpt4all-backend/gptj.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ DLL_EXPORT bool magic_match(const char * fname) {
806806
if (!ctx_gguf)
807807
return false;
808808

809-
bool isValid = gguf_get_version(ctx_gguf) <= 2;
809+
bool isValid = gguf_get_version(ctx_gguf) <= 3;
810810
isValid = isValid && get_arch_name(ctx_gguf) == "gptj";
811811

812812
gguf_free(ctx_gguf);

gpt4all-backend/llamamodel.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ DLL_EXPORT bool magic_match(const char * fname) {
395395
if (!ctx_gguf)
396396
return false;
397397

398-
bool isValid = gguf_get_version(ctx_gguf) <= 2;
398+
bool isValid = gguf_get_version(ctx_gguf) <= 3;
399399
auto arch = get_arch_name(ctx_gguf);
400400
isValid = isValid && (arch == "llama" || arch == "starcoder" || arch == "falcon" || arch == "mpt");
401401

0 commit comments

Comments
 (0)