From ec1276e5a929c0605c4995ab5afdd3224ec8e8f0 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Wed, 6 Aug 2025 23:20:28 +0200 Subject: [PATCH] fix(llama.cpp): do not default to linear rope (#5982) This seems to somehow sneaked in during the initial pass to gRPC server, instead of setting linear rope when required, we did default to it if not specified. Signed-off-by: Ettore Di Giacinto --- backend/cpp/llama-cpp/grpc-server.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/cpp/llama-cpp/grpc-server.cpp b/backend/cpp/llama-cpp/grpc-server.cpp index 535bf5d57..872c9edb7 100644 --- a/backend/cpp/llama-cpp/grpc-server.cpp +++ b/backend/cpp/llama-cpp/grpc-server.cpp @@ -313,9 +313,11 @@ static void params_parse(const backend::ModelOptions* request, params.pooling_type = LLAMA_POOLING_TYPE_RANK; } + if (request->ropescaling() == "none") { params.rope_scaling_type = LLAMA_ROPE_SCALING_TYPE_NONE; } else if (request->ropescaling() == "yarn") { params.rope_scaling_type = LLAMA_ROPE_SCALING_TYPE_YARN; } - else { params.rope_scaling_type = LLAMA_ROPE_SCALING_TYPE_LINEAR; } + else if (request->ropescaling() == "linear") { params.rope_scaling_type = LLAMA_ROPE_SCALING_TYPE_LINEAR; } + if ( request->yarnextfactor() != 0.0f ) { params.yarn_ext_factor = request->yarnextfactor(); }