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
66DETECT_LIBS? =true
77
88#  llama.cpp versions
9- CPPLLAMA_VERSION? =30e5b01de2a0bcddc7c063c8ef0802703a958417 
9+ CPPLLAMA_VERSION? =e434e69183fd9e1031f4445002083178c331a28b 
1010
1111#  whisper.cpp version
1212WHISPER_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,
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
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments