Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
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
7 changes: 6 additions & 1 deletion controllers/llamaCPP.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "llamaCPP.h"
#include "llama.h"
#include "log.h"
#include "utils/nitro_utils.h"

using namespace inferences;
Expand Down Expand Up @@ -441,7 +442,6 @@ bool llamaCPP::loadModelImpl(const Json::Value &jsonBody) {
jsonBody.get("cpu_threads", std::thread::hardware_concurrency())
.asInt();
params.cont_batching = jsonBody.get("cont_batching", false).asBool();

this->clean_cache_threshold =
jsonBody.get("clean_cache_threshold", 5).asInt();
this->caching_enabled = jsonBody.get("caching_enabled", false).asBool();
Expand All @@ -451,6 +451,11 @@ bool llamaCPP::loadModelImpl(const Json::Value &jsonBody) {
jsonBody.get("system_prompt", "ASSISTANT's RULE: ").asString();
this->pre_prompt = jsonBody.get("pre_prompt", "").asString();
this->repeat_last_n = jsonBody.get("repeat_last_n", 32).asInt();

// Set folder for llama log
std::string llama_log_folder =
jsonBody.get("llama_log_folder", "log/").asString();
log_set_target(llama_log_folder + "llama.log");
}
#ifdef GGML_USE_CUBLAS
LOG_INFO << "Setting up GGML CUBLAS PARAMS";
Expand Down
2 changes: 1 addition & 1 deletion controllers/llamaCPP.h
Original file line number Diff line number Diff line change
Expand Up @@ -2486,7 +2486,7 @@ class llamaCPP : public drogon::HttpController<llamaCPP> {
public:
llamaCPP() {
// Some default values for now below
// log_disable(); // Disable the log to file feature, reduce bloat for
log_enable(); // Disable the log to file feature, reduce bloat for
// target
// system ()
std::vector<std::string> llama_models =
Expand Down