server: logs switch init logs to server logs macro
This commit is contained in:
parent
fea35ac0a0
commit
440dd7aecd
1 changed files with 11 additions and 6 deletions
|
@ -448,7 +448,7 @@ struct llama_server_context
|
||||||
|
|
||||||
const int32_t n_ctx_slot = n_ctx / params.n_parallel;
|
const int32_t n_ctx_slot = n_ctx / params.n_parallel;
|
||||||
|
|
||||||
LOG_TEE("Available slots:\n");
|
LOG_INFO("initializing slots", {{"n_slots", params.n_parallel}});
|
||||||
for (int i = 0; i < params.n_parallel; i++)
|
for (int i = 0; i < params.n_parallel; i++)
|
||||||
{
|
{
|
||||||
llama_client_slot slot;
|
llama_client_slot slot;
|
||||||
|
@ -457,7 +457,10 @@ struct llama_server_context
|
||||||
slot.n_ctx = n_ctx_slot;
|
slot.n_ctx = n_ctx_slot;
|
||||||
slot.n_predict = params.n_predict;
|
slot.n_predict = params.n_predict;
|
||||||
|
|
||||||
LOG_TEE(" -> Slot %i - max context: %i\n", slot.id, n_ctx_slot);
|
LOG_INFO("new slot", {
|
||||||
|
{"slot_id", slot.id},
|
||||||
|
{"n_ctx_slot", slot.n_ctx}
|
||||||
|
});
|
||||||
|
|
||||||
const int ga_n = params.grp_attn_n;
|
const int ga_n = params.grp_attn_n;
|
||||||
const int ga_w = params.grp_attn_w;
|
const int ga_w = params.grp_attn_w;
|
||||||
|
@ -467,7 +470,12 @@ struct llama_server_context
|
||||||
GGML_ASSERT(ga_w % ga_n == 0 && "ga_w must be a multiple of ga_n"); // NOLINT
|
GGML_ASSERT(ga_w % ga_n == 0 && "ga_w must be a multiple of ga_n"); // NOLINT
|
||||||
//GGML_ASSERT(n_ctx_train % ga_w == 0 && "n_ctx_train must be a multiple of ga_w"); // NOLINT
|
//GGML_ASSERT(n_ctx_train % ga_w == 0 && "n_ctx_train must be a multiple of ga_w"); // NOLINT
|
||||||
//GGML_ASSERT(n_ctx >= n_ctx_train * ga_n && "n_ctx must be at least n_ctx_train * ga_n"); // NOLINT
|
//GGML_ASSERT(n_ctx >= n_ctx_train * ga_n && "n_ctx must be at least n_ctx_train * ga_n"); // NOLINT
|
||||||
LOG_TEE(" -> Slot %i - self-extend: ga_n = %d, ga_w = %d\n", slot.id, ga_n, ga_w);
|
|
||||||
|
LOG_INFO("slot self-extend", {
|
||||||
|
{"slot_id", slot.id},
|
||||||
|
{"ga_n", ga_n},
|
||||||
|
{"ga_w", ga_w}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
slot.ga_i = 0;
|
slot.ga_i = 0;
|
||||||
|
@ -2850,9 +2858,6 @@ int main(int argc, char **argv)
|
||||||
// Set the base directory for serving static files
|
// Set the base directory for serving static files
|
||||||
svr.set_base_dir(sparams.public_path);
|
svr.set_base_dir(sparams.public_path);
|
||||||
|
|
||||||
// to make it ctrl+clickable:
|
|
||||||
LOG_TEE("\nllama server listening at http://%s:%d\n\n", sparams.hostname.c_str(), sparams.port);
|
|
||||||
|
|
||||||
std::unordered_map<std::string, std::string> log_data;
|
std::unordered_map<std::string, std::string> log_data;
|
||||||
log_data["hostname"] = sparams.hostname;
|
log_data["hostname"] = sparams.hostname;
|
||||||
log_data["port"] = std::to_string(sparams.port);
|
log_data["port"] = std::to_string(sparams.port);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue