Skip to content

Commit

Permalink
MPT: use upstream llama.cpp implementation (nomic-ai#1515)
Browse files Browse the repository at this point in the history
  • Loading branch information
cebtenzzre authored Oct 19, 2023
1 parent 0fe2e19 commit 4338e72
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 1,038 deletions.
4 changes: 0 additions & 4 deletions gpt4all-backend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@ foreach(BUILD_VARIANT IN LISTS BUILD_VARIANTS)
gptj.cpp utils.h utils.cpp llmodel_shared.cpp llmodel_shared.h)
prepare_target(gptj llama-mainline)

add_library(mpt-${BUILD_VARIANT} SHARED
mpt.cpp utils.h utils.cpp llmodel_shared.cpp llmodel_shared.h)
prepare_target(mpt llama-mainline)

add_library(bert-${BUILD_VARIANT} SHARED
bert.cpp utils.h utils.cpp llmodel_shared.cpp llmodel_shared.h)
target_compile_definitions(bert-${BUILD_VARIANT} PRIVATE LLAMA_VERSIONS=>=3 LLAMA_DATE=999999)
Expand Down
2 changes: 1 addition & 1 deletion gpt4all-backend/llama.cpp-mainline
2 changes: 1 addition & 1 deletion gpt4all-backend/llamamodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ DLL_EXPORT bool magic_match(const char * fname) {

bool isValid = gguf_get_version(ctx_gguf) <= 2;
auto arch = get_arch_name(ctx_gguf);
isValid = isValid && (arch == "llama" || arch == "starcoder" || arch == "falcon");
isValid = isValid && (arch == "llama" || arch == "starcoder" || arch == "falcon" || arch == "mpt");

gguf_free(ctx_gguf);
return isValid;
Expand Down
Loading

0 comments on commit 4338e72

Please sign in to comment.