backend: use llamamodel.cpp for StarCoder

This commit is contained in:
Cebtenzzre 2023-09-28 12:02:20 -04:00 committed by Adam Treat
parent aa706ab1ff
commit 6277eac9cc
4 changed files with 2 additions and 1034 deletions

View File

@ -116,11 +116,6 @@ foreach(BUILD_VARIANT IN LISTS BUILD_VARIANTS)
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)
prepare_target(bert llama-mainline)
add_library(starcoder-${BUILD_VARIANT} SHARED
starcoder.cpp utils.h utils.cpp llmodel_shared.cpp llmodel_shared.h)
target_compile_definitions(starcoder-${BUILD_VARIANT} PRIVATE LLAMA_VERSIONS=>=3 LLAMA_DATE=999999)
prepare_target(starcoder llama-mainline)
endif()
endforeach()

View File

@ -392,7 +392,8 @@ DLL_EXPORT bool magic_match(const char * fname) {
return false;
bool isValid = gguf_get_version(ctx_gguf) <= 2;
isValid = isValid && get_arch_name(ctx_gguf) == "llama";
auto arch = get_arch_name(ctx_gguf);
isValid = isValid && (arch == "llama" || arch == "starcoder");
gguf_free(ctx_gguf);
return isValid;

View File

@ -78,7 +78,6 @@ struct mpt_model {
struct llm_kv_cache kv_self;
struct ggml_context * ctx;
std::map<std::string, struct ggml_tensor *> tensors;
llm_buffer eval_buf;

File diff suppressed because it is too large Load Diff