From a59f8fdc85e1119d470d8766e29617962549d993 Mon Sep 17 00:00:00 2001 From: Clint Herron Date: Tue, 9 Jul 2024 18:26:40 -0400 Subject: [PATCH] Server: Enable setting default sampling parameters via command-line (#8402) * Load server sampling parameters from the server context by default. * Wordsmithing comment --- examples/server/server.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/server/server.cpp b/examples/server/server.cpp index 47bea1591..8feff6702 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -884,7 +884,8 @@ struct server_context { bool launch_slot_with_task(server_slot & slot, const server_task & task) { slot_params default_params; - llama_sampling_params default_sparams; + // Sampling parameter defaults are loaded from the global server context (but individual requests can still override them) + llama_sampling_params default_sparams = params.sparams; auto & data = task.data; if (data.count("__oaicompat") != 0) {