Skip to content

Commit e691c19

Browse files
CISCthe-phobos
authored andcommitted
server : enable -td and -tbd parameters (ggml-org#15172)
1 parent 60d4182 commit e691c19

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

common/arg.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3163,7 +3163,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
31633163
params.speculative.cpuparams.n_threads = std::thread::hardware_concurrency();
31643164
}
31653165
}
3166-
).set_examples({LLAMA_EXAMPLE_SPECULATIVE}));
3166+
).set_examples({LLAMA_EXAMPLE_SPECULATIVE, LLAMA_EXAMPLE_SERVER}));
31673167
add_opt(common_arg(
31683168
{"-tbd", "--threads-batch-draft"}, "N",
31693169
"number of threads to use during batch and prompt processing (default: same as --threads-draft)",
@@ -3173,7 +3173,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
31733173
params.speculative.cpuparams_batch.n_threads = std::thread::hardware_concurrency();
31743174
}
31753175
}
3176-
).set_examples({LLAMA_EXAMPLE_SPECULATIVE}));
3176+
).set_examples({LLAMA_EXAMPLE_SPECULATIVE, LLAMA_EXAMPLE_SERVER}));
31773177
add_opt(common_arg(
31783178
{"-Cd", "--cpu-mask-draft"}, "M",
31793179
"Draft model CPU affinity mask. Complements cpu-range-draft (default: same as --cpu-mask)",

tools/server/server.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,6 +2015,8 @@ struct server_context {
20152015
params_dft.cache_type_k = params_base.speculative.cache_type_k;
20162016
params_dft.cache_type_v = params_base.speculative.cache_type_v;
20172017

2018+
params_dft.cpuparams.n_threads = params_base.speculative.cpuparams.n_threads;
2019+
params_dft.cpuparams_batch.n_threads = params_base.speculative.cpuparams_batch.n_threads;
20182020
params_dft.tensor_buft_overrides = params_base.speculative.tensor_buft_overrides;
20192021

20202022
llama_init_dft = common_init_from_params(params_dft);

0 commit comments

Comments
 (0)