From fc224f4a3013afb14d4d528bf1faba7a5897d37b Mon Sep 17 00:00:00 2001 From: luoyao Date: Thu, 5 Dec 2024 20:04:43 +0800 Subject: [PATCH] update --- src/server/llm/llama/llama3_chat_server.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/server/llm/llama/llama3_chat_server.cpp b/src/server/llm/llama/llama3_chat_server.cpp index e77a50c..a39b455 100644 --- a/src/server/llm/llama/llama3_chat_server.cpp +++ b/src/server/llm/llama/llama3_chat_server.cpp @@ -244,6 +244,13 @@ void Llama3ChatServer::Impl::serve_process(WFHttpTask* task) { task->get_resp()->append_output_body("Hello World !!!"); return; } + // check model stat + else if (strcmp(task->get_req()->get_request_uri(), "/check_model_stat") == 0) { + auto model_stat = _m_generator.get_model_stat(); + task->get_resp()->append_output_body(fmt::format( + "n_ctx: {}\n kv cache used: {}", model_stat.n_ctx_size, model_stat.kv_cache_cell_nums)); + return; + } // model service else if (strcmp(task->get_req()->get_request_uri(), _m_server_uri.c_str()) == 0) { // parse request body