mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-10-27 08:21:30 +00:00
server : fix division by zero when reporting stats (#16501)
This commit is contained in:
@@ -4226,7 +4226,7 @@ struct server_context {
|
|||||||
metrics.on_prompt_eval(slot);
|
metrics.on_prompt_eval(slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
slot.t_token_generation = (t_current - slot.t_start_generation) / 1e3;
|
slot.t_token_generation = std::max<int64_t>(1, t_current - slot.t_start_generation) / 1e3;
|
||||||
|
|
||||||
completion_token_output result;
|
completion_token_output result;
|
||||||
result.tok = id;
|
result.tok = id;
|
||||||
|
|||||||
Reference in New Issue
Block a user