Skip to content

Commit c2f2d2d

Browse files
committed
chore(deps): bump llama.cpp to 'e434e69183fd9e1031f4445002083178c331a28b'
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
1 parent 89040ff commit c2f2d2d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ BINARY_NAME=local-ai
66
DETECT_LIBS?=true
77

88
# llama.cpp versions
9-
CPPLLAMA_VERSION?=30e5b01de2a0bcddc7c063c8ef0802703a958417
9+
CPPLLAMA_VERSION?=e434e69183fd9e1031f4445002083178c331a28b
1010

1111
# whisper.cpp version
1212
WHISPER_REPO?=https://github.com/ggml-org/whisper.cpp

backend/cpp/llama/grpc-server.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,10 @@ static void params_parse(const backend::ModelOptions* request,
300300
params.no_kv_offload = request->nokvoffload();
301301
params.ctx_shift = false; // We control context-shifting in any case (and we disable it as it could just lead to infinite loops)
302302

303-
params.embedding = request->embeddings();
304-
params.reranking = request->reranking();
303+
params.embedding = request->embeddings() || request->reranking();
304+
if (request->reranking()) {
305+
params.pooling_type = LLAMA_POOLING_TYPE_RANK;
306+
}
305307

306308
if (request->ropescaling() == "none") { params.rope_scaling_type = LLAMA_ROPE_SCALING_TYPE_NONE; }
307309
else if (request->ropescaling() == "yarn") { params.rope_scaling_type = LLAMA_ROPE_SCALING_TYPE_YARN; }
@@ -823,7 +825,7 @@ class BackendServiceImpl final : public backend::Backend::Service {
823825
}
824826

825827
grpc::Status Rerank(ServerContext* context, const backend::RerankRequest* request, backend::RerankResult* rerankResult) {
826-
if (!ctx_server.params_base.reranking || ctx_server.params_base.embedding) {
828+
if (!ctx_server.params_base.embedding || ctx_server.params_base.pooling_type != LLAMA_POOLING_TYPE_RANK) {
827829
return grpc::Status(grpc::StatusCode::UNIMPLEMENTED, "This server does not support reranking. Start it with `--reranking` and without `--embedding`");
828830
}
829831

0 commit comments

Comments
 (0)