From 7f14ce6344d6a6cb612328be2b447cce5e857206 Mon Sep 17 00:00:00 2001 From: ingyukoh Date: Mon, 19 Jan 2026 04:10:09 +0900 Subject: [PATCH] common: add reranking server configuration preset Adds --rerank-bge-default preset for easy reranking server setup using BGE Reranker v2 M3 model. Addresses #10932 --- common/arg.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/common/arg.cpp b/common/arg.cpp index 72750a3cba..919a861f9d 100644 --- a/common/arg.cpp +++ b/common/arg.cpp @@ -3670,6 +3670,21 @@ common_params_context common_params_parser_init(common_params & params, llama_ex } ).set_examples({LLAMA_EXAMPLE_SERVER, LLAMA_EXAMPLE_CLI})); + add_opt(common_arg( + {"--rerank-bge-default"}, + string_format("use default BGE Reranker v2 M3 (note: can download weights from the internet)"), + [](common_params & params) { + params.model.hf_repo = "gpustack/bge-reranker-v2-m3-GGUF"; + params.model.hf_file = "bge-reranker-v2-m3-Q8_0.gguf"; + params.port = 8015; + params.n_ubatch = 512; + params.n_batch = 512; + params.n_ctx = 512; + params.embedding = true; + params.pooling_type = LLAMA_POOLING_TYPE_RANK; + } + ).set_examples({LLAMA_EXAMPLE_SERVER})); + return ctx_arg; }