Skip to content
Open
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 src/BackendManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <llama/llama.h>
#include "log.h"
#include <cstdlib>
#include <mutex>
Comment on lines 3 to 6

namespace liblloyal_node {
Expand Down Expand Up @@ -46,7 +47,11 @@ class BackendManager {
resolveBackends();
#endif
llama_backend_init();
common_log_set_verbosity_thold(LOG_DEFAULT_LLAMA);
// Verbosity threshold is env-overridable (LLOYAL_LLAMA_VERBOSITY) so llama.cpp's
// per-context KV / compute-buffer allocation lines can be surfaced on demand;
// defaults to the shipped level when the env var is unset.
const char* verbEnv = std::getenv("LLOYAL_LLAMA_VERBOSITY");
common_log_set_verbosity_thold(verbEnv ? std::atoi(verbEnv) : LOG_DEFAULT_LLAMA);
Comment on lines +53 to +54
llama_log_set(common_log_default_callback, nullptr);
}

Expand Down
Loading