Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 5b1bec6

Browse files
authored
Merge pull request #351 from janhq/349-feat-self-extend-support
349 feat self extend support + pump version of llama cpp
2 parents 9659be9 + d905050 commit 5b1bec6

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

controllers/llamaCPP.cc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ void llamaCPP::chatCompletion(
197197
std::string grammar_file = (*jsonBody).get("grammar_file", "").asString();
198198
std::ifstream file(grammar_file);
199199
if (!file) {
200-
LOG_ERROR << "Grammar file not found";
200+
LOG_ERROR << "Grammar file not found";
201201
} else {
202202
std::stringstream grammarBuf;
203203
grammarBuf << file.rdbuf();
@@ -439,6 +439,14 @@ bool llamaCPP::loadModelImpl(const Json::Value &jsonBody) {
439439
LOG_INFO << "MMPROJ FILE detected, multi-model enabled!";
440440
params.mmproj = jsonBody["mmproj"].asString();
441441
}
442+
if (!jsonBody["grp_attn_n"].isNull()) {
443+
444+
params.grp_attn_n = jsonBody["grp_attn_n"].asInt();
445+
}
446+
if (!jsonBody["grp_attn_w"].isNull()) {
447+
448+
params.grp_attn_w = jsonBody["grp_attn_w"].asInt();
449+
}
442450
params.model = jsonBody["llama_model_path"].asString();
443451
params.n_gpu_layers = jsonBody.get("ngl", 100).asInt();
444452
params.n_ctx = jsonBody.get("ctx_len", 2048).asInt();

llama.cpp

0 commit comments

Comments
 (0)