From 55fa05e80fdebd2b7fd74c2da4769c9132b4833a Mon Sep 17 00:00:00 2001 From: tikikun Date: Tue, 16 Jan 2024 21:15:06 +0700 Subject: [PATCH 1/2] feat: support self extend --- controllers/llamaCPP.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/controllers/llamaCPP.cc b/controllers/llamaCPP.cc index 45a0e49ba..291ec2ad7 100644 --- a/controllers/llamaCPP.cc +++ b/controllers/llamaCPP.cc @@ -197,7 +197,7 @@ void llamaCPP::chatCompletion( std::string grammar_file = (*jsonBody).get("grammar_file", "").asString(); std::ifstream file(grammar_file); if (!file) { - LOG_ERROR << "Grammar file not found"; + LOG_ERROR << "Grammar file not found"; } else { std::stringstream grammarBuf; grammarBuf << file.rdbuf(); @@ -439,6 +439,14 @@ bool llamaCPP::loadModelImpl(const Json::Value &jsonBody) { LOG_INFO << "MMPROJ FILE detected, multi-model enabled!"; params.mmproj = jsonBody["mmproj"].asString(); } + if (!jsonBody["grp_attn_n"].isNull()) { + + params.grp_attn_n = jsonBody["grp_attn_n"].asInt(); + } + if (!jsonBody["grp_attn_w"].isNull()) { + + params.grp_attn_w = jsonBody["grp_attn_w"].asInt(); + } params.model = jsonBody["llama_model_path"].asString(); params.n_gpu_layers = jsonBody.get("ngl", 100).asInt(); params.n_ctx = jsonBody.get("ctx_len", 2048).asInt(); From d90505006a4c051932e4a50851108e2a8b931e0f Mon Sep 17 00:00:00 2001 From: tikikun Date: Tue, 16 Jan 2024 21:18:46 +0700 Subject: [PATCH 2/2] chore: pump version --- llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama.cpp b/llama.cpp index 326b418b5..862f5e41a 160000 --- a/llama.cpp +++ b/llama.cpp @@ -1 +1 @@ -Subproject commit 326b418b59b6d48d854c4461a2303e8ac0a311e6 +Subproject commit 862f5e41ab1fdf12d6f59455aad3f5dd8258f805