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

Commit 3c674cd

Browse files
authored
Merge pull request #109 from janhq/pump-fixes
hotfix: update bug fixes for recent batch inference
2 parents d358274 + 131359e commit 3c674cd

File tree

4 files changed

+1907
-1722
lines changed

4 files changed

+1907
-1722
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ add_executable(${PROJECT_NAME} main.cc)
5151
#
5252
# and comment out the following lines
5353
find_package(Drogon CONFIG REQUIRED)
54-
target_link_libraries(${PROJECT_NAME} PRIVATE Drogon::Drogon common llama clip
54+
target_link_libraries(${PROJECT_NAME} PRIVATE Drogon::Drogon common llama llava
5555
${CMAKE_THREAD_LIBS_INIT})
5656

5757
# ##############################################################################

controllers/llamaCPP.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void llamaCPP::chatCompletion(
110110
data["stop"] = stopWords;
111111
}
112112

113-
const int task_id = llama.request_completion(data, false);
113+
const int task_id = llama.request_completion(data, false,false);
114114
LOG_INFO << "Resolved request for task_id:" << task_id;
115115

116116
auto state = createState(task_id, this);
@@ -178,7 +178,7 @@ void llamaCPP::embedding(
178178
prompt = "";
179179
}
180180
const int task_id =
181-
llama.request_completion({{"prompt", prompt}, {"n_predict", 0}}, false);
181+
llama.request_completion({{"prompt", prompt}, {"n_predict", 0}}, false, true);
182182
task_result result = llama.next_result(task_id);
183183
std::string embeddingResp = result.result_json.dump();
184184
auto resp = nitro_utils::nitroHttpResponse();
@@ -226,8 +226,8 @@ void llamaCPP::loadModel(
226226

227227
llama_backend_init(params.numa);
228228

229-
LOG_INFO_LLAMA("build info",
230-
{{"build", BUILD_NUMBER}, {"commit", BUILD_COMMIT}});
229+
// LOG_INFO_LLAMA("build info",
230+
// {{"build", BUILD_NUMBER}, {"commit", BUILD_COMMIT}});
231231
LOG_INFO_LLAMA("system info",
232232
{
233233
{"n_threads", params.n_threads},

0 commit comments

Comments
 (0)