File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ BINARY_NAME=local-ai
6
6
DETECT_LIBS? =true
7
7
8
8
# llama.cpp versions
9
- CPPLLAMA_VERSION? =30e5b01de2a0bcddc7c063c8ef0802703a958417
9
+ CPPLLAMA_VERSION? =e434e69183fd9e1031f4445002083178c331a28b
10
10
11
11
# whisper.cpp version
12
12
WHISPER_REPO? =https://github.com/ggml-org/whisper.cpp
Original file line number Diff line number Diff line change @@ -300,8 +300,10 @@ static void params_parse(const backend::ModelOptions* request,
300
300
params.no_kv_offload = request->nokvoffload ();
301
301
params.ctx_shift = false ; // We control context-shifting in any case (and we disable it as it could just lead to infinite loops)
302
302
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
+ }
305
307
306
308
if (request->ropescaling () == " none" ) { params.rope_scaling_type = LLAMA_ROPE_SCALING_TYPE_NONE; }
307
309
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 {
823
825
}
824
826
825
827
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 ) {
827
829
return grpc::Status (grpc::StatusCode::UNIMPLEMENTED, " This server does not support reranking. Start it with `--reranking` and without `--embedding`" );
828
830
}
829
831
You can’t perform that action at this time.
0 commit comments