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

349 feat self extend support + pump version of llama cpp #351

Merged
merged 2 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion controllers/llamaCPP.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion llama.cpp