server : show curent seed in slot_params

ggml-ci
This commit is contained in:
Georgi Gerganov 2024-12-07 12:29:50 +02:00
parent 4e218c7255
commit 1881ffaf3e
No known key found for this signature in database
GPG key ID: 449E073F9DC10735

View file

@ -138,6 +138,7 @@ struct slot_params {
return json { return json {
{"n_predict", n_predict}, // Server configured n_predict {"n_predict", n_predict}, // Server configured n_predict
{"seed", sampling.seed},
{"temperature", sampling.temp}, {"temperature", sampling.temp},
{"dynatemp_range", sampling.dynatemp_range}, {"dynatemp_range", sampling.dynatemp_range},
{"dynatemp_exponent", sampling.dynatemp_exponent}, {"dynatemp_exponent", sampling.dynatemp_exponent},
@ -1381,7 +1382,6 @@ struct server_context {
} }
default_generation_settings_for_props = slots[0].to_json(); default_generation_settings_for_props = slots[0].to_json();
default_generation_settings_for_props["seed"] = -1;
// the update_slots() logic will always submit a maximum of n_batch or n_parallel tokens // the update_slots() logic will always submit a maximum of n_batch or n_parallel tokens
// note that n_batch can be > n_ctx (e.g. for non-causal attention models such as BERT where the KV cache is not used) // note that n_batch can be > n_ctx (e.g. for non-causal attention models such as BERT where the KV cache is not used)