Skip to content

Commit

Permalink
Server: Enable setting default sampling parameters via command-line (#…
Browse files Browse the repository at this point in the history
…8402)

* Load server sampling parameters from the server context by default.

* Wordsmithing comment
  • Loading branch information
HanClinto authored Jul 9, 2024
1 parent fd560fe commit a59f8fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a59f8fd

Please sign in to comment.