backend: support GGUFv3 (#1582)

This commit is contained in:
cebtenzzre 2023-10-27 17:07:23 -04:00 committed by GitHub
parent 14b410a12a
commit fd0c501d68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -884,7 +884,7 @@ DLL_EXPORT bool magic_match(const char * fname) {
if (!ctx_gguf)
return false;
bool isValid = gguf_get_version(ctx_gguf) <= 2;
bool isValid = gguf_get_version(ctx_gguf) <= 3;
isValid = isValid && get_arch_name(ctx_gguf) == "bert";
gguf_free(ctx_gguf);

View File

@ -806,7 +806,7 @@ DLL_EXPORT bool magic_match(const char * fname) {
if (!ctx_gguf)
return false;
bool isValid = gguf_get_version(ctx_gguf) <= 2;
bool isValid = gguf_get_version(ctx_gguf) <= 3;
isValid = isValid && get_arch_name(ctx_gguf) == "gptj";
gguf_free(ctx_gguf);

@ -1 +1 @@
Subproject commit 3414cd82174d8500094ff83ccc8ee0617b41bf94
Subproject commit 10e6c38b0022b23181488371e045eefc4490bea6

View File

@ -395,7 +395,7 @@ DLL_EXPORT bool magic_match(const char * fname) {
if (!ctx_gguf)
return false;
bool isValid = gguf_get_version(ctx_gguf) <= 2;
bool isValid = gguf_get_version(ctx_gguf) <= 3;
auto arch = get_arch_name(ctx_gguf);
isValid = isValid && (arch == "llama" || arch == "starcoder" || arch == "falcon" || arch == "mpt");